Commit Graph

163645 Commits

Author SHA1 Message Date
Nathan Whitehorn
17763042e4 The POWER7 has only 32 SLB slots instead of 64, like other supported
64-bit PowerPC CPUs. Add infrastructure to support variable numbers of
SLB slots and move the user slot from 63 to 0, so that it is always
available.
2011-06-02 14:25:52 +00:00
Bjoern A. Zeeb
d63d020e22 Write the multi step netconfig to a temporary file and only move that
to the final name if netconfig was completely finished.  This fixes
reentrance problems even better than r222611.

Suggested by:	nwhitehorn
Reviewed by:	nwhitehorn
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
2011-06-02 14:25:27 +00:00
Nathan Whitehorn
1dff98d9bb If running under a hypervisor, don't yell at the user about starting
unknown CPU types, instead relying on the hypervisor to have given us a
reasonable environment.
2011-06-02 14:23:36 +00:00
Nathan Whitehorn
0d7136ba72 Missed file in r222613. 2011-06-02 14:22:00 +00:00
Nathan Whitehorn
20ae1015b9 Explicitly initialize the first thread's MSR to PSL_KERNSET. 2011-06-02 14:21:20 +00:00
Nathan Whitehorn
6dd24ab3f1 Include the modules area in the mapped kernel code. This fixes the kernel's
access to modules and loader metadata when started from real mode, but
without a direct map.
2011-06-02 14:19:18 +00:00
Nathan Whitehorn
97f7cde42c Remove some dead code: unnecessary isyncs and memory sorting, which are
handled in mtmsr() and mem_regions(), respectively.
2011-06-02 14:15:44 +00:00
Nathan Whitehorn
1787909001 MFpseries:
Renovate and improve the AIM Open Firmware support:
- Add RTAS (Run-Time Abstraction Services) support, found on all IBM systems
  and some Apple ones
- Improve support for 32-bit real mode Open Firmware systems
- Pull some more OF bits over from the AIM directory
- Fix memory detection on IBM LPARs and systems with more than one /memory
  node (by andreast@)
2011-06-02 14:12:37 +00:00
Bjoern A. Zeeb
f0cdc18176 Empty the network configuration only after the user decided to pick an
interface.  Otherwise an accidental start of the netowrk configuration
and immediate cancel after the install has finished removes the previously
configured settings.

Discussed with:	nwhitehorn
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
2011-06-02 14:08:50 +00:00
Nathan Whitehorn
7c8aaa5b71 Fix opening a shell on the new system (prevent the shell's stderr from
ending up in the install log).
2011-06-02 13:57:49 +00:00
Andrey V. Elsukov
d15033b3f8 Do not hide stripeoffset from libgeom(3), it may be useful even when
stripesize is zero.

MFC after:	1 week
2011-06-02 12:49:45 +00:00
Robert Watson
b598155a85 Do not leak the pcbinfohash lock in the case where in6_pcbladdr() returns
an error during TCP connect(2) on an IPv6 socket.

Submitted by:	bz
Sponsored by:	Juniper Networks, Inc.
2011-06-02 10:21:05 +00:00
Ulrich Spörlein
3d12096812 Fix man -t by not passing grotty flags to groff when grotty is not
involved.

This fixes a regression introduced with r221303.

Noticed by:	jilles
2011-06-02 10:18:49 +00:00
Ulrich Spörlein
135bce2a9e mdoc: reorder sections consistently 2011-06-02 09:56:53 +00:00
Ulrich Spörlein
b2e52ced25 mdoc: fix markup 2011-06-02 09:56:42 +00:00
Jack F Vogel
6c49040200 Cut and paste mistake corrected. 2011-06-02 05:31:54 +00:00
Ed Maste
aacea6e251 There are a couple of structs in mfireg.h with members named 'class'.
These cause problems when trying to include the header in a C++ project.
Rename them to 'evt_class', and track the change in mfi and mfiutil.

Submitted by:	Mark Johnston
Sponsored by:	Sandvine Incorporated
Reviewed by:	jhb@
MFC after:	1 week
2011-06-02 00:43:16 +00:00
Jack F Vogel
b6582d0066 First off: update the driver README, the old one was horribly
crusty, and this still isn't perfect, but its at least a bit
more recent.

Secondly, a few improvements to the driver from Andrew Boyer,
support hint to allow devices to not attach, add VLAN_HWTSO
capability so vlans can use TSO, fix in the interrupt handler
to make sure the stack TX queue is processed. Oh, and also
make sure IPv6 does not cause a re-init in the ioctl routine.
Thanks for your efforts Andrew!

Thanks to Claudio Jeker for noticing the ixgbe_xmit() routine
was not correctly swapping the dma map from the first to the
last descriptor in a multi-descriptor transmission, corrected
this.
2011-06-02 00:34:57 +00:00
Konstantin Belousov
031ec8c10a In the VOP_PUTPAGES() implementations, change the default error from
VM_PAGER_AGAIN to VM_PAGER_ERROR for the uwritten pages. Return
VM_PAGER_AGAIN for the partially written page. Always forward at least
one page in the loop of vm_object_page_clean().

VM_PAGER_ERROR causes the page reactivation and does not clear the
page dirty state, so the write is not lost.

The change fixes an infinite loop in vm_object_page_clean() when the
filesystem returns permanent errors for some page writes.

Reported and tested by:	gavin
Reviewed by:	alc, rmacklem
MFC after:	1 week
2011-06-01 21:00:28 +00:00
Adrian Chadd
48237774e4 Flesh out the radar detection related operations for the ath driver.
This is in no way a complete DFS/radar detection implementation!
It merely creates an abstracted interface which allows for future
development of the DFS radar detection code.

Note: Net80211 already handles the bulk of the DFS machinery,
all we need to do here is figure out that a radar event has occured
and inform it as such. It then drives the DFS state engine for us.

The "null" DFS radar detection module is included by default;
it doesn't require a device line.

This commit:

* Adds a simple abstracted layer for radar detection state -
  sys/dev/ath/ath_dfs/;
* Implements a null DFS module which doesn't do anything;
  (ie, implements the exact behaviour at the moment);
* Adds hooks to the ath driver to process received radar events
  and gives the DFS module a chance to determine whether
  a radar has been detected.

Obtained from:	Atheros
2011-06-01 20:09:49 +00:00
Adrian Chadd
2cb5233b43 Add some missing DFS chipset functionality to the FreeBSD HAL.
Please note - this doesn't in any way constitute a full DFS
implementation, it merely adds the relevant capability bits and
radar detection threshold register access.

The particulars:

* Add new capability bits outlining what the DFS capabilities
  are of the various chipsets.
* Add HAL methods to set and get the radar related register values.
* Add AR5212 and AR5416+ DFS radar related register value
  routines.
* Add a missing HAL phy error code that's related to radar event
  processing.
* Add HAL_PHYERR_PARAM, a data type that encapsulates the radar
  register values.

The AR5212 routines are just for completeness. The AR5416 routines
are a super-set of those; I may later on do a drive-by pass to
tidy up duplicate code.

Obtained from:	Linux, Atheros
2011-06-01 20:01:02 +00:00
Robert Watson
6cb52192fe Add an optional netisr dispatch point at ether_input(), but set the
default dispatch method to NETISR_DISPATCH_DIRECT in order to force
direct dispatch.  This adds a fairly negligble overhead without
changing default behavior, but in the future will allow deferred or
hybrid dispatch to other worker threads before link layer processing
has taken place.

For example, this could allow redistribution using RSS hashes
without ethernet header cache line hits, if the NIC was unable to
adequately implement load balancing to too small a number of input
queues -- perhaps due to hard queueset counts of 1, 3, or 8, but in
a modern system with 16-128 threads.  This can happen on highly
threaded systems, where you want want an ithread per core,
redistributing work to other queues, but also on virtualised systems
where hardware hashing is (or is not) available, but only a single
queue has been directed to one VCPU on a VM.

Note: this adds a previously non-present assertion about the
equivalence of the ifnet from which the packet is received, and the
ifnet stamped in the mbuf header.  I believe this assertion to
generally be true, but we'll find out soon -- if it's not, we might
have to add additional overhead in some cases to add an m_tag with
the originating ifnet pointer stored in it.

Reviewed by:    bz
MFC after:      3 weeks
Sponsored by:   Juniper Networks, Inc.
2011-06-01 20:00:25 +00:00
Andrey V. Elsukov
281d42c371 O_FORWARD_IP is only action which depends from the result of lookup of
dynamic rules. We are doing forwarding in the following cases:
 o For the simple ipfw fwd rule, e.g.

	fwd 10.0.0.1 ip from any to any out xmit em0
	fwd 127.0.0.1,3128 tcp from any to any 80 in recv em1

 o For the dynamic fwd rule, e.g.

 	fwd 192.168.0.1 tcp from any to 10.0.0.3 3333 setup keep-state

        When this rule triggers it creates a dynamic rule, but this
	dynamic rule should forward packets only in forward direction.

 o And the last case that does not work before - simple fwd rule which
 triggers when some dynamic rule is already executed.

PR:		kern/147720, kern/150798
MFC after:	1 month
2011-06-01 19:44:52 +00:00
Pyun YongHyeon
082b754397 Poke correct GPIO pins for newer axe(4) controllers with Marvell
PHY. Newer models seem to use different LED mode that requires
enabling both GPIO1 and GPIO2.

Tested by:	marcel
2011-06-01 18:42:44 +00:00
Hans Petter Selasky
0c38ca8cf4 Add support for new USB serial driver.
Submitted by:	Lev Serebryakov, lev @
MFC after:	14 days
2011-06-01 17:58:27 +00:00
Jaakko Heinonen
b2ce2d693f Don't try to close the stream if fopen(3) fails.
PR:		bin/155349
Submitted by:	Urankar Mikael
2011-06-01 15:48:43 +00:00
Andrey V. Elsukov
88eb7833cb Hide some debug messages under debug macro.
MFC after:	1 week
2011-06-01 12:33:05 +00:00
Andrey V. Elsukov
e35a05d3e7 Hide useless warning under debug macro.
PR:		kern/69963
MFC after:	1 week
2011-06-01 12:05:35 +00:00
Jayachandran C.
d38ea3bc9e Add .interp back into INITIAL_READONLY_SECTIONS in MIPS n64 ABI.
The binutils update in r218822 caused the MIPS n64 dynamic binaries to
fail because the ".interp" section is not in the initial sections.
This happens because elf64bmip-defs.sh overrides INITIAL_READONLY_SECTIONS
to add ".MIPS.options" sections instead of the ".reginfo" section used
by n32.
This used to work fine, but after r218822, INITIAL_READONLY_SECTIONS also
contains the .interp section, so the override has to be done differently.

Reported by : aduane at juniper

Obtained from:	gonzo (Initial version)
2011-06-01 10:23:03 +00:00
Navdeep Parhar
272cba15b8 Provide hit-count with rest of the information about a filter.
MFC after:	1 week
2011-06-01 01:32:58 +00:00
Navdeep Parhar
136e410ceb Firmware device log.
# sysctl dev.t4nex.0.devlog

MFC after:	mdf's sysctl+sbuf changes are MFC'd
2011-05-31 23:49:13 +00:00
Kenneth D. Merry
534917efef Fix a bug introduced in revision 222537.
In msgbuf_reinit() and msgbuf_init(), we weren't initializing the mutex.
Depending on the contents of memory, the LO_INITIALIZED flag might be
set on the mutex (either due to a warm reboot, and the message buffer
remaining in place, or due to garbage in memory) and in that case, with
INVARIANTS turned on, we would trigger an assertion that the mutex had
already been initialized.

Fix this by bzeroing the message buffer mutex for the _init() and _reinit()
paths.

Reported by:	mdf
2011-05-31 22:39:32 +00:00
Jung-uk Kim
42e58c0372 Merge ACPICA 20110527. 2011-05-31 19:45:58 +00:00
Bernhard Schmidt
129145a426 Add module version to iwi/ipw/wpi and iwn.
The version is used to check if a module is already preset, not setting
it results in:

can't re-use a leaf (ipw)!
module_register: module pci/ipw already exists!
Module pci/ipw failed to register: 17

while trying to load the module due to an entry in loader.conf. With this
commit we get the expected:

module ipw already present!

Reported by:	Dru Lavigne, bz
Tested by:	bz
MFC after:	1 week
2011-05-31 19:08:25 +00:00
Pyun YongHyeon
20e43c4aac If driver is not running, disable interrupts and do not try to
process received frames.  Previously it was possible to handle RX
interrupts even if controller is not fully initialized. This
resulted in non-working driver after system is up and running.

Reported by:	hselasky
Tested by:	hselasky
2011-05-31 18:45:15 +00:00
Rick Macklem
6b43e31fe7 Add a sentence to the umount.8 man page to clarify the behaviour
for forced dismount when used on an NFS mount point. Requested by
Jeremy Chadwick.
This is a content change.

MFC after:	2 weeks
2011-05-31 18:27:18 +00:00
Rick Macklem
b398d10657 Fix the new NFS client so that it doesn't do an NFSv3
Pathconf RPC for cases where the reply doesn't include
the answer. This fixes a problem reported by avg@ where
the NFSv3 Pathconf RPC would fail when "ls -l" did an
lpathconf(2) for _PC_ACL_NFS4.

Tested by:	avg
MFC after:	2 weeks
2011-05-31 17:43:25 +00:00
Jung-uk Kim
eb16cf140e Import ACPICA 20110527. 2011-05-31 17:33:30 +00:00
Kenneth D. Merry
d42a4eb507 Fix apparent garbage in the message buffer.
While we have had a fix in place (options PRINTF_BUFR_SIZE=128) to fix
scrambled console output, the message buffer and syslog were still getting
log messages one character at a time.  While all of the characters still
made it into the log (courtesy of atomic operations), they were often
interleaved when there were multiple threads writing to the buffer at the
same time.

This fixes message buffer accesses to use buffering logic as well, so that
strings that are less than PRINTF_BUFR_SIZE will be put into the message
buffer atomically.  So now dmesg output should look the same as console
output.

subr_msgbuf.c:		Convert most message buffer calls to use a new spin
			lock instead of atomic variables in some places.

			Add a new routine, msgbuf_addstr(), that adds a
			NUL-terminated string to a message buffer.  This
			takes a priority argument, which allows us to
			eliminate some races (at least in the the string
			at a time case) that are present in the
			implementation of msglogchar().  (dangling and
			lastpri are static variables, and are subject to
			races when multiple callers are present.)

			msgbuf_addstr() also allows the caller to request
			that carriage returns be stripped out of the
			string.  This matches the behavior of msglogchar(),
			but in testing so far it doesn't appear that any
			newlines are being stripped out.  So the carriage
			return removal functionality may be a candidate
			for removal later on if further analysis shows
			that it isn't necessary.

subr_prf.c:		Add a new msglogstr() routine that calls
			msgbuf_logstr().

			Rename putcons() to putbuf().  This now handles
			buffered output to the message log as well as
			the console.  Also, remove the logic in putcons()
			(now putbuf()) that added a carriage return before
			a newline.  The console path was the only path that
			needed it, and cnputc() (called by cnputs())
			already adds a carriage return.  So this
			duplication resulted in kernel-generated console
			output lines ending in '\r''\r''\n'.

			Refactor putchar() to handle the new buffering
			scheme.

			Add buffering to log().

			Change log_console() to use msglogstr() instead of
			msglogchar().  Don't add extra newlines by default
			in log_console().  Hide that behavior behind a
			tunable/sysctl (kern.log_console_add_linefeed) for
			those who would like the old behavior.  The old
			behavior led to the insertion of extra newlines
			for log output for programs that print out a
			string, and then a trailing newline on a separate
			write.  (This is visible with dmesg -a.)

msgbuf.h:		Add a prototype for msgbuf_addstr().

			Add three new fields to struct msgbuf, msg_needsnl,
			msg_lastpri and msg_lock.  The first two are needed
			for log message functionality previously handled
			by msglogchar().  (Which is still active if
			buffering isn't enabled.)

			Include sys/lock.h and sys/mutex.h for the new
			mutex.

Reviewed by:	gibbs
2011-05-31 17:29:58 +00:00
Warner Losh
1d6fbefd90 Don't need (and can't use) -L to copy links here. 2011-05-31 17:14:06 +00:00
Warner Losh
f471745a98 Fix a couple of spelling errors.
Submitted by:	bcr@
2011-05-31 16:59:14 +00:00
John Baldwin
35b23f5d86 - Document the -H option and 'H' key alongside other options and keys
rather than at the bottom of the manpage.
- Remove an obsolete comment about SWAIT being a stale state.  It was
  resurrected for a different purpose in FreeBSD 5 to mark idle ithreads.
- Add a comment documenting that the SLEEP and LOCK states typically
  display the name of the event being waited on with lock names being
  prefixed with an asterisk and sleep event names not having a prefix.

MFC after:	1 week
2011-05-31 15:41:10 +00:00
Nathan Whitehorn
d098f93019 On multi-core, multi-threaded PPC systems, it is important that the threads
be brought up in the order they are enumerated in the device tree (in
particular, that thread 0 on each core be brought up first). The SLIST
through which we loop to start the CPUs has all of its entries added with
SLIST_INSERT_HEAD(), which means it is in reverse order of enumeration
and so AP startup would always fail in such situations (causing a machine
check or RTAS failure). Fix this by changing the SLIST into an STAILQ,
and inserting new CPUs at the end.

Reviewed by:	jhb
2011-05-31 15:11:43 +00:00
John Baldwin
c9385548e7 Add a new option to toggle the display of the system idle process (per-CPU
idle threads).  The process is displayed by default (subject to whether or
not system processes are displayed) to preserve existing behavior.  The
system idle process can be hidden via the '-z' command line argument or the
'z' key while top is running.  When it is hidden, top more closely matches
the behavior of FreeBSD <= 4.x where idle time was not accounted to any
process.

MFC after:	2 weeks
2011-05-31 15:11:23 +00:00
Bjoern A. Zeeb
06034940f5 Remove some further INET related symbols from pf to allow the module
to not only compile bu load as well for testing with IPv6-only kernels.
For the moment we ignore the csum change in pf_ioctl.c given the
pending update to pf45.

Reported by:	dru
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	20 days
2011-05-31 15:05:29 +00:00
Bjoern A. Zeeb
decedfc4f9 Start teaching pc-sysinstall about IPv6.
Add some additional empty string checks for IPv4 and try to configure
a netmask along with the address rather than doing things twice.

Contrary to AUTO-DHCP, IPv6-SLAAC will accept static configuration
as well, which we will use at least for resolv.conf currently and
if we were given a static address configure that as an alias as well.

The pc-sysinstaller changes going along were committed to PC-BSD as r10773.

Reviewed by:	kmoore
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	20 days
2011-05-31 15:02:30 +00:00
Bjoern A. Zeeb
5af3fa9a5f Conditionally compile in the af_inet and af_inet6, af_nd6 modules.
If compiled in for dual-stack use, test with feature_present(3)
to see if we should register the IPv4/IPv6 address family related
options.

In case there is no "inet" support we would love to go with the
usage() and make the address family mandatory (as it is for anything
but inet in theory).  Unfortunately people are used to
  ifconfig IF up/down
etc. as well, so use a fallback of "link".  Adjust the man page
to reflect these minor details.

Improve error handling printing a warning in addition to the usage
telling that we do not know the given address family in two places.

Reviewed by:	hrs, rwatson
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	2 weeks
2011-05-31 14:40:21 +00:00
Nathan Whitehorn
d408a341b2 It is generally considered useful for release media to have kernels on them.
Submitted by:	joel
2011-05-31 12:59:15 +00:00
Alexander Motin
d3a460d36c Add quirks to hint 4K physical sector (Advanced Format) for ATA disks not
reporting it properly (none? of known disks now).

Hitachi and WDC AF disks seem could be identified more or less formally.
For Seagate and Samsung enumerate some found models/series.
For other disks it can be forced with kern.cam.ada.X.quirks=1 tunable.
2011-05-31 09:22:52 +00:00
Benedict Reuschling
6b436e6252 Minor wording adjustments to usbdump(8).
PR:		docs/157317
Submitted by:	Warren Block (wblock at wonkity dot com)
Reviewed by:	hps@
MFC after:	5 days
2011-05-31 07:13:07 +00:00