Commit Graph

177728 Commits

Author SHA1 Message Date
tijl
738f5859fb Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace
amd64/i386/pc98 _stdint.h with stubs.
2012-02-28 18:38:33 +00:00
dim
0d1f91e8e1 Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang       (disables -Werror)
- NO_WCAST_ALIGN.clang  (disables -Wcast-align)
- NO_WFORMAT.clang	(disables -Wformat and friends)
- CLANG_NO_IAS		(disables integrated assembler)
- CLANG_OPT_SMALL	(adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf!  For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after:	2 weeks
2012-02-28 18:30:18 +00:00
tijl
86b4719ed5 Copy amd64 _limits.h to x86 and merge with i386 _limits.h. Replace
amd64/i386/pc98 _limits.h with stubs.
2012-02-28 18:24:28 +00:00
tijl
3b29ed2286 Copy amd64 _types.h to x86 and merge with i386 _types.h. Replace existing
amd64/i386/pc98 _types.h with stubs.
2012-02-28 18:15:28 +00:00
emaste
5605a1003e Avoid transfers crossing a 4GB boundary, which can lead to data
corruption.  Thanks to scottl@ for the suggestion.

This change will likely be revised after consideration of a general
method to address this type of issue for other drivers.

Sponsored by:   Sandvine Incorporated
MFC after:      3 days
2012-02-28 17:29:31 +00:00
kevlo
714a708b6a Mention mos(4) 2012-02-28 15:47:39 +00:00
kevlo
d2840a94e2 Add support for the MCS7832
Obtained from:	OpenBSD
2012-02-28 15:45:42 +00:00
kevlo
00f3aa909e Add missing MODULE_DEPEND() so that acpi.ko and aibs.ko can be
loaded dynamically.
2012-02-28 15:12:26 +00:00
kevlo
d5508249a7 Fix checks for error return from amr_sglist_map() and amr_ccb_map() 2012-02-28 15:09:56 +00:00
kevlo
a2a1f5f62f Fix typos 2012-02-28 15:07:05 +00:00
pluknet
fe1c277ada Correct pathname for manpages after libarchive 3.0.3 update. 2012-02-28 14:35:36 +00:00
gavin
0104789850 Correct capitalization of "Hz" in user-visible text (manpages, printf(),
etc).

MFC after:	3 days
2012-02-28 13:19:34 +00:00
pluknet
44d62e7d5e Add lib32 part after libarchive 3.0.3 update. 2012-02-28 11:06:52 +00:00
mm
733cf6f55f mdoc(7) stype - start new sentences on new line
MFC after:	1 week
2012-02-28 07:35:07 +00:00
yongari
983da6ebaa Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to
extract a link status of PHY when parent driver is re(4).
RGEPHY_MII_SSR register does not seem to report correct PHY status
on some integrated PHYs used with re(4).
Unfortunately, RealTek PHYs have no additional information to
differentiate integrated PHYs from external ones so relying on PHY
model number is not enough to know that.  However, it seems
RGEPHY_MII_SSR register exists for external RealTek PHYs so
checking parent driver would be good indication to know which PHY
was used. In other words, for non-re(4) controllers, the PHY is
external one and its revision number is greater than or equal to 2.
This change fixes intermittent link UP/DOWN messages reported on
RTL8169 controller.

Also, mii_attach(9) is tried after setting interface name since
rgephy(4) have to know parent driver name.

PR:	kern/165509
2012-02-28 05:23:29 +00:00
adrian
8323b562af Add is_beacon_bad.
PR:		kern/165517
2012-02-28 04:06:42 +00:00
adrian
e8cdf79fdf Track the number of bad beacons received.
PR:		kern/165517
2012-02-28 04:05:35 +00:00
gjb
fe4276cc14 Fix a few rendering nits in rc.conf(5) with regards to mentioning
jail_parallel_enable.
2012-02-28 03:11:02 +00:00
kib
0c3998cc9e Currently, the debugger attached to the process executing vfork() does
not get syscall exit notification until the child performed exec of
exit.  Swap the order of doing ptracestop() and waiting for P_PPWAIT
clearing, by postponing the wait into syscallret after ptracestop()
notification is done.

Reported, tested and reviewed by:	Dmitry Mikulin <dmitrym juniper net>
MFC after:	 2 weeks
2012-02-27 21:10:10 +00:00
kib
57e2f851ed Fix a race in top non-interactive mode. Use plain sleep(3) call instead
of arming timer and then pausing.  If SIGALRM is delivered before pause(3)
is entered, top hangs.

Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-02-27 20:52:20 +00:00
luigi
3ac0fcfb97 A bunch of netmap fixes:
USERSPACE:
1. add support for devices with different number of rx and tx queues;

2. add better support for zero-copy operation, adding an extra field
   to the netmap ring to indicate how many buffers we have already processed
   but not yet released (with help from Eddie Kohler);

3. The two changes above unfortunately require an API change, so while
   at it add a version field and some spares to the ioctl() argument
   to help detect mismatches.

4. update the manual page for the two changes above;

5. update sample applications in tools/tools/netmap

KERNEL:

1. simplify the internal structures moving the global wait queues
   to the 'struct netmap_adapter';

2. simplify the functions that map kring<->nic ring indexes

3. normalize device-specific code, helps mainteinance;

4. start exploring the impact of micro-optimizations (prefetch etc.)
   in the ixgbe driver.
   Use 'legacy' descriptors on the tx ring and prefetch slots gives
   about 20% speedup at 900 MHz. Another 7-10% would come from removing
   the explict calls to bus_dmamap* in the core (they are effectively
   NOPs in this case, but it takes expensive load of the per-buffer
   dma maps to figure out that they are all NULL.

   Rx performance not investigated.

I am postponing the MFC so i can import a few more improvements
before merging.
2012-02-27 19:05:01 +00:00
jhb
71d18727cc Typo. 2012-02-27 18:28:31 +00:00
pluknet
dc87319e38 Backout r230934 which didn't work with unix sockets and
several filesystem layers mounted at the specified path.

Pointy hat to:	pluknet
2012-02-27 17:39:34 +00:00
jhb
cd789537e3 - Panic up front if a kernel does not include 'device atpic' and an
APIC is not found.
- Don't panic if lapic_enable_cmc() is called and the APIC is not enabled.
  This can happen due to booting a kernel with APIC disabled on a CPU that
  supports CMCI.
- Wrap a long line.
2012-02-27 17:33:16 +00:00
jhb
41e2dd95b7 MFamd64: Don't whine about interrupts being disabled for an NMI. 2012-02-27 17:31:38 +00:00
jhb
c5aa114d99 Remove completely duplicate '#ifdef XEN' section. 2012-02-27 17:30:21 +00:00
jhb
8e4f58c4d2 Resort the IDT_DTRACE_RET constant after it was changed to be less than
IDT_SYSCALL.
2012-02-27 17:29:37 +00:00
jhb
f436893eac Correct function prototype for read_rflags(). 2012-02-27 17:28:47 +00:00
jhb
29b46a1275 Update incorrect comment. 2012-02-27 17:28:22 +00:00
sbruno
8e29ac4811 Update PCI-IDs with devices found on Intel SDP
Return  BUS_PROBE_DEFAULT so that non-default drivers may be loaded

Reviewed by:	jharris@
Obtained from:	Yahoo! Inc. and Intel
MFC after:	3 days
2012-02-27 17:04:18 +00:00
kevlo
64abf5eee6 Remove unused variable count.
This variable is initialized but not used.
2012-02-27 16:10:26 +00:00
jhb
4110bb206b Clear the a device's description string anytime it's driver changes.
Descriptions  are specific to drivers and we don't change drivers on attached
devices.  This fixes a few places where we were not clearing the description
when detaching a driver (e.g. with device_attach() failed).  While here, fix
a few other nits:
- Remove spurious call to remove a device's driver from
  devclass_driver_deleted().  device_detach() removes it already.
- Fix a typo.
2012-02-27 16:08:18 +00:00
davidxu
96aacc2279 Follow changes made in revision 232144, pass absolute timeout to kernel,
this eliminates a clock_gettime() syscall.
2012-02-27 13:38:52 +00:00
mav
8a35bc6c4f Rework CPU load balancing in SCHED_ULE:
- In sched_pickcpu() be more careful taking previous CPU on SMT systems.
Do it only if all other logical CPUs of that physical one are idle to avoid
extra resource sharing.
 - In sched_pickcpu() change general logic of CPU selection. First
look for idle CPU, sharing last level cache with previously used one,
skipping SMT CPU groups. If none found, search all CPUs for the least loaded
one, where the thread with its priority can run now. If none found, search
just for the least loaded CPU.
 - Make cpu_search() compare lowest/highest CPU load when comparing CPU
groups with equal load. That allows to differentiate 1+1 and 2+0 loads.
 - Make cpu_search() to prefer specified (previous) CPU or group if load
is equal. This improves cache affinity for more complicated topologies.
 - Randomize CPU selection if above factors are equal. Previous code tend
to prefer CPUs with lower IDs, causing unneeded collisions.
 - Rework periodic balancer in sched_balance_group(). With cpu_search()
more intelligent now, make balansing process flat, removing recursion
over the topology tree. That fixes double swap problem and makes load
distribution more even and predictable.

All together this gives 10-15% performance improvement in many tests on
CPUs with SMT, such as Core i7, for number of threads is less then number
of logical CPUs. In some tests it also gives positive effect to systems
without SMT.

Reviewed by:	jeff
Tested by:	flo, hackers@
MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2012-02-27 10:31:54 +00:00
kevlo
58cf798c0b Fix logic error 2012-02-27 08:57:02 +00:00
kevlo
bfb91aa71a Remove duplicate assignment of SF_IMR_RXDQ2_DMADONE bit 2012-02-27 08:55:32 +00:00
delphij
2d737c5364 Drop setuid status while doing file operations to prevent potential
information leak.  This changeset is intended to be a minimal one
to make backports easier.

Reviewed by:	kevlo, remko
MFC after:	1 week
2012-02-27 05:49:00 +00:00
jilles
838f85316a xargs: Remove an unclear comment that only tried to repeat what the code did
Reported by:	bde
2012-02-26 23:06:30 +00:00
nwhitehorn
607716a6c6 Fix segfault if distfetch and distextract binaries are run standalone
without the DISTRIBUTIONS environment variable set.

PR:		bin/165492
Submitted by:	Fernando Apesteguia
MFC after:	4 days
2012-02-26 22:09:21 +00:00
kan
04fe43e989 Fix apparent logic reversal in setting the 'auto_mode' flag.
MFC after: 2 weeks
2012-02-26 21:24:27 +00:00
phk
c1bac816f5 Also call the low-level driver if ->c_iflag & (IXON|IXOFF|IXANY) changes.
Uftdi(4) examines (c_iflag & (IXON|IXOFF)) to control hw XON-XOFF support.
This is obviously no good, if changes to those bits are not communicated
down the stack.
2012-02-26 20:56:49 +00:00
alc
351ef48158 Fix typo.
MFC after:	1 week
2012-02-26 19:10:14 +00:00
jilles
67bf58b3a2 xargs: Fix comma splice in error message.
Reported by:	bde
2012-02-26 17:39:46 +00:00
mm
d974ef7be1 Analogous to r232059, add a parameter for the ZFS file system:
allow.mount.zfs:
	allow mounting the zfs filesystem inside a jail

This way the permssions for mounting all current VFCF_JAIL filesystems
inside a jail are controlled wia allow.mount.* jail parameters.

Update sysctl descriptions.
Update jail(8) and zfs(8) manpages.

TODO:	document the connection of allow.mount.* and VFCF_JAIL for kernel
	developers

MFC after:	10 days
2012-02-26 16:30:39 +00:00
kevlo
b160a2190c Remove duplicate assignment of CTS_SPI_VALID_SYNC_RATE bit 2012-02-26 16:05:20 +00:00
jilles
e3b7e38d11 Check fchmod()/fchown() in fifo_misc test. 2012-02-26 15:32:02 +00:00
jilles
06d1ac3238 Fix fchmod() and fchown() on fifos.
The new fifo implementation in r232055 broke fchmod() and fchown() on fifos.
Postfix needs this.

Submitted by:	gianni
Reported by:	dougb
2012-02-26 15:14:29 +00:00
trociny
b0cce2b35e When displaying security credential information show also process umask.
Submitted by:	Dmitry Banschikov <me ubique spb ru>
Discussed with:	rwatson
MFC after:	2 weeks
2012-02-26 14:27:34 +00:00
trociny
a9902044d1 Add sysctl to retrieve or set umask of another process.
Submitted by:	Dmitry Banschikov <me ubique spb ru>
Discussed with:	kib, rwatson
Reviewed by:	kib
MFC after:	2 weeks
2012-02-26 14:25:48 +00:00
kib
bb3d17b00a Document SO_PROTOCOL socket option.
Discussed with:	bz
Reviewed by:	glebius
MFC after:	2 weeks
2012-02-26 13:57:24 +00:00