Commit Graph

168583 Commits

Author SHA1 Message Date
Christian Brueffer
026dbd291e Switch the license boilerplates to our standard one.
Advantages:
- Reduces the number of different license versions in the tree
- Eliminates a typo
- Removes some incorrect author attributions due to c/p
- Removes c/p error potential for future pmc manpages

Approved by:	jkoshy, gnn, rpaulo, fabient (copyright holders)
MFC after:	1 week
2012-02-17 11:09:51 +00:00
Konstantin Belousov
ab8f652cd7 Document dl_iterate_phdr(3).
Man page is based on the OpenBSD version, extended and corrected for
the FreeBSD implementation.

MFC after:  2 weeks
2012-02-17 10:51:40 +00:00
Konstantin Belousov
a7d61fc17d Fetch the aux vector for the static libc, and use the entries to
initialize the cache of the system information as it was done for the
dynamic libc. This removes several sysctls from the static binary
startup.

Use the aux vector to fill the single struct dl_phdr_info describing
the static binary itself, to implement dl_iterate_phdr(3) for the
static binaries. [1]

Based on the submission by:	John Marino <draco marino st> [1]
Tested by:   flo (sparc64)
MFC after:	2 weeks
2012-02-17 10:49:29 +00:00
Adrian Chadd
2a4106cfef Fix the return type.
Submitted by:	arundel
Found by:	clang/llvm
2012-02-17 08:45:08 +00:00
Adrian Chadd
caee7d9ca4 Fix up this local copy of statfoo to support > 128 statistics.
This allows all of the athstats statistics to work again.

Specifics:

* The previous code used chars < 0x80 as printable, and chars >= 0x80
  as "statistics"
* .. which meant any statistic above 127 would wrap around to 0;
* .. so once I added the 802.11n TX/RX statistics to athstats, the tail
  end of the statistics list weren't accessible.

This patch:

* adds a define which represents the magic character, rather than a hard
  coded one
* the statistic in question is little endian encoded after the magic
  character.

Notes:

* statfoo is useful enough to possibly warrant turning into a library API.
2012-02-17 08:24:58 +00:00
Doug Barton
81ed1a1e1b Increase the default shutdown timer to 90 seconds. This will allow
certain systems that take a long time to shut down, without adversely
affecting things that shut down quickly. It's also 30 seconds less than
the default hard limit of 120 seconds in kern.init_shutdown_timeout.

PR:		conf/109272
Submitted by:	Radim Kolar SF.NET <hsn@sendmail.cz>
2012-02-17 07:59:37 +00:00
Sean Bruno
da6793f807 During work to port isci(4) to stable/7 I noted that the maxio portion of
struct ccb_pathinq from sys/cam/cam_ccb.h wasn't added to stable/7 at all
and didn't appear in stable/8 until svn R195534.  Since __FreeBSD_version
did not get bumped until svn R195634, assume that maxio is valid at 800102
or higher.

Obtained from:	Yahoo! Inc.
MFC after: 0 days
2012-02-17 06:47:16 +00:00
Bjoern A. Zeeb
d3373029e2 Add regression tests scripts for multi-IP FIBs exercising the send,
receive and forward path tagging packets with both the ifconfig fib
option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and
testing both setfib(2) as well as the SO_SETFIB socket option.

At 16 FIBs a total of over 64k return codes/replies/stati are checked,
sometimes multiple times (in different ways, e.g. the reflected request
as well as ipfw counter values).

The scripts need two or three machines to run and are thus not added
to the tools/regression framework but only to tools/test.

Sponsored by:	Cisco Systems, Inc.
2012-02-17 04:26:24 +00:00
Adrian Chadd
e78719adf9 Enforce some consistent ordering and handling of interrupt disable/enable
with RX/TX halting.

* Always disable/enable interrupts during a channel change, just to simply
  things.

* Ensure that the ath taskqueue has completed and is paused before
  continuing.

This dramatically reduces the instances of overlapping RX and reset
conditions.

PR:	kern/165220
2012-02-17 03:46:38 +00:00
Bjoern A. Zeeb
e6f0fd5898 Add regression tests for the setsockopt(2) SO_SETFIB socket option.
Check that the expected domain(9) families all handle the socket option
correctly and do proper bounds checks.  This would catch bugs as fixed
in (r230938,)r230981.

Sponsored by:	Cisco Systems, Inc.
2012-02-17 03:25:26 +00:00
Adrian Chadd
21008bf10d Begin breaking out the txrx stop code into a locked and unlocked variant.
PR:	kern/165220
2012-02-17 03:23:01 +00:00
Bjoern A. Zeeb
e17d7df80d Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:
Extend the so far IPv4-only support for multiple routing tables (FIBs)
introduced in r178888 to IPv6 providing feature parity.

This includes an extended rtalloc(9) KPI for IPv6, the necessary
adjustments to the network stack, and user land support as in netstat.

Sponsored by:	Cisco Systems, Inc.
Reviewed by:	melifaro (basically)
MFC after:	10 days
2012-02-17 02:39:58 +00:00
Eitan Adler
f85a4a2977 Style: prefer the use of line continuations to +=
Requested by:	marcel, dougb, bde
Approved by:	cperciva
MFC after:	3 days
2012-02-17 01:21:08 +00:00
Bjoern A. Zeeb
9dba179d5e IFC @231845
Sponsored by:	Cisco Systems, Inc.
2012-02-17 00:27:48 +00:00
Jung-uk Kim
a228e013c3 Fix a stupid typo. 2012-02-16 23:05:09 +00:00
Jung-uk Kim
a159c266a9 Merge ACPICA 20120215. 2012-02-16 22:59:29 +00:00
Jung-uk Kim
1556e63481 Set the initial mode for the adapter after executing VESA BIOS POST.
There is no need to set initial mode for BIOS.
2012-02-16 22:51:44 +00:00
Jung-uk Kim
2f18ee9d47 Make sure the VESA mode number is between 256 and 511 inclusive. 2012-02-16 22:46:00 +00:00
Jung-uk Kim
60474b7b97 Properly check VESA video mode number. 2012-02-16 22:33:53 +00:00
Jung-uk Kim
a7f8112403 Refine r231791. Install the resume event handler unconditionally. 2012-02-16 22:28:17 +00:00
Justin T. Gibbs
443cc4d407 Fix a bug in the calculation of the maximum I/O request size.
The previous code did not limit the I/O request size based on
the maximum number of segments supported by the back-end.  In
current practice, since the only back-end supporting chained
requests is the FreeBSD implementation, this limit was never
exceeded.

sys/dev/xen/blkfront/block.h:
	Add two macros, XBF_SEGS_TO_SIZE() and XBF_SIZE_TO_SEGS(),
	to centralize the logic of reserving a segment to deal with
	non-page-aligned I/Os.

sys/dev/xen/blkfront/blkfront.c:
	o When negotiating transfer parameters, limit the
	  max_request_size we use and publish, if it is greater
	  than the maximum, unaligned, I/O we can support with
	  the number of segments advertised by the backend.
	o Don't unilaterally reduce the I/O size published to
	  the disk layer by a single page.  max_request_size
	  is already properly limited in the transfer parameter
	  negotiation code.
	o Fix typos in printf strings:
		"max_requests_segments" -> "max_request_segments"
		"specificed" -> "specified"

MFC after:	1 day
2012-02-16 21:58:47 +00:00
Ulrich Spörlein
f7e784d50b Fix 'make depend'. 2012-02-16 21:57:50 +00:00
Justin T. Gibbs
e6fe91b5e4 Fix typo in a printf string: "specificed" -> "specified".
MFC after:	1 day
2012-02-16 21:49:28 +00:00
Justin T. Gibbs
8161f482d1 Fix "_" vs. "-" typo in a comment. No functional changes. 2012-02-16 21:47:17 +00:00
Hans Petter Selasky
79fcfd2e54 Add support for filtering USB devices and USB endpoints to the usbdump utility
when making software USB traces.

MFC after: 1 week
2012-02-16 21:18:36 +00:00
Warner Losh
e517a11c27 Fix comma splice, can't ambiguity and quoting.
Submitted by:	bde@
MFC after:	2 weeks
2012-02-16 21:04:47 +00:00
Gleb Smirnoff
687adb703d Refactor the name hash and the ID hash, that are used to address nodes:
- Make hash sizes growable, to satisfy users running large mpd
  installations, having thousands of nodes.
- NG_NAMEHASH() proved to give a very bad distribution in real life
  name sets, while generic hash32_str(name, HASHINIT) proved to give
  an even one, so you the latter for name hash.
- Do not store unnamed nodes in slot 0 of name hash, no reason for that.
- Use the ID hash in cases when we need to run through all nodes: the
  NGM_LISTNODES command and in the vnet_netgraph_uninit().
- Implement NGM_LISTNODES and NGM_LISTNAMES as separate code, the former
  iterates through the ID hash, and the latter through the name hash.
- Keep count of all nodes and of named nodes, so that we don't need
  to count nodes in NGM_LISTNODES and NGM_LISTNAMES. The counters are
  also used to estimate whether we need to grow hashes.
- Close a race between two threads running ng_name_node() assigning same
  name to different nodes.
2012-02-16 19:10:01 +00:00
Gleb Smirnoff
320d00eee8 Specify correct loading order for core of netgraph(4). 2012-02-16 18:54:44 +00:00
Gleb Smirnoff
04fdc6c689 Supply correct "how" argument to the uma_zcreate(). 2012-02-16 18:51:12 +00:00
Adrian Chadd
7a5baabe06 Add a module dependency on wlan.
Submitted by:	monthadar@gmail.com
2012-02-16 16:48:12 +00:00
Gleb Smirnoff
8338a34a82 In ng_getsockaddr() allocate memory prior to obtaining lock.
Reported & tested by:	Mykola Dzham <i levsha.me>
2012-02-16 14:44:52 +00:00
Sergey Kandaurov
262eab04a6 delete-old does not have delete-old-libs dependency.
Reflect this in the comment.

PR:		conf/163993
Submitted by:	Eugen Konkov <kes-kes at yandex ru>
MFC after:	3 days
2012-02-16 14:08:14 +00:00
Alan Cox
a649296959 When vm_mmap() is used to map a vm object into a kernel vm_map, it
makes no sense to check the size of the kernel vm_map against the
user-level resource limits for the calling process.

Reviewed by:	kib
2012-02-16 06:45:51 +00:00
Eitan Adler
c1cb99c965 Fix warning when compiling with gcc46
Approved by:	cperciva
MFC after:	3 days
2012-02-16 05:17:06 +00:00
Eitan Adler
4001564661 Removed unused code: fixes compiler warning with CC=gcc46
error: parameter 'fd' set but not used

Approved by:	cperciva
MFC after:	1 week
2012-02-16 05:17:01 +00:00
Eitan Adler
097cd85002 Don't extract the n_type value from the elf header, since it is never used
Fix warning when compiling with gcc46:
	variable 'type' set but not used

Approved by:	cperciva
MFC after:	3 days
2012-02-16 05:16:55 +00:00
Eitan Adler
f17a6f1b17 Add a timestamp to the msgbuf output in order to determine when when
messages were printed.

This can be enabled with the kern.msgbuf_show_timestamp sysctl

PR:		kern/161553
Reviewed by:	avg
Submitted by:	Arnaud Lacombe <lacombar@gmail.com>
Approved by:	cperciva
MFC after:	1 month
2012-02-16 05:11:35 +00:00
Eitan Adler
9d4261b795 Add err(3) to strerror(3) SEE ALSO section
PR:		docs/164940
Submitted by:	Niclas Zeising <zeising@daemonic.se>
Approved by:	cperciva
MFC after:	3 days
2012-02-16 05:06:07 +00:00
Nathan Whitehorn
c48e7eac15 Make sure to synchronize icache for the newly loaded loader. Not an issue
on most systems, when the relevant icache lines are not full.

MFC after:	2 weeks
2012-02-16 03:27:38 +00:00
Rick Macklem
13b2772f8e Delete a couple of out of date comments that are no longer true in
the new NFS client.

Requested by:	bde
MFC after:	1 week
2012-02-16 02:19:53 +00:00
Jung-uk Kim
5437485bdb Import ACPICA 20120215. 2012-02-16 00:24:10 +00:00
Jung-uk Kim
4ba4ebd0a8 Clean up RFLAG and CR3 register handling and nearby comments. For BSP, use
spinlock_enter()/spinlock_exit() to save/restore RFLAGS.  We know interrupt
is disabled when returning from S3.  For AP, we do not have to save/restore
it because IRET will do it for us any way.  Do not save CR3 locally because
savectx() does it and BSP does not have to switch to kernel map for amd64.
Change contigmalloc(9) flag while I am in the neighborhood.
2012-02-15 23:33:22 +00:00
Luigi Rizzo
5644ccec61 (This commit only touches code within the DEV_NETMAP blocks)
Introduce some functions to map NIC ring indexes into netmap ring
indexes and vice versa. This way we can implement the bound
checks only in one place (and hopefully in a correct way).

On passing, make the code and comments more uniform across the
various drivers.
2012-02-15 23:13:29 +00:00
Jung-uk Kim
a7d022e777 Set up an event handler to turn off speaker if user requested it. Speaker
will stop beeping after all device drivers are resumed.  Use proper API to
"acquire" and "release" PIC timer2 for consistency and correctness.
2012-02-15 22:49:25 +00:00
Jung-uk Kim
b1dd90550d Make ACPI resume beeper less cryptic. Set PIC timer2 mode properly. 2012-02-15 22:10:33 +00:00
Jung-uk Kim
ceb9fa549f Some BIOSes are known for corrupting low 64KB between suspend and resume.
Mask off the first 16 pages unless we appear to be running in a VM.  This
address may be overridden by 'hw.physmem.start' tunable from loader.
Note Linux used to have a BIOS quirk table for this issue but it seems they
made it default recently.
2012-02-15 21:32:05 +00:00
Warner Losh
c693bd2ff6 Wordsmith the can't find kernel error message, and suggest which
variable to set to override.
2012-02-15 21:20:58 +00:00
Luigi Rizzo
4b0a800988 reduce the differences between these three files.
The three drivers (em, lem and igb) are extremely similar, too bad
that the structures use different names and we cannot share the code.
2012-02-15 18:59:26 +00:00
Xin LI
601e0f587d Bump .Dd date for previous revision. 2012-02-15 18:34:57 +00:00
Nathan Whitehorn
bc85eb26b3 Improve error handling in smusat(4).
MFC after:	4 days
2012-02-15 16:59:24 +00:00