Commit graph

40718 commits

Author SHA1 Message Date
Peter Wemm eabd19726f Tidy up leftover lazy_switch instrumentation that is no longer needed.
This cleans up some #ifdef hell.
2003-06-27 22:39:14 +00:00
Peter Wemm 813b1b3df7 *groan*. I can't win today. Fix manual transcription error so that the
PAE ifdef is correct.

Pointy hat assigned by:  kan
2003-06-27 22:20:18 +00:00
Peter Wemm 48eceb6213 Make LAZY_SWITCH work with PAE 2003-06-27 22:13:30 +00:00
Nate Lawson 464c662efa Whitespace cleanups (verified with MD5 1832ce5ede6c58c844dfb53fd48f0eea).
Also clarify a macro expansion with an XXX.  I will be fixing access to
Acpi Global Lock in a subsequent commit.
2003-06-27 21:57:42 +00:00
Peter Wemm b50953ccfa Fix the false IPIs on smp when using LAZY_SWITCH caused by pmap_activate()
not releasing the pm_active bit in the old pmap.
2003-06-27 21:50:52 +00:00
Sam Leffler 1bb98f3b7b Check crypto driver capabilities and if the driver operates synchronously
mark crypto requests with ``callback immediately'' to avoid doing a context
switch to return crypto results.  This completes the work to eliminate
context switches for using software crypto via the crypto subsystem (with
symmetric crypto ops).
2003-06-27 20:10:03 +00:00
Sam Leffler 07d0c94a46 Add support to eliminate a context switch per crypto op when using the
software crypto device:

o record crypto device capabilities in each session id
o add a capability that indicates if the crypto driver operates synchronously
o tag the software crypto driver as operating synchronously

This commit also introduces crypto session id macros that cleanup their
construction and querying.
2003-06-27 20:07:10 +00:00
Alan Cox 23252eeabe Simple read-modify-write operations on a vm object's flags, ref_count, and
shadow_count can now rely on its mutex for synchronization.  Remove one use
of Giant from vm_map_insert().
2003-06-27 18:52:49 +00:00
John Baldwin fcccbacd7e Sort the list of PCI ID's in numerical order and fix a whitespace bogon. 2003-06-27 18:17:06 +00:00
Tom Rhodes c2f95f6688 Fix a bug where a truncate operation involving truncate() or ftruncate() on
an MSDOSFS file system either failed, silently corrupted the file, or
sometimes corrupted the neighboring file.

PR:		53695
Submitted by:	Ariff Abdullah <skywizard@MyBSD.org.my> (original version)
MFC:		3 days
2003-06-27 15:46:38 +00:00
Peter Grehan 09bf574a28 Prevent probing the secondary channel on CMD646 controllers if the
channel has been disabled by BIOS. This prevents a bus timeout
machine check on B&W G3 PowerMacs, which have a primary-only CMD646
on the motherboard.

Approved by: sos
Obtained from: NetBSD
2003-06-27 10:11:54 +00:00
Sean Kelly 6cda41555b Fix this to build on alpha. Build test successful.
Suggested fix from:	tjr
2003-06-27 08:35:05 +00:00
Scott Long 3eaffdf7e0 Do the first and mostly mechanical step of adding mutex support to the
bus_dma async callback scheme.  Note that sparc64 does not seem to do
async callbacks.  Note that ia64 callbacks might not be MPSAFE at the
moment.  Note that powerpc doesn't seem to do async callbacks due to
the implementation being incomplete.

Reviewed by:	mostly silence on arch@
2003-06-27 08:31:48 +00:00
Sam Leffler 7535e66acd revise copyright notices per discussion with Atsushi Onoe <onoe@sm.sony.co.jp> 2003-06-27 05:13:52 +00:00
Warner Losh 60c64b939b Remove check to see if the get resource for the second resource
succeeds.  There is a difference between how OLDCARD and NEWCARD deal
with their resources, and this code exposes that difference.  I'm not
sure which behavior is correct, and will need to look into that in
more detail.  However, it appears that we go ahead and allocate the
right thing in both cases that I have access to (CF cards, CDROM, and
external ata enclosures), so go ahead and ignore the failure to get
the resource for the other rid.  There's already another check to make
sure that the actual allocation works correctly, and that should be
sufficient to catch cases that don't work.

Submitted by: wpaul and iedowse
2003-06-27 03:25:43 +00:00
Sam Leffler c032abb595 fix typo
Submitted by:	"Norman Diamond \(ITS\)" <n_diamond@its.jp>
2003-06-27 02:53:00 +00:00
Sam Leffler 3cd0b4fd09 Return support needed by dstumbler:
o add back rx monitor support
o make WI_RID_SCAN_RES DTRT
o fix a bug handling zero-length RID requests (used by dstumbler to set
  a zero-length SSID)
o make RID_SCAN_REQ DTRT
o add back WI_RID_OWN_SSID
o fix wi_scan_ap to take a channel mask and txrate (for prism cards)

These changes fix dstumbler -o (monitor mode).  A minor change to dstumbler
is needed to get normal AP scanning mode to work right; this is preferred to
modifying the driver.

PR:		kern/53187
Reviewed by:	Bruce M Simpson <bms@spc.org>
2003-06-27 00:49:04 +00:00
Hidetoshi Shimokawa 740b10aaa9 - Use fwohci_poll() instead of fwohci_intr() to process the first bus reest.
- Wait 2 cycles before starting the process for fast machines.
2003-06-27 00:27:33 +00:00
Sam Leffler a296d8af2f add comment 2003-06-26 22:11:19 +00:00
Maxime Henrion e542f156cc Other minor style nits I missed in ep_if_start() in my previous
commit.
2003-06-26 17:02:52 +00:00
Alan Cox 9f2b1758c3 vm_page_select_cache() enforces a number of conditions on the returned
page.  Add the ability to lock the containing object to those conditions.
2003-06-26 15:44:03 +00:00
Maxime Henrion 52eec71b80 Make if_ep_start() look a bit more like other if_start() functions,
by calling the first mbuf in the chain m0 and fixing a few nearby
style bugs, mostly s/0/NULL/.
2003-06-26 14:28:35 +00:00
Maxime Henrion c7d24cc1a2 Fix a race condition that was introduced since pccbb interrupts are
flag'ed INTR_MPSAFE.  In ep_if_start(), use the IF_DEQUEUE macro to
grab the next mbuf to send, and use IF_PREPEND if the card is busy
and we actually can't handle it right now.

The old code was first getting the mbuf by taking it from the queue
without using the macros, thus without locking, and without removing
it from the queue either.  It was later assuming that IF_DEQUEUE would
give him this same mbuf.

Tested by:	mich
2003-06-26 13:27:44 +00:00
Matthew N. Dodd f1e875be01 Set a lower bound on fragment size rather than returning a failure
when the user specifies a maximum fragment size < 2.

This is the behavior that Linux provides and fixes the problem I've
observed in Tribes2 where sounds effects are delayed by 1/2 a second.
2003-06-26 13:13:18 +00:00
Sean Kelly 370c3cb57c - Add a software watchdog facility.
This commit has two pieces. One half is the watchdog kernel code which lives
primarily in hardclock() in sys/kern/kern_clock.c. The other half is a userland
daemon which, when run, will keep the watchdog from firing while the userland
is intact and functioning.

Approved by:	jeff (mentor)
2003-06-26 09:50:52 +00:00
Ruslan Ermilov 61340e72c4 Attach the "null" module to the LINT build.
Reviewed by:	markm
2003-06-26 08:06:31 +00:00
Peter Wemm 1e5d8b3b66 Oops, I only added a comment about why ips doesn't compile. Actually
comment it out for real.
2003-06-26 04:01:59 +00:00
Paul Saab be241f79bb Give the correct size for the command map to busdma. 2003-06-26 04:01:34 +00:00
Peter Wemm 6833c6add5 Revert exclusion for amd64 that stopped boot/ being built. 2003-06-26 03:52:48 +00:00
Peter Wemm 062b3e0c77 Build on amd64. Yes, I know this isn't particularly nice. 2003-06-26 03:51:57 +00:00
Peter Wemm ba1cabf4b9 Sync with i386 - add everything that compiles. There are a few drivers
that are trivially easy to fix (eg: ips) that I've not committed fixes for.
2003-06-26 03:49:54 +00:00
Alan Cox 2099bdfded Modify vm_pageq_requeue() to handle a PQ_NONE page without dereferencing
a NULL pointer; remove some now unused code.
2003-06-26 03:14:40 +00:00
Peter Wemm 098f057be8 Add amd64 support. 2003-06-26 01:10:24 +00:00
Peter Wemm 2d29639ebb Add back in the ability for pmap_mapdev() to use KVM if the region
being requested is outside of the range of the direct map region.  eg:
for pci windows.  While here, increase the minimum size of the direct
map region to be 4GB instead of 1GB.
2003-06-26 01:04:31 +00:00
Scott Long dea4622d59 - Zero the buffers used to hold configuration data from the card. Not doing
so can leave stale data in the buffer and confuse the driver.
- enable the ability to set the 'disable' hint for the driver to keep it
  from attaching.  i.e. 'hw.ips.0.disable=1' will prevent the driver from
  attaching.
- Only detach if attach suceeded.

Submitted by: mjacob
2003-06-26 00:03:59 +00:00
Josef Karthauser 3305fa5359 Regen. 2003-06-25 22:56:13 +00:00
Josef Karthauser 59f2899384 Added some new devices and made slight changes to some existing ones.
Submitted by:	Andre Guibert de Bruet <andy@siliconlandmark.com>
2003-06-25 22:50:57 +00:00
Warner Losh 4f2073fb4c Fix leap second processing by the kernel time keeping routines.
Before, we would add/subtract the leap second when the system had been
up for an even multiple of days, rather than at the end of the day, as
a leap second is defined (at least wrt ntp).  We do this by
calculating the notion of UTC earlier in the loop, and passing that to
get it adjusted.  Any adjustments that ntp_update_second makes to this
time are then transferred to boot time.  We can't pass it either the
boot time or the uptime because their sum is what determines when a
leap second is needed.  This code adds an extra assignment and two
extra compare in the typical case, which is as cheap as I could made
it.

I have confirmed with this code the kernel time does the correct thing
for both positive and negative leap seconds.  Since the ntp interface
doesn't allow for +2 or -2, those cases can't be tested (and the folks
in the know here say there will never be a +2s or -2s leap event, but
rather two +1s or -1s leap events).

There will very likely be no leap seconds for a while, given how the
earth is speeding up and slowing down, so there will be plenty of time
for this fix to propigate.  UT1-UTC is currently at "about -0.4s" and
decrementing by .1s every 8 months or so.  6 * 8 is 48 months, or 4
years.

-stable has different code, but a similar bug that was introduced
about the time of the last leap second, which is why nobody has
noticed until now.

MFC After: 3 weeks
Reviewed by: phk

"Furthermore, leap seconds must die." -- Cato the Elder
2003-06-25 21:23:51 +00:00
Julian Elischer 722a139cfa Fix a comment
MFC after:	1 day
2003-06-25 20:58:35 +00:00
Warner Losh eac3c62b51 During a positive leap second, the tai_time offset should be
incremented at the start of the leap second, not after the leap second
has been inserted.  This is because at the start of the leap second,
we set the time back one second.  This setting back one second is the
moment that the offset changes.  The old code set it back after the
leap second, but that's one second too late.  The negative leap second
case is handled correctly.

Reviewed by: phk
2003-06-25 20:56:40 +00:00
Bosko Milekic d88797c2ba Move the pcpu lock out of the uma_cache and instead have a single set
of pcpu locks.  This makes uma_zone somewhat smaller (by (LOCKNAME_LEN *
sizeof(char) + sizeof(struct mtx) * maxcpu) bytes, to be exact).

No Objections from jeff.
2003-06-25 20:49:48 +00:00
Matthew N. Dodd 17d7127c64 Set pointers to NULL after free() to prevent multiple free().
PR:		 kern/48808
Submitted by:	 Eugene Grosbein <eugen@grosbein.pp.ru>
2003-06-25 19:58:38 +00:00
Sam Leffler 1300bbb70e fix tcpdump -y IEEE802_11; NBPFILTER was a holdover from netbsd compatibility 2003-06-25 17:42:36 +00:00
Bosko Milekic 5c133dfa0e Make sure that the zone destructor doesn't get called twice in
certain free paths.
2003-06-25 17:25:45 +00:00
Yoshihiro Takahashi 3644d2744a MFi386: revision 1.446. 2003-06-25 15:19:04 +00:00
Sam Leffler 2dd59091ae add "autoselect" mode and "auto" alias: these let you reset the
"phy mode" to an auto-selecting mode, as opposed to one where
you're locked to a particular one (e.g. 11a for 802.11)
2003-06-25 15:03:05 +00:00
Sam Leffler 167f409fd6 config+build glue for Atheros support 2003-06-25 14:51:20 +00:00
Sam Leffler a826874f28 add "no RNG support options" for ubsec and hifn drivers 2003-06-25 14:49:24 +00:00
Sam Leffler e61a4ae50c o correct mib spelling: reset -> retest
o add #ifdef's needed to share code directly with -stable
2003-06-25 14:46:01 +00:00
Sam Leffler b52f49a9a0 module for atheros hal 2003-06-25 14:43:50 +00:00