Commit Graph

89854 Commits

Author SHA1 Message Date
ad
36a1712707 Merge run time accounting changes from the vmlocking branch. These make
the LWP "start time" per-thread instead of per-CPU.
2007-10-08 20:06:17 +00:00
ad
0ee29bef4d Missed brelse() change. 2007-10-08 19:22:04 +00:00
ad
0a0689eebd Merge from vmlocking: fix LWP reference counting problems. 2007-10-08 18:11:11 +00:00
ad
16598eeedf Merge from vmlocking: don't hold scheduler locks across copyout(). 2007-10-08 18:09:37 +00:00
ad
62fdbc4b9a LOCK_ASSERT -> KASSERT 2007-10-08 18:07:24 +00:00
ad
9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad
5c3b2b3f2d Merge ffs locking & brelse changes from the vmlocking branch. 2007-10-08 18:01:27 +00:00
ad
6eb1b4f21a Include sys/cpu.h for archs that don't have CPU_INFO_ITERATOR. Spotted
by dsieger@.
2007-10-08 17:26:40 +00:00
ad
fbf4a82ac2 Merge from vmlocking: cosmetic change. 2007-10-08 17:02:51 +00:00
ad
59904ecbd2 Merge from vmlocking: fix dodgy use of VOP_ISLOCKED(). 2007-10-08 17:01:43 +00:00
ad
d50d28b794 Merge from vmlocking: in cdev_tty() check d_tty != NULL. 2007-10-08 16:54:09 +00:00
ad
1d7050e5e2 Merge from vmlocking: fix many timing problems on mips. 2007-10-08 16:52:49 +00:00
ad
be0770a433 Merge from vmlocking: use mutexes and the softint API. 2007-10-08 16:50:45 +00:00
ad
2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00
ad
46ed8f7d77 Use the softint API. 2007-10-08 16:18:02 +00:00
ad
342d5fc94f Add stubs that provide new soft interrupt API from the vmlocking branch.
For now these just pass through to the current softintr code.

(The naming is different to allow softint/softintr to co-exist for a while.
I'm hoping that should make it easier to transition.)
2007-10-08 15:51:02 +00:00
ad
402de3c455 Pull in sys/simplelock.h to fix build on sparc. 2007-10-08 15:45:54 +00:00
ad
b6e1f76ba0 Fix merge error. 2007-10-08 15:13:12 +00:00
ad
451aacda90 Merge file descriptor locking, cwdi locking and cross-call changes
from the vmlocking branch.
2007-10-08 15:12:05 +00:00
martin
cd2cd2dd63 Do another setjmp right before entering the command loop, we do not want
to execute the on-enter commands again on errors.
2007-10-08 15:06:26 +00:00
ad
82f39f6568 Fix merge error. 2007-10-08 14:14:55 +00:00
ad
15b0a1106e Merge from vmlocking: don't add a refrerence to a dying LWP. 2007-10-08 14:08:26 +00:00
ad
76e37ddd89 Merge from vmlocking: splstatclock is gone. 2007-10-08 14:07:23 +00:00
ad
0b87fda284 Merge from vmlocking: relax an assertion if panicstr != NULL. 2007-10-08 14:07:08 +00:00
ad
4de14a3313 Pad the hashlocks to 32-byte boundaries. 2007-10-08 14:06:15 +00:00
hannken
c775e7cb24 fscow_run(): Check for NULL mount and don't run the cow handler in this case. 2007-10-08 09:09:47 +00:00
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
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
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
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
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
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
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
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
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
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
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
uwe
bcb355867b Mark __COPYRIGHT strings as __used to bring them back, as gcc4
optimizes away __unused vars (but doesn't complain about them).
__used instructs it to keep them.

Per discussion with Christos.
2007-10-06 00:42:19 +00:00
uwe
6f23ef4104 Use .pushsection/.popsection instead of going "back" with .previous
(it does but has a side-effect) or .text (which is probably ok, but
still less kosher).

Make section macros work for traditional cpp (I guess we haven't used
that for a *long* time, b/c it was broken).

Use __unused instead of explicit attribute for __COPYRIGHT (to be
changed in the next commit).

Define __KERNEL_COPYRIGHT in terms of __COPYRIGHT rather than
duplicating the logic and accidentally inverting it.

Results in identical obj tree for an i386 build modulo ar archives
(with timestamps embedded) and few .o files (and programs they are
part of) that embed timestamps as strings.
2007-10-06 00:21:46 +00:00
jmcneill
02ef36ec48 Sort IO resources before attempting to attach; resolves issues on ACPI
firmware that reports 0x64,0x60 instead of 0x60,0x64. Patch tested by
Greg A. Woods.
2007-10-05 18:31:46 +00:00
joerg
04512a3ea9 Add re* at cardbus. 2007-10-05 17:58:38 +00:00
martin
38e2704180 Add missing include for definition of struct evcnt. 2007-10-05 08:05:37 +00:00
dogcow
360a5fad96 since ip_gre.c is gone, it's unhelpful to have dependencies on it. 2007-10-05 07:28:24 +00:00