Commit Graph

138584 Commits

Author SHA1 Message Date
Antoine Brodin
7ffe7234a4 Move "1000baseT" from IFM_SUBTYPE_ETHERNET_DESCRIPTIONS to
IFM_SUBTYPE_ETHERNET_ALIASES: there is already "1000baseTX" in
IFM_SUBTYPE_ETHERNET_DESCRIPTIONS.  This doesn't change ifconfig
behaviour.

PR:		45793 (maybe)
Approved by:	rwatson (mentor)
MFC after:	1 month
2008-04-20 16:17:44 +00:00
Antoine Brodin
d6b57c13c4 Unbreak firmware.ko build without kernel.
Approved by:	rwatson (mentor)
MFC after:	1 month
2008-04-20 16:11:14 +00:00
Antoine Brodin
456e16cda7 Add recent obsolete files.
Approved by:	rwatson (mentor)
2008-04-20 16:03:19 +00:00
Antoine Brodin
f578431cc4 Record the dependency of the iscsi initiator on cam.
PR:		116745
Submitted by:	OISHI Masakuni
Approved by:	rwatson (mentor)
MFC after:	1 month
2008-04-20 15:56:59 +00:00
Antoine Brodin
88ff5136d1 Document that you must include <sys/param.h> before <sys/cpuset.h>.
Approved by:	rwatson (mentor)
2008-04-20 15:51:56 +00:00
Robert Watson
fdd9b0723e Teach pf and ipfw to use read locks in inpcbs write than write locks
when reading credential data from sockets.

Teach pf to unlock the pcbinfo more quickly once it has acquired an
inpcb lock, as the inpcb lock is sufficient to protect the reference.

Assert locks, rather than read locks or write locks, on inpcbs in
subroutines--this is necessary as the inpcb may be passed down with a
write lock from the protocol, or may be passed down with a read lock
from the firewall lookup routine, and either is sufficient.

MFC after:	3 months
2008-04-20 00:21:54 +00:00
Ariff Abdullah
42018dcf7b Fix no sound issues for ASUS W6F (ALC861) laptops (buggy BIOS config that
deserves its own internet memes). The trick is to force all available,
unused pins (that being advertised as "speaker") to behave as microphone
pins instead.

Reported / Tested by:	Dmitry Kutsenko <kutsenko.truebsd.org>
MFC after:		3 days
2008-04-19 22:32:23 +00:00
Brooks Davis
ae0615f633 Delay the global registration of the struct ifnet in if_alloc() until after
we're certain the allocation will entierly succeed.  This fixes a leak in a
fairly unlikely case.

Reported by:	vijay singh <vijjus at rocketmail dot com>
MFC after:	1 week
2008-04-19 22:04:51 +00:00
Robert Watson
1a46aa801e When auditing state from an IPv4 or IPv6 socket, use read locks on the
inpcb rather than write locks.

MFC after:	3 months
2008-04-19 18:37:08 +00:00
Robert Watson
211b72ad2f When propagating a MAC label from an inpcb to an mbuf, allow read and
write locks on the inpcb, not just write locks.

MFC after:	3 months
2008-04-19 18:35:27 +00:00
Robert Watson
8328afb791 When querying a local or remote address on an IPv6 socket, use only a
read lock on the inpcb.

MFC after:	3 months
2008-04-19 14:36:19 +00:00
Robert Watson
baa45840d7 In ip_output(), allow a read lock as well as a write lock when asserting
a lock on the passed inpcb.

MFC after:	3 months
2008-04-19 14:35:17 +00:00
Robert Watson
a69042a5be When querying the local or foreign address from an IP socket, acquire
only a read lock on the inpcb.

When an external module requests a read lock, acquire only a read lock.

MFC after:	3 months
2008-04-19 14:34:38 +00:00
Robert Watson
b27c1c8db7 Provide more detailed information about each procstat(1) display mode,
including a key to fields in each mode and flag abbreviations.

MFC after:	3 days
X-MFC-note:	POSIX shared memory memory objects aren't in 7-STABLE yet
2008-04-19 13:40:42 +00:00
Robert Watson
ba8ca9db9c It is a bug that procstat(8) works only on live kernels and not crashdumps;
document in case anyone wants to work on fixing this.

MFC after:	3 days
2008-04-19 12:39:15 +00:00
Yoshihiro Takahashi
56436510eb MFi386: Merge yet another the RTC related work.
Split the pcrtc driver into pcrtc.c which is repo-copied from clock.c
2008-04-19 08:18:47 +00:00
Peter Wemm
3bf67daaf3 Put in a real isa_irq_pending() stub in order to remove two lines of dmesg
noise from sio per unit.  sio likes to probe if interrupts are configured
correctly by looking at the pending bits of the atpic in order to put a
non-fatal warning on the console.  I think I'd rather read the pending
bits from the apics, but I'm not sure its worth the hassle.
2008-04-19 07:25:57 +00:00
Ruslan Ermilov
5b30d6ca77 Don't forget to free() currency_symbol and asciivalue when multiple
conversion specifiers for them are present.

Submitted by:	Maxim Dounin <mdounin@mdounin.ru>
Obtained from:	NetBSD (partially)
MFC after:	3 days
2008-04-19 07:22:58 +00:00
Ruslan Ermilov
3890416f9c Better strfmon(3) conversion specifiers sanity checking.
There were no checks for left and right precisions at all, and
a check for field width had integer overflow bug.

Reported by:	Maksymilian Arciemowicz
Security:	http://securityreason.com/achievement_securityalert/53
Submitted by:	Maxim Dounin <mdounin@mdounin.ru>
MFC after:	3 days
2008-04-19 07:18:22 +00:00
Alexander Motin
a04e98468d ng_address_hook() microoptimization. Use local variables as they should be.
It helps compiller to avoid some extra memory accesses.
2008-04-19 05:30:49 +00:00
Yoshihiro Takahashi
a447fa875d Remove my copyright. This file includes simply i386's one now. 2008-04-19 05:07:50 +00:00
Marcel Moolenaar
fca1689378 Sanitize the malloc types: M_PMAP is not used in pmap.c, so don't
define it there. Don't use M_PMAP in mp_machdep.c; define M_SMP
instead.
2008-04-19 04:56:16 +00:00
Kip Macy
6d294e500e remove kdb_backtrace() call 2008-04-19 03:43:06 +00:00
Kip Macy
73a0d5896e move tcbinfo lock acquisition in to syncache 2008-04-19 03:39:17 +00:00
Kip Macy
46b0a854cc move cxgb_lt2.[ch] from NIC to TOE
move most offload functionality from NIC to TOE
factor out all socket and inpcb direct access
factor out access to locking in incpb, pcbinfo, and sockbuf
2008-04-19 03:22:43 +00:00
Søren Schmidt
3d970c5c0e Fix the breakage that caused AHCI devices to vanish. Editor droppings :(
Put the ATAPI device numbering back to the old ways.
2008-04-18 15:15:04 +00:00
Jeff Roberson
66247efa5a - Add inlines for the monitor and mwait instructions.
Sponsored by:	Nokia
2008-04-18 05:47:56 +00:00
Marcel Moolenaar
6bdf667b51 Remove cruft we got from Alpha, which was probably inherited
from NetBSD. I.e. make it more like a FreeBSD header.
2008-04-18 02:21:11 +00:00
David Xu
21afeb89d9 Add missing function prototype for tcgetsid(). 2008-04-18 02:02:33 +00:00
Marcel Moolenaar
468390dffd Add support for the 32-bit EFI target. 2008-04-17 23:36:35 +00:00
George V. Neville-Neil
0327aeb9e3 Add in check for loopback as well, which was missing from the original patch.
PR: 120958
Submitted by: James Snow <snow at teardrop.org>
MFC after: 2 weeks
2008-04-17 23:24:58 +00:00
Garance A Drosehn
a414225db1 Add the '-u name' option to the env command, which will completely unset
the given variable name (removing it from the environment, instead of
just setting it to a null value).

PR:		bin/65649
MFC after:	2 weeks
2008-04-17 23:17:09 +00:00
Coleman Kane
12b6a0f87c Change the 1 in callout_init to CALLOUT_MPSAFE. I made the change in my
tree, but never committed it into git before making my patch!

Submitted by:	thompsa
MFC after:	1 month
2008-04-17 22:57:33 +00:00
John Baldwin
1e98f88776 Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into
__sFILE.  This was supposed to be done in 6.0.  Some notes:
- Where possible I restored the various lines to their pre-__sFILEX state.
- Retire INITEXTRA() and just initialize the wchar bits (orientation and
  mbstate) explicitly instead.  The various places that used INITEXTRA
  didn't need the locking fields or _up initialized.  (Some places needed
  _up to exist and not be off the end of a NULL or garbage pointer, but
  they didn't require it to be initialized to a specific value.)
- For now, stdio.h "knows" that pthread_t is a 'struct pthread *' to
  avoid namespace pollution of including all the pthread types in stdio.h.
  Once we remove all the inlines and make __sFILE private it can go back
  to using pthread_t, etc.
- This does not remove any of the inlines currently and does not change
  any of the public ABI of 'FILE'.

MFC after:	1 month
Reviewed by:	peter
2008-04-17 22:17:54 +00:00
Coleman Kane
aba7c5b84b Change the timeout(9) usage in if_ndis to a callout(9) implementation,
as the former is becoming deprecated and exhibits some extraneous
Giant-locking. The new callout(9) is declared MPSAFE, so it may
improve concurrency.

Tested by:	matteo
Silence from:	wpaul
MFC after:	1 month
2008-04-17 22:01:38 +00:00
Robert Watson
8501a69cc9 Convert pcbinfo and inpcb mutexes to rwlocks, and modify macros to
explicitly select write locking for all use of the inpcb mutex.
Update some pcbinfo lock assertions to assert locked rather than
write-locked, although in practice almost all uses of the pcbinfo
rwlock main exclusive, and all instances of inpcb lock acquisition
are exclusive.

This change should introduce (ideally) little functional change.
However, it lays the groundwork for significantly increased
parallelism in the TCP/IP code.

MFC after:	3 months
Tested by:	kris (superset of committered patch)
2008-04-17 21:38:18 +00:00
Pawel Jakub Dawidek
f55f27f862 Allow linker_search_symbol_name() to be called with KLD lock held.
The linker_search_symbol_name() function is used by stack_print()
and stack_print() can be called from kernel module unload method.

MFC after:	1 week
2008-04-17 19:19:40 +00:00
John Baldwin
7266fe16da Specifically mark the members of 'FILE' that are accessed via inline
functions or macros since they are part of the public ABI as a result.

MFC after:	1 month
2008-04-17 19:06:00 +00:00
Søren Schmidt
1b164f3101 Alloc two DMA slots pr default, silly me forgot that slaves still exists. 2008-04-17 18:11:47 +00:00
George V. Neville-Neil
6b9ff6b7a7 Clean up the code that checks the types of address so that it is
done by understandable macros.

Fix the bug that prevented the system from responding on interfaces with
link local addresses assigned.

PR: 120958
Submitted by: James Snow <snow at teardrop.org>
MFC after: 2 weeks
2008-04-17 12:50:42 +00:00
Marius Strobl
9d9a12b8d1 On sparc64 machines with multiple host-PCI-bridges these bridges
have separate configuration spaces so by definition they implement
different PCI domains. Thus change psycho(4) to use PCI domains
instead of reenumerating all PCI busses so they have globally unique
bus numbers and drop support for reenumerating busses in the OFW PCI
code.
According to CVS history reenumeration was also required in order to
get some E450 to boot but given that no other open source kernel
changes the PCI bus numbers assigned by the firmware I believe the
real problem was that the old code used the bus number as the device
number for the PCI busses and unlike most of the other machines the
firmwares of the problematic ones don't use disjoint PCI bus numbers
across the host-PCI-bridges.

MFC after:	1 month
2008-04-17 12:38:00 +00:00
Søren Schmidt
104c094e06 Go back to preallocating everything possible on init.
This avoids calling busdma in the request processing path which caused a traumatic performance degradation.
Allocation has be postponed to after we know how many devices we possible can have on portmulitpliers to save some space.
2008-04-17 12:29:35 +00:00
Jeff Roberson
1690c6c1be - Add a metric to describe how busy a processor has been over the last
two ticks by counting the number of switches and the load when
   sched_clock() is called.
 - If the busy metric exceeds a threshold allow the idle thread to spin
   waiting for new work for a brief period to avoid using IPIs.  This
   reduces the cost on the sender and receiver as well as reducing wakeup
   latency considerably when it works.

Sponsored by:	Nokia
2008-04-17 09:56:01 +00:00
Jeff Roberson
8df78c41d6 - Make SCHED_STATS more generic by adding a wrapper to create the
variables and sysctl nodes.
 - In reset walk the children of kern_sched_stats and reset the counters
   via the oid_arg1 pointer.  This allows us to add arbitrary counters to
   the tree and still reset them properly.
 - Define a set of switch types to be passed with flags to mi_switch().
   These types are named SWT_*.  These types correspond to SCHED_STATS
   counters and are automatically handled in this way.
 - Make the new SWT_ types more specific than the older switch stats.
   There are now stats for idle switches, remote idle wakeups, remote
   preemption ithreads idling, etc.
 - Add switch statistics for ULE's pickcpu algorithm.  These stats include
   how much migration there is, how often affinity was successful, how
   often threads were migrated to the local cpu on wakeup, etc.

Sponsored by:	Nokia
2008-04-17 04:20:10 +00:00
Xin LI
f86476aa7d Mention bzip2 1.0.5 MFC. 2008-04-17 01:02:03 +00:00
Marcel Moolenaar
5b43c63ded Simplify the pmap_zero_page family of functions by making use of
the fact that we have a 1:1 mapping by virtue of the BATs.
Eliminate the now unused moea_rkva_alloc(), moea_pa_map() and
moea_pa_unmap() functions.

Pointed out by: grehan.
2008-04-17 00:37:40 +00:00
Marcel Moolenaar
014ffa990d Allocate a stack (with optional guard pages) for thread0 and
switch to it before calling mi_startup().
2008-04-16 23:28:12 +00:00
Stanislav Sedov
640bd7d7d7 - Correctly destroy assoiciated ucom device on detach.
MFC after:	2 weeks
Reported by:	Ilya Bakulin <webmaster@kibab.com>
Approved by:	imp, cognet
2008-04-16 21:15:10 +00:00
Alexander Motin
6aa6d011e4 Use separate UMA zone for data items allocation. It is a partial
rev. 1.149 rework.
It allows to save several percents of CPU time on SMP by using UMA's
internal per-CPU allocation limits instead of own global variable
each time updated with atomics.

Tested with:    Netperf cluster
2008-04-16 19:52:29 +00:00
Jung-uk Kim
01c3b1b200 Regenerate. 2008-04-16 19:27:36 +00:00