Commit Graph

53798 Commits

Author SHA1 Message Date
Peter Grehan
6ac8f17ee4 Catch up with latest ATA newbus commits. 2005-05-01 13:11:29 +00:00
Peter Grehan
73fddedac8 Fix typo in last commit.
Approved by:	rwatson
2005-05-01 13:06:05 +00:00
Søren Schmidt
9ec5e87f63 Update on the last commit, the dma* funciton needs to be called with
a channel device, not an ata device, or we'll be out of luck in
reset/timeout where we dont have a device.
2005-05-01 12:24:45 +00:00
Jeff Roberson
b2e2166483 - All buffers should either be clean or dirty. If neither of these flags
are set when we attempt to remove a buffer from a queue we should panic.
   Hopefully this will catch the source of the wrong bufobj panics.

Sponsored by:	Isilon Systems, Inc.
2005-05-01 12:00:36 +00:00
Robert Watson
d1401c9000 Slide unlocking of the tcbinfo lock earlier in tcp_usr_send(), as it's
needed only for implicit connect cases.  Under load, especially on SMP,
this can greatly reduce contention on the tcbinfo lock.

NB: Ambiguities about the state of so_pcb need to be resolved so that
all use of the tcbinfo lock in non-implicit connection cases can be
eliminated.

Submited by:	Kazuaki Oda <kaakun at highway dot ne dot jp>
2005-05-01 11:11:38 +00:00
Yoshihiro Takahashi
9b073f6668 Add some convenience defines. 2005-05-01 09:48:24 +00:00
Yoshihiro Takahashi
16da54931e Fix signed vs unsigned warning. 2005-05-01 09:44:50 +00:00
Søren Schmidt
1191f58127 Go back to the old way of finding the Promise metadata, the new way was
too simple causing older controllers metadata to get lost.
2005-05-01 08:45:12 +00:00
Yoshihiro Takahashi
fb4c2dbf41 MFi386: revision 1.1198 (add KDB_STOP_NMI option). 2005-05-01 04:00:12 +00:00
Yoshihiro Takahashi
3e2900d7e5 MFi386: revision 1.220 (add KDB_STOP_NMI option). 2005-05-01 03:59:25 +00:00
Jeff Roberson
8d46d9c46f - Remove spls and comments relating to them. 2005-05-01 01:01:17 +00:00
Jeff Roberson
194dfed917 - Remove an old splcam hack. 2005-05-01 00:59:55 +00:00
Jeff Roberson
5270a2dbe3 - Remove unnecessary spls. 2005-05-01 00:59:34 +00:00
Jeff Roberson
4d7d299383 - Return EACCES if we're trying to exec on a vp with no object.
Errno supplied by:	cperciva
2005-05-01 00:58:19 +00:00
Jeff Roberson
7b6b7657d2 - In devfs_open() and devfs_close() grab Giant if the driver sets NEEDGIANT.
We still have to DROP_GIANT and PICKUP_GIANT when NEEDGIANT is not set
   because vfs is still sometime entered with Giant held.
2005-05-01 00:56:34 +00:00
Sam Leffler
52bc746a28 o enable shutdown of taskqueue threads; the thread servicing the queue checks
a new entry in the taskqueue struct each time it wakes up to see if it
  should terminate
o adjust TASKQUEUE_DEFINE_THREAD & co. to record the thread/proc identity for
  the shutdown rendezvous
o replace wakeup after adding a task to a queue with wakeup_one; this helps
  queues where multiple threads are used to service tasks (e.g. acpi)
o remove NULL check of tq_enqueue method; it should never be NULL

Reviewed by:	dfr, njl
2005-05-01 00:38:11 +00:00
Doug White
fdc9713bf7 Implement an alternate method to stop CPUs when entering DDB. Normally we use
a regular IPI vector, but this vector is blocked when interrupts are disabled.
With "options KDB_STOP_NMI" and debug.kdb.stop_cpus_with_nmi set, KDB will
send an NMI to each CPU instead. The code also has a context-stuffing
feature which helps ddb extract the state of processes running on the
stopped CPUs.

KDB_STOP_NMI is only useful with SMP and complains if SMP is not defined.
This feature only applies to i386 and amd64 at the moment, but could be
used on other architectures with the appropriate MD bits.

Submitted by:	ups
2005-04-30 20:01:00 +00:00
Dag-Erling Smørgrav
4cd27a97bc Fix an old pasto. 2005-04-30 16:27:20 +00:00
Søren Schmidt
0068f98f88 Take newbusification one step further, ie use the device_t more consequently
all way through the code down the layers, instead of the mix'n'match that
resulted from the conversion done earlier.

Sponsored by:	pair.com
2005-04-30 16:22:07 +00:00
Jeff Roberson
4a723b3604 - Remove long dead splbio() calls and comments relating to the old
synchronization mechanism.
2005-04-30 12:18:50 +00:00
Jeff Roberson
ba4f7c7023 - Don't acquire Giant before calling b_biodone, individual consumers are
now required to do so themselves.

Sponsored by:	Isilon Systems, Inc.
2005-04-30 11:44:22 +00:00
Jeff Roberson
2524c26de8 - Use bdone() directly instead of calling it indirectly through
ffs_rawreaddone().

Sponsored by:	Isilon Systems, Inc.
2005-04-30 11:28:19 +00:00
Jeff Roberson
a230c79b9e - Acquire Giant in AIO's iodone routine. VFS will no longer do it for us
soon.

Sponsored by:	Isilon Systems, Inc.
2005-04-30 11:27:31 +00:00
Jeff Roberson
4e0ed69694 - Call VM_LOCK_GIANT in cluster_callback() to protect some pmap calls. VFS
will not be acquiring Giant before calling this function anymore.

Sponsored by:	Isilon Systems, Inc.
2005-04-30 11:26:58 +00:00
Jeff Roberson
382a601cd7 - VM_LOCK_GIANT in the swap pager's iodone routine as VFS will soon call it
without Giant.

Sponsored by:	Isilon Systems, Inc.
2005-04-30 11:25:49 +00:00
Jeff Roberson
cd360e947b - Mark devfs as MNTK_MPSAFE as I belive it does not require Giant.
Sponsored by:	Isilon Systems, Inc.
Agreed in principle by:		phk
2005-04-30 11:24:17 +00:00
Jeff Roberson
b2183bfe05 - In vnlru_free() remove the vnode from the free list before we call
vtryrecycle().  We could sometimes get into situations where two threads
   could try to recycle the same vnode before this.
 - vtryrecycle() is now responsible for returning the vnode to the free list
   if it fails and someone else hasn't done it.
 - Make a new function vfreehead() which moves a vnode to the head of the
   free list and use it in vgone() to clean up that code a bit.

Sponsored by:	Isilon Systems, Inc.
Reported by:	pho, kkenn
2005-04-30 11:22:40 +00:00
Colin Percival
9249fcc4b9 Add PROC_UNLOCK(p) to PTRACESTOP_SC(p, td, flag). This is necessary
due to a change made in revision 1.284 of sys/kern/kern_sig.c in August
2004 which made ptracestop() return with the process still locked.

Submitted by:	Mauritz Sundell
MFC After:	3 days
2005-04-29 22:38:02 +00:00
Vinod Kashyap
b598979dc9 Make call to tw_cl_deferred_interrupt in twa_poll, not dependent on the
return value from tw_cl_interrupt.
2005-04-29 20:03:20 +00:00
Robert Watson
5d1ae027f0 Modify UMA to use critical sections to protect per-CPU caches, rather than
mutexes, which offers lower overhead on both UP and SMP.  When allocating
from or freeing to the per-cpu cache, without INVARIANTS enabled, we now
no longer perform any mutex operations, which offers a 1%-3% performance
improvement in a variety of micro-benchmarks.  We rely on critical
sections to prevent (a) preemption resulting in reentrant access to UMA on
a single CPU, and (b) migration of the thread during access.  In the event
we need to go back to the zone for a new bucket, we release the critical
section to acquire the global zone mutex, and must re-acquire the critical
section and re-evaluate which cache we are accessing in case migration has
occured, or circumstances have changed in the current cache.

Per-CPU cache statistics are now gathered lock-free by the sysctl, which
can result in small races in statistics reporting for caches.

Reviewed by:	bmilekic, jeff (somewhat)
Tested by:	rwatson, kris, gnn, scottl, mike at sentex dot net, others
2005-04-29 18:56:36 +00:00
David E. O'Brien
97c1144eb2 Enable dc(4) and rl(4) in the PAE kernel.
Both have been busdma'ed for use and tested in the Sparc64 kenrel.
2005-04-29 18:12:22 +00:00
Søren Schmidt
e47099593a Now that probing is working in the new fashion, we need to go back to
having ata_getparm issue an ata_request and not fool around with the HW
on its own.
Needed for new HW support.
2005-04-29 11:30:03 +00:00
Warner Losh
4e30440d7c Add a detach for pci bridge and pci bus drivers. This allows one to
theoretically unload pci bridges or pci drivers.  It will also allow
detach to work if one needed to detach a subtree.

This is inspired by looking at the p4 commits from bms to his 5.4
tree, but I didn't look at the final results.
2005-04-29 06:22:41 +00:00
Ruslan Ermilov
f9067637f7 Fix the following warnings on amd64:
/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c: In function `fr_ipid_newfrag':
/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c:397: warning: cast to pointer from integer of different size
/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c: In function `fr_ipid_knownfrag':
/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c:582: warning: cast from pointer to integer of different size
2005-04-29 05:57:17 +00:00
Scott Long
a304e92b2b Only create the rdpti alias if the asr device creation succeeds. 2005-04-29 04:47:11 +00:00
Scott Long
a8e6f0b6fa For whatever reason, we don't allow USB on PAE. Since it's a dependency
for EHCI, exclude that driver also.
2005-04-29 02:59:19 +00:00
Scott Long
1c7e93581d Don't bother pretending that CAM will send CAM_DATA_PHYS pointers. It's
a concept that is fundamentally broken with PAE.
2005-04-29 02:58:23 +00:00
Scott Long
9fa98e70b0 Update the file.* entries for the new home of hwpmc 2005-04-29 02:40:16 +00:00
Marcel Moolenaar
d98d9b126b In pcib_alloc_resource() check if the resource allocation request is
for the VGA I/O or memory ranges, when it's not within the default
ranges decoded by the bridge. When allocation for VGA addresses is
attempted, check that the bridge has the VGA Enable bit set before
allowing it.
As such, newbusified VGA drivers can allocate their resources when
the VGA adapter is behind a PCI-to-PCI bridge.

Reviewed by: imp@, jhb@
2005-04-29 02:15:40 +00:00
Marcel Moolenaar
9929ff6b5b Add pci_is_vga_ioport_range() and pci_is_vga_memory_range() as inline
functions. These functions centralize the details of which I/O port
and memory ranges belong to VGA.

Reviewed by: imp@, jhb@
2005-04-29 02:03:11 +00:00
Marcel Moolenaar
d1ee178775 Add defines for the Bridge Control Register bits.
Obtained from: jhb@
2005-04-29 01:58:27 +00:00
Søren Schmidt
ca8c70e9e3 Provide a default setmode method.
This shaves off multiple copies of the same setmode stub.
2005-04-28 22:15:44 +00:00
Søren Schmidt
8dad6b7be5 Rearrange the way the reset code is called.
Prepare for different looking controllers.
2005-04-28 22:08:08 +00:00
Darren Reed
e01de6cda3 Don't use quad_t on FreeBSD (deprecated) so use "long long" instead.
Someday this should be converted to uint64_t and printstate.c changed to
use those horrid PRiud64 things.
2005-04-28 21:36:30 +00:00
Darren Reed
0c3757df94 Patches from Ruslan Ermilov to address problems compiling LINT 2005-04-28 16:33:15 +00:00
Ruslan Ermilov
1afc807b33 Be resistant to DESTDIR being set to some unkosher value, e.g. "/".
Noticed by:	Steve Ames
2005-04-28 14:45:57 +00:00
Paul Saab
4bb10cf193 Add support for the P600 and name the E400. 2005-04-28 14:40:23 +00:00
Lukas Ertl
bc2d4d6784 Only allow RAID5 plexes to be parity checked.
PR:           kern/80427
Submitty by:  Stijn Hoop <stijn@win.tue.nl>
2005-04-28 13:09:00 +00:00
Joseph Koshy
6b8c8cd85f Return the correct register number in the 'get_msr()' MD function.
Only allow a process to use the x86 RDPMC instruction if it has
allocated and attached a PMC to itself.

Inform the MD layer of the "pseudo context switch out" that needs
to be done when the last thread of a process is exiting.
2005-04-28 08:13:19 +00:00
Marcel Moolenaar
61d596a8ff Update comment to direct the reader to libkern.h instead of systm.h.
The functions were moved.

Pointed out by: johan@
2005-04-28 05:50:18 +00:00