Commit Graph

162407 Commits

Author SHA1 Message Date
xtraeme 6a0ca41c22 Set the monitor value only once in the acpitz_init_envsys(),
not multiple times in the callout handler.
2007-10-07 23:14:53 +00:00
joerg 1b78992d21 Add some basic parsing of the PCI Express capabilities register.
This is enough to help detect the source of interrupt storms at least
for my Thinkpad.
2007-10-07 23:00:47 +00:00
he 7ed9cc8edd On sparc64, both __sparc__ and __sparc64__ is defined. Avoid redefinition
of size constants for sparc64.

This code still produces many, many lint warnings due to "may loose accuracy"
when mixing long/int, and also warnings related to <<.
2007-10-07 21:45:18 +00:00
xtraeme 032cb27052 Another comment that is no more thanks to the new configuration file. 2007-10-07 18:22:37 +00:00
xtraeme 0d2161c8c4 Modify a comment that is not valid anymore. 2007-10-07 18:14:20 +00:00
pavel 43402af054 Do not abort on exit code 1 from postinstall check, this is expected.
Reported, fix suggested and tested by David Holland.

(Why does "make build" invoke postinstall check on destdir is another
question, it does not seem to have much sense.)
2007-10-07 16:35:21 +00:00
xtraeme 12b91c398d If a critical-capacity property is found, make sure that the
'monitoring-supported' object is true.
2007-10-07 16:22:37 +00:00
xtraeme 1e1df7f7b4 Provide a more complete syntax example. 2007-10-07 15:37:30 +00:00
xtraeme 71045d13c0 Explain some more about the events that will send to powerd(8)
(if running) in the critical-{capacity,max,min} properties when the
limit has been reached.
2007-10-07 15:23:41 +00:00
hannken c103a5683e Remove an include committed by accident.
From Chris Ross via current-users.
2007-10-07 14:48:38 +00:00
joerg 0c403c87a2 Merge intr.c (1.29.8.2) and ioapic.c (1.19.8.5) changes from jmcneill-pm:
Always write entries to all IOAPIC pins. The first 16 pins are
threated as ISA IRQs by default, the others like PCI IRQs. This avoids
inconsistencies based on incomplete BIOS setups. This resulted in early
ACPI SCI notifications to be lost, effectively breaking the Embedded
Controller on cold start on many notebooks.

Don't special case the IOAPIC setup between ioapic_attach and
ioapic_enable, always setup the correct redirections. Depend on
splhigh/disable_intr to stop interrupts and don't keep them masked in
the IOAPIC. This avoids unacknowleged edge interrupts and fixing the problem
of broken PS/2 keyboard when hitting keys during early boot.
2007-10-07 14:23:42 +00:00
xtraeme ab21cdda12 sme_event_unregister: remove a goto that is not needed anymore. 2007-10-07 14:07:21 +00:00
xtraeme 2839febced Use two global dictionaries rather than only one:
- use one for temporary sensor dictionaries.
- use one as the dictionary that will be returned to send_dictionary().

This fixes multiple settings in multiple devices.
2007-10-07 13:48:03 +00:00
xtraeme 8259fb204b Use another main rule to avoid a conflict in the grammar.
Suggestion from martin@.
2007-10-07 13:46:22 +00:00
hannken 3856acafe2 Update the file system copy-on-write handler.
- Instead of hooking the handler on the specdev of a mounted file system
  hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'.  Use
  `mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
2007-10-07 13:38:53 +00:00
joerg 18d2e98d25 Include sysctl on the amd64 boot floppy. This is useful for allowing
people to test suspend/resume and can be used to find other values as
well.
2007-10-07 13:12:15 +00:00
xtraeme 7447ac47db Xref envsys.conf(5) 2007-10-07 12:43:19 +00:00
joerg 4680156428 NetBSD doesn't have to care about missing bcmp on OpenBSD/SPARC,
just use memcmp in both kernel and userland.
2007-10-07 12:43:18 +00:00
xtraeme bca7b7f673 Pass -I${.CURDIR} -I. like others do. 2007-10-07 12:19:37 +00:00
nisimura 1e20a40aee A typo fix in one of comments and some adjustments of register field names.
No functionality change intented.

IHAE "IP Header Alignment Enable" feature of RXC register;
- careful cross referencing at KSZ8692P/8841P/8842P PDFs indicates IHEA
  bit works as follows; When the feature is turned on, Rx DMA engine
  will populate Rx frame data in the Rx memory with +2 or +3 byte swifted
  to make its IP head field 32bit aligned.  The shift amount is recorded
  inside RDES0 to tell 0, 2 or 3.  The automatic alignment is done only
  when IHAE is enabled _and_ the Rx frame was IP frame.  In other cases,
  RDES0 swift amount field keeps 0.
- KSZ8841P document mentions the IHAE bit but its reference link is broken
  to tell the new RDES0 field.  KSZ8842P lacks both.  The bit usage of
  RDES0 23:20 seems different from KSZ8692P, which brings me a vague
  suspiction of documentation error.
2007-10-07 07:23:56 +00:00
xtraeme 21f9bf1683 Fix a typo. 2007-10-07 05:33:06 +00:00
xtraeme 2026f84dc1 Only print the message if the command ran successfully. 2007-10-07 05:30:56 +00:00
taca a3cbbf6d39 Remove an unused variable at previous commit in listdir(). 2007-10-07 05:25:19 +00:00
xtraeme b0a8720beb Accept '+' or '-' characters at the start of SP_STRING. 2007-10-07 05:11:08 +00:00
xtraeme 5c2d51b913 Sync with the new configuration file format and recent changes
to the envsys framework.
2007-10-07 04:19:51 +00:00
xtraeme 4b431f1771 Update for the new configuration file format for envstat(8)
and the envsys framework.

The rc.d has been simplified vastly... the configuration file now
is more powerful than ever!
2007-10-07 04:19:06 +00:00
xtraeme 73b39c8d03 Add envsys.conf(5). 2007-10-07 04:17:15 +00:00
xtraeme f2803256d9 New configuration file format for the envsys framework:
foo0 {
	#
	# CPU Temperature
	#
	sensor0 {
		critical-max = 70C;
		critical-min = 20C;
	}
	...
}
...

Removed the -m flag that was previously used to set properties for
sensors. Now the -c flag will process all properties specified in
the file (accepted as argument).

To remove all properties that were set, the new -S flag can be used.
This will restore default values for all devices.
2007-10-07 04:16:47 +00:00
xtraeme 6c4da82b5e New changes to support the new configuration file format for
envstat(8) and the envsys framework:

- Modify the ENVSYS_SETDICTIONARY ioctl to support the following
  plist structure:

  <dict>
	<key>foo0</key>
	<array>
		<dict>
			<key>index</key>
			<string>sensor0</string>
			<key>description</key>
			<string>cpu temp</string>
			...
			Another property for this sensor
			...
		</dict>
		...
		Another dictionary for other sensor
		...
	</array>
	...
	Another device as above
	...
  </dict>

  Multiple devices with multiple sensors can now be specified, that means
  that to set the properties only one copyin(9) is needed now.

- Added the ENVSYS_REMOVEPROPS ioctl, that accepts a boolean object
  "envsys-remove-props" and when set to true, all properties that were
  set previously by ENVSYS_SETDICTIONARY will be removed. That means that
  you can now set multiple critical limits, descriptions and all they
  will be removed or changed to its default value (for rfact and
  description objects).

- Added the 'index' and 'allow-rfact' objects into the sensor dictionaries,
  for better interactivity with userland. To know the position of the
  sensor and to know if sensor allows to change the rfact.

- Misc cosmetic changes for consistency.

- Use a two clause license for all my code.
2007-10-07 04:11:15 +00:00
christos ab7f7a664a don't set obsolete flags in SETALL. From Anon Ymous 2007-10-07 01:23:17 +00:00
christos fbe2281123 fix reversed comment. 2007-10-07 00:37:11 +00:00
xtraeme cfba73e2fb Remove an extra prop_object_release(). 2007-10-06 22:12:04 +00:00
xtraeme 50509ea822 Forgot to change the kmem_zalloc(9) calls to use KM_NOSLEEP in previous,
as was suggested by rmind.
2007-10-06 22:07:42 +00:00
xtraeme 4814127d51 Fix a bug that happened when two or more events were received almost
at the same time and the code accessed to an unexistent dictionary:

- Rather than using a global dictionary, use a singly linked list to
  access to the dictionaries, one per event.
- When the dictionary has been sent to userland, destroy it and remove
  it from the list.

With that change it is possible to receive multiple events at the
same time without panics; again thanks to rmind@ for comments and help
with locking.

Reviewed and ok by rmind.
2007-10-06 21:58:40 +00:00
christos b093a7796c split LOGIN_SETGROUP -> LOGIN_SETGID|LOGIN_SETGROUPS 2007-10-06 21:51:21 +00:00
christos 9f1fcc0d86 portability fixes from joerg. 2007-10-06 20:19:52 +00:00
martin 167a3a9d68 Make it build without HAVE_WCHAR 2007-10-06 20:14:41 +00:00
martin b3fd7f365b Make the non-WCHAR variant compilable. 2007-10-06 18:31:33 +00:00
yamt 3bae22298f kill another definition of bool. 2007-10-06 16:17:34 +00:00
bouyer 975e5c30a0 Move check for b_resid value to the right place. Should definitively fix
kern/36690.
2007-10-06 12:52:43 +00:00
reed 2d8c92dafd My last commit accidently added the links for some other manpages.
Remove those for now.
And commit them later at same time with distrib/sets/lists/base/mi.
Sorry!
2007-10-06 11:39:36 +00:00
xtraeme 8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
joerg f4fa1c68c7 Merge from mpacpi.h 1.4.32.1, acpi_machdep.c 1.13.22.5 and
mpacpi.c 1.48.12.2 from jmcneill-pm:

Don't process the MADT and modify the interrupt config at one moment and
later trying to figure out if an entry was overriden and matches the
ACPI SCI. This is brain-dead and breaks in various situations.

Just check for each ISA override entry, if it matches the SCI. If it
does, remember it and use it for the interrupt setup. If there's no such
override assume that it is not changed, but override the polarity and
level from ISA settings to PCI settings.
2007-10-06 04:39:10 +00:00
joerg a544202cb5 Merge from jmcneill-pm: Close a small race in the IOAPIC setup.
When changing the redirection entry for an interrupt, write the
high 32bit first. The low 32bit contain the mask bit and removing
that before setting the destionation ID can lead to lost interrupts.
2007-10-06 04:37:06 +00:00
dyoung bae255a751 Note changes to raw sockets, gre(4). 2007-10-06 04:04:18 +00:00
dyoung 1dc4f12dca Change some ints to bools. 2007-10-06 03:35:14 +00:00
dyoung 2c54ff5913 Good-bye, kernel thread, we don't need you any longer. 2007-10-06 03:30:25 +00:00
ginsbach 8b26595b3a Changes for standards compliance:
- "If no $set directive is specified in a message text source file,
   all messages shall be located in an implementation-defined default
   message set NL_SETD."
- The n argument to $delset indicates the set number which should be
  in the range 1 to NL_SETMAX.

Standards: The Open Group Base Specifications Issue 6
           IEEE Std 1003.1, 2004 Edition
2007-10-06 02:55:56 +00:00
xtraeme 07f9bca5af - sysmon_power_daemon_task: check if pev is valid before use.
- Add two more KASSERTS in strategic places.
2007-10-06 02:49:46 +00:00
ad 81e619b9a4 Update for jemalloc. 2007-10-06 01:09:48 +00:00