Commit Graph

149937 Commits

Author SHA1 Message Date
Andriy Gapon
66d19b8579 MFC r200052: ichsmb: add pci ids for some newer supported hardware 2009-12-08 15:14:55 +00:00
Nathan Whitehorn
496ef31252 MFC r199886:
Add a CPU features framework on PowerPC and simplify CPU setup a little
more. This provides three new sysctls to user space:
hw.cpu_features - A bitmask of available CPU features
hw.floatingpoint - Whether or not there is hardware FP support
hw.altivec - Whether or not Altivec is available

PR:		powerpc/139154
2009-12-08 05:37:08 +00:00
Nathan Whitehorn
3c2ef79634 MFC r198678:
ake procstat -k work on PowerPC by avoiding mistakenly using signed
compares with a low address (0x1000) and a high address
(the KVA kernel stack).
2009-12-08 05:32:44 +00:00
Nathan Whitehorn
e9962146c6 MFC r198445:
Turn on NAP mode on G5 systems, and refactor the HID0 setup code a little.
This makes my G5 Xserve sound slightly less like it is filled with
howling banshees.

MFC r198968:

Unbreak E500 builds. The inline assembly for the 970 CPUs
is invalid when compiling for BookE.

MFC r199533:

Fix cpuid output on E500 core.
2009-12-08 05:27:06 +00:00
Nathan Whitehorn
3958967343 MFC r198444:
Allow Heathrow-based machines to boot a kernel containing option SMP
without panicing.
2009-12-08 05:23:07 +00:00
Nathan Whitehorn
9ad8053be5 MFC r200070:
Add manpages for ams(4), akbd(4), adb(4), and cuda(4), which describe
various drivers for Apple Desktop Bus controllers and peripherals.
2009-12-08 05:18:59 +00:00
Fabien Thomas
86cff089e7 MFC 200060:
Use a better check for a valid kernel stack address when capturing
kernel call chains.
2009-12-07 20:49:49 +00:00
Fabien Thomas
d7fbf69d96 MFC 198433:
Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function
counters.  For such CPUs, use an alternate mapping of convenience
names to events supported by PMC_CLASS_IAP programmable counters.
2009-12-07 20:44:43 +00:00
Fabien Thomas
29439ac7a1 MFC 198432:
Only claim that the PMC_CLASS_IAF PMCs are supported by a CPU if
there are PMCs on the CPU that belong to the class.
2009-12-07 20:40:48 +00:00
Xin LI
931d13672c MFC revision 197579 and 199617:
Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.
2009-12-07 19:59:28 +00:00
John Baldwin
cd6d7a15cf MFC 200061:
The fd_mask type is an unsigned long, not an int, so treat the mask as a
long instead of an int when examining the results of select() to look for
RPC requests.  Previously this routine would ignore RPC requests to sockets
whose file descriptor mod 64 was greater than 31 on a 64-bit platform.
2009-12-07 19:07:45 +00:00
John Baldwin
42e9dd5cad MFC 199974:
Remove extra parantheses from usb_ethernet.c and usb_serial.c lines.
config(8) doesn't parse parantheses and instead treated them as being
part of the device driver name (e.g. '(u3g' vs 'u3g').  While here, fix the
style of these long lines to match the wrapping used for other long lines
in this file.
2009-12-07 17:18:52 +00:00
Robert Noland
c9ab55149b MFC 199714
Create a seperate ZFS enabled loader.

This adds zfsloader which will be called by zfsboot/gptzfsboot code rather
than the tradional loader.  This eliminates the need to set the
LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader.

Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot)
in order for the boot process to use the new loader.

New installations will no longer be required to build a ZFS enabled
loader for a working ZFS boot system.  Installing zfsboot/gptzfsboot is
sufficient for acknowledging the use of CDDL code and therefore the ZFS
enabled loader.
2009-12-07 16:37:02 +00:00
Christian Brueffer
02a7ccf746 MFC: r200019
Fix the dprintf() prototype.
2009-12-07 08:38:44 +00:00
Christian Brueffer
4d672d94c1 MFC: r197900
Improved one-line description of this module (taken from NOTES).
2009-12-07 08:36:49 +00:00
Hiroki Sato
3cec660ea4 MFC:
r197139
- Add afexists() to check if the specified address family exists
  on the system or not.

r197697
- Add AF_IPX and AF_NATM to afexists().
2009-12-07 07:41:29 +00:00
Michael Tuexen
cf19fced17 MFC 197288,197326,197327,197328,197342,197914,197929,
197955,199365,199370,199371,199373,199866
This MFCs all SCTP/VNET relevant fixes from head.

Approved by: rrs (mentor)
2009-12-07 07:33:51 +00:00
Hiroki Sato
a1c3a99ce5 MFC:
r197144:
- Add an extension of set_rcvar(), a new function set_rcvar_obsolete(),
  and $desc.

  The set_rcvar_obsolete() is to mark a variable as obsolete and define
  the new one.  More specifically, a warning is displayed when
  a variable is removed or changed in the source tree and the user
  still defines the old one.
2009-12-07 06:25:19 +00:00
Hiroki Sato
28769e8539 MFC:
r197138:
- The ifconfig(8) command now supports NDP flags which are handled by ndp(8).

r198006:
- Use printb() to display the "nd6 options=" line.
2009-12-07 06:05:36 +00:00
Jilles Tjoelker
2ffbb2cea1 MFC r198406: wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
  of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
  work fully in threaded programs, they will need to be careful with wait
  functions)

PR:		90580
2009-12-06 22:14:58 +00:00
Jilles Tjoelker
7635c69726 MFC r198963: sh: Fix memory leak when using a variable in arithmetic
like $((x)).
2009-12-06 22:01:45 +00:00
Edwin Groothuis
0b1ab65e97 MFC of r199642
The output of perror(1) is now showing local messages for locales
supported by libc/nls

PR:             bin/140499
Approved by:    gnn@
2009-12-06 21:07:47 +00:00
Luigi Rizzo
3a5ce93470 mfc r200056
use qsort_r instead of heapsort;
  staticize two functions.
2009-12-06 19:01:33 +00:00
Bjoern A. Zeeb
bba81f6fbd MFC r198467:
Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets
  no matter whether we are compiled as module or if our default of the
  net.inet6.ip6.v6only sysctl already matches what we would set.

  This avoids unnecessary complications with modules, VIMAGES, INET6 and
  the sysctl value, especially considering that most users will use
  linux compat as a module.

  Discussed with:       kib, rwatson (weeks ago)
  Reviewed by:  rwatson
2009-12-06 09:36:11 +00:00
Navdeep Parhar
1dc03a9fc5 MFC r199237:
sc->rev and is_offload(sc) will always be 0 during probe.  Wait till
attach to get correct values.

(missed this one in r200175)
2009-12-06 01:59:06 +00:00
Navdeep Parhar
3b3920bc3c MFC r199237, r199238, r199239, r199240, r200003
r199237:
sc->rev and is_offload(sc) will always be 0 during probe.  Wait till
attach to get correct values.

r199238:
Make sure *some* edc is setup even for an unknown transceiver (assume
it is optical).

r199239:
The 10GBASE-T card should use an IPG of 1.  Also enable the check
for low power startup on this card.

r199240:
Don't disable the XGMAC's tx on ifconfig down.  It is unnecessary
and can cause false backpressure in the chip.  Fix a us/ms mixup
while here.

r200003:
T3 firmware 7.8.0 for cxgb(4)
2009-12-06 01:45:55 +00:00
Bjoern A. Zeeb
c4de0a57f3 MFC r197729:
Make sure that the primary native brandinfo always gets added
  first and the native ia32 compat as middle (before other things).
  o(ld)brandinfo as well as third party like linux, kfreebsd, etc.
  stays on SI_ORDER_ANY coming last.

  The reason for this is only to make sure that even in case we would
  overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo
  would still be there and the system would be operational.

Reviewed by:	kib
2009-12-05 20:43:15 +00:00
Bjoern A. Zeeb
8cb7f89dbb MFC r197726:
Print a warning in case we cannot add more brandinfo because
  we would overflow the MAX_BRANDS sized array.

Reviewed by:	kib
2009-12-05 20:40:28 +00:00
Bjoern A. Zeeb
a1778929b7 MFC r197518:
lindev(4) [1] is supposed to be a collection of linux-specific pseudo
  devices that we also support, just not by default (thus only LINT or
  module builds by default).

  While currently there is only "/dev/full" [2], we are planning to see more
  in the future.  We may decide to change the module/dependency logic in the
  future should the list grow too long.

  This is not part of linux.ko as also non-linux binaries like kFreeBSD
  userland or ports can make use of this as well.

Suggested by:	rwatson [1] (name)
Submitted by:	ed [2]
Discussed with:	markm, ed, rwatson, kib (weeks ago)
Reviewed by:	rwatson, brueffer (prev. version)
PR:		kern/68961
2009-12-05 20:37:46 +00:00
Bjoern A. Zeeb
b4e227f473 MFC r198050:
Compare pointer to NULL rather than 0.
2009-12-05 19:44:16 +00:00
Bjoern A. Zeeb
4fe9cf96e9 MFC r198076:
Explicitly compare to a return code.

  Discussed with: philip (after we both misread the logic there the 1st time)
2009-12-05 19:42:42 +00:00
Bjoern A. Zeeb
3b558c96ce MFC r199947, 199950:
Enable IPcomp by default.

PR:	kern/123587
2009-12-05 19:25:29 +00:00
Bjoern A. Zeeb
87d7d0abb5 MFC r199946:
Add more statistics variables for IPcomp.

  Try to version the struct in a backward compatible way.
  People asked for the versioning of the stats structs in general before.

Note: old netstat binaries, as only consumer, continue to work as they are
      still using kvm but will not display the new stats. [1]

Discussed with:	rwatson [1]
2009-12-05 19:21:58 +00:00
Bjoern A. Zeeb
e55ea9c811 MFC r199906:
In case the compression result is the same size as the orignal version,
  the compression was useless as well.  Make sure to not update the data
  and return, else we would waste resources when decompressing.

  This also avoids the copyback() changing data other consumers like
  xform_ipcomp.c would have ignored because of no win and sent out without
  noting that compression was used, resulting in invalid packets at the
  receiver.
2009-12-05 19:12:35 +00:00
Bjoern A. Zeeb
99808bdf69 MFC r199905:
Assimilate very similar input and output code paths
  (no real functional change).
2009-12-05 19:11:02 +00:00
Bjoern A. Zeeb
d0b0b1b85a MFC r199904:
Add SDT iter probes forgotten in r199885 (r200138 for stable/8).
2009-12-05 19:09:26 +00:00
Bjoern A. Zeeb
0b845b9322 MFC r199899:
Only add the IPcomp header if crypto reported success and we have a lower
  payload size.  Before we had always added the header, no matter if we
  actually send out compressed data or not.

  With this, after the opencrypto/deflate changes, IPcomp starts to work
  apart from edge cases.  Leave it disabled by default until those are
  fixed as well.

PR:	kern/123587
2009-12-05 19:07:28 +00:00
Bjoern A. Zeeb
bc05a8e020 MFC r199897:
Remove whitespace.
2009-12-05 19:06:03 +00:00
Bjoern A. Zeeb
eee2ee2ac7 MFC r199896:
Directly send data uncompressed if the packet payload size is lower than
  the compression algorithm threshold.
2009-12-05 19:03:20 +00:00
Bjoern A. Zeeb
8d6960d085 MFC r199895:
Change memory managment from a fixed size array to a list.
  This is needed to avoid running into out of buffer situations
  where we cannot alloc a new buffer because we hit the array size
  limit (ZBUF).
  Use a combined allocation for the struct and the actual data buffer
  to not increase the number of malloc calls. [1]

  Defer initialization of zbuf until we actually need it.

  Make sure the output buffer will be large enough in all cases.

  Details discussed with: kib [1]
  Reviewed by:            kib [1]
2009-12-05 19:01:50 +00:00
Bjoern A. Zeeb
7a955dbf6b MFC r199887:
Z_PARTIAL_FLUSH is marked deprecated. Z_SYNC_FLUSH is the suggested
  replacement but only use it for inflate. For deflate use Z_FINISH
  as Z_SYNC_FLUSH adds a trailing marker in some cases that inflate(),
  despite the comment in zlib, does npt seem to cope well with, resulting
  in errors when uncompressing exactly fills the outbut buffer without
  a Z_STREAM_END and a successive call returns an error.
2009-12-05 18:59:58 +00:00
Bjoern A. Zeeb
5aef8fdf11 MFC r199885:
Add SDT probes for opencrypto:deflate:deflate_gobal:*.
  They are not nice but they were helpful.
2009-12-05 18:57:32 +00:00
Bjoern A. Zeeb
c8ce7b587b MFC r199884:
Define an SDT provider for "opencrypto".
2009-12-05 18:55:54 +00:00
Bjoern A. Zeeb
4cc7ec3500 MFC r199883:
Add SDT_PROBE[1-5] in the same way we have SDT_PROBE_DEFINE[1-5] to
  avoid having to add all the unused trailing arguments as zeros.
2009-12-05 18:54:21 +00:00
Bjoern A. Zeeb
cc8eb5c3a4 MFC r199894:
Correct a typo.
2009-12-05 18:17:15 +00:00
Ed Maste
4816ae8d04 MFC r200001:
Fix parenthesis typo -- copy full frame pointer for userland callchain,
  not just one byte.

Submitted by:        Ryan Stone      rysto32 at gmail dot com
2009-12-05 17:07:43 +00:00
Luigi Rizzo
3cdcbc4885 some simple MFC:
r200020:
  change the type of the opcode from enum *:8  to u_int8_t
  so the size and alignment of the ipfw_insn is not compiler dependent.
  No changes in the code generated by gcc.

r200023:
  Add new sockopt names for ipfw and dummynet.

  This commit is just grabbing entries for the new names
  that will be used in the future, so you don't need to
  rebuild anything now.

r200034
  Dispatch sockopt calls to ipfw and dummynet
  using the new option numbers, IP_FW3 and IP_DUMMYNET3.
  Right now the modules return an error if called with those arguments
  so there is no danger of unwanted behaviour.

r200040
  - initialize src_ip in the main loop to prevent a compiler warning
    (gcc 4.x under linux, not sure how real is the complaint).
  - rename a macro argument to prevent name clashes.
  -  add the macro name on a couple of #endif
  - add a blank line for readability.
2009-12-05 12:51:51 +00:00
Alexander Motin
c0afc53a8f MFC r200008:
Add CAM_ATAIO_DMA ATA command flag to mark DMA protocol commands.
It is not needed for SATA controllers, but required for PATA.
2009-12-05 08:44:55 +00:00
Marcel Moolenaar
fa0b65d151 Revert unintentional change in revision 200103. 2009-12-04 18:35:02 +00:00
Marcel Moolenaar
0800f014ec MFC rev 200051:
Make sure bus space accesses use unorder memory loads and stores.
2009-12-04 18:29:59 +00:00