Commit Graph

169568 Commits

Author SHA1 Message Date
Pyun YongHyeon
7e0fa14052 Back out r228476.
r228476 fixed superfluous link UP/DOWN messages but broke IPMI
access during boot.  It's not clear why r228476 breaks IPMI and
should be revisited.

Reported by:	Paul Guyot <paulguyot <> ieee dot org >
MFC after:	1 week
2012-04-11 06:34:25 +00:00
Marcel Moolenaar
2059ee3cc0 uart_cpu_amd64.c and uart_cpu_i386.c (under sys/dev/uart) are
identical now that the bus spaces are unified under sys/x86.
Replace them with a single uart_cpu_x86.c.
o   delete uart_cpu_i386.c
o   move uart_cpu_amd64.c to uart_cpu_x86.c
o   update files.amd64 and files.i386 accordingly.
2012-04-11 02:42:01 +00:00
Adrian Chadd
53e98d5a48 Fix the default, non-superg compile.
Pointy-hat-to:	adrian
2012-04-11 02:34:32 +00:00
Nathan Whitehorn
88fe385600 Do not restore the register holding the TLS pointer when doing various
usermode context switches (long jumps and ucontext operations). If these
are used across threads, multiple threads can end up with the same TLS base.
Madness will then result.

This makes behavior on PPC match that on x86 systems and on Linux.

MFC after:	10 days
2012-04-11 00:00:40 +00:00
Adrian Chadd
43faa6b266 Fix compilation with IEEE80211_ENABLE_SUPERG defined.
PR:		kern/164951
2012-04-10 19:47:44 +00:00
Adrian Chadd
f8ab7a9fc9 Convert the flags over to a set of bit flags. 2012-04-10 19:25:43 +00:00
Juli Mallett
019100de26 Back out r233646. Although it fixed most libgeom consumers under 32-bit
compatibility, it broke programs using devstat, under 32-bit compatibility and
not.

It's very difficult to fix the identifiers used by devstat, so this change is
simply being backed out.  Since changes to 3rd-party code seem likely, and may be
necessary to properly fix 32-bit binaries on 64-bit kernel, it would seem better
to make more invasive changes to fix GEOM's problems with 32-bit compatibility in
general.

The right thing to do is to replace all of the use of pointers as opaque
identifiers with a fixed-size (64-bit or even 32-bit should be enough for tracking
unique GEOM elments) field.  That probably maintains source compatibility with
most GEOM consumers, and allows xml2tree to make better assumptions about how to
decode the identifiers.

Submitted by:	Anton Yuzhaninov
2012-04-10 17:37:24 +00:00
Jim Harris
cb77f0da67 Queue CCBs internally instead of using CAM_REQUEUE_REQ status. This fixes
problem where userspace apps such as smartctl fail due to CAM_REQUEUE_REQ
status getting returned when tagged commands are outstanding when smartctl
sends its I/O using the pass(4) interface.

Sponsored by: Intel
Found and tested by: Ravi Pokala <rpokala at panasas dot com>
Reviewed by: scottl
Approved by: scottl
MFC after: 1 week
2012-04-10 16:33:19 +00:00
Marius Strobl
0fec3e2d81 Fix !SMP build after r234074.
Reviewed by:	attilio, jhb
2012-04-10 16:08:46 +00:00
Jaakko Heinonen
034efc61ba Apply changes from r233787 to ext2fs:
- Use more natural ip->i_flags instead of vap->va_flags in the final
  flags check.
- Style improvements.

No functional change intended.

MFC after:	2 weeks
2012-04-10 16:05:52 +00:00
Jaakko Heinonen
fce74feae1 - Return EPERM from ufs_setattr() when an user without PRIV_VFS_SYSFLAGS
privilege attempts to toggle SF_SETTABLE flags.
- Use the '^' operator in the SF_SNAPSHOT anti-toggling check.

Flags are now stored to ip->i_flags in one place after all checks.

Submitted by:	bde
2012-04-10 15:59:37 +00:00
Jens Schweikhardt
da4b9d2971 Parenthesize args in yyless() and unput() replacement text
so they are safer when used with expressions.

MFC after:	1 week
2012-04-10 15:29:28 +00:00
John Baldwin
efbebba22a Properly parse 40G media types from newer Mellanox adapters that are
40G capable.  For now, map all 40G links to 40GBase-CR4.

MFC after:	2 weeks
2012-04-10 14:01:09 +00:00
John Baldwin
19a3210a66 Add media types for 40G media that might be used with FreeBSD.
Reviewed by:	bz
MFC after:	2 weeks
2012-04-10 13:59:35 +00:00
Stanislav Sedov
7e2d4dcd24 - Add rc.d script for kfd, kerberos forwarded tickets daemon. 2012-04-10 09:27:41 +00:00
Adrian Chadd
41b6b5074c Blank the aggregate stats whenever the zero ioctl is called. 2012-04-10 07:27:42 +00:00
Adrian Chadd
9467e3f3fc Squirrel away SYNC interrupt debugging if it's enabled in the HAL.
Bus errors will show up as various SYNC interrupts which will be passed
back up to ath_intr().
2012-04-10 07:23:37 +00:00
Adrian Chadd
eddd7521f1 Revert this for now - it may work for -8 and -9 and -HEAD, but not
"-HEAD driver + net80211 on -9 kernel."

I'll figure this out at some later stage.
2012-04-10 07:16:28 +00:00
Adrian Chadd
b779c10b12 Squirrel away the SYNC interrupt in case we're doing interrupt debugging. 2012-04-10 07:11:33 +00:00
Gleb Smirnoff
90b357f6ec M_DONTWAIT is a flag from historical mbuf(9)
allocator, not malloc(9) or uma(9) flag.
2012-04-10 06:52:39 +00:00
Gleb Smirnoff
e275c0d349 M_DONTWAIT is a flag from historical mbuf(9)
allocator, not malloc(9) or uma(9) flag.
2012-04-10 06:52:21 +00:00
Adrian Chadd
fdd72b4a32 * Since the API changed along the -CURRENT path (december 2011),
add a FreeBSD_version check.  It should work fine for compiling
  on -HEAD, 9.x and 8.x.

* Conditionally compile the 11n options only when 11n is enabled.

The above changes allow the ath(4) driver to compile and run on
8.1-RELEASE (Hi old PC-BSD!) but with the 11n stuff disabled.

I've done a test against the net80211 and tools in 8.1-RELEASE.
The NIC used in testing is the AR2427 in an EEEPC.

Just to be clear - this change is to allow the -HEAD ath/hal/rate
code to run on 9.x _and_ 8.x with no source changes. However,
when running on earlier kernels, it should only be used for legacy
mode. (Don't define ATH_ENABLE_11N.)
2012-04-10 06:25:11 +00:00
Gleb Smirnoff
9ca1fe0db8 CARP should be capable to run on if_bridge(4). Unfortunately,
this commit is not enough to enable CARP operation on
if_bridge(4), because the latter doesn't handle or even
initialize its ifp->if_link_state.

Reported by:	Alexander Lunev <sol289 gmail.com>
2012-04-10 05:42:48 +00:00
Eitan Adler
cf61a32711 Update examples with corrections from the author
PR:		ports/160689
Submitted by:	mickael.maillot@gmail.com
Approved by:	cperciva (implicit)
MFC after:	1 days (with r233429)
2012-04-10 01:49:31 +00:00
Attilio Rao
79257559ee BSP is not added to the mask of valid target CPUs for interrupts
in set_apic_interrupt_ids(). Besides, set_apic_interrupts_ids() is not
called in the !SMP case too.
Fix this by:
- Adding the BSP as an interrupt target directly in cpu_startup().
- Remove an obsolete optimization where the BSP are skipped in
  set_apic_interrupt_ids().

Reported by:	jh
Reviewed by:	jhb
MFC after:	3 days
X-MFC:		r233961
Pointy hat to:	me
2012-04-09 22:41:19 +00:00
Jilles Tjoelker
8a8be77610 Remove unused and wrong SA_PROC internal signal property.
The SA_PROC signal property indicated whether each signal number is directed
at a specific thread or at the process in general. However, that depends on
how the signal was generated and not on the signal number. SA_PROC was not
used.
2012-04-09 21:58:58 +00:00
Robert Millan
7b3b368344 Improve error reporting when no cpufreq(4) support is available.
Reviewed by:	njl, acpi
2012-04-09 20:59:14 +00:00
Robert Millan
453856145c Include <signal.h> (for SIGINFO). 2012-04-09 20:55:23 +00:00
Alexander Motin
70801abe8f Microoptimize cpu_search().
According to profiling, it makes one take 6% of CPU time on hackbench
with its million of context switches per second, instead of 8% before.
2012-04-09 18:24:58 +00:00
Attilio Rao
a0f2c37b6f - Introduce a cache-miss optimization for consistency with other
accesses of the cache member of vm_object objects.
- Use novel vm_page_is_cached() for checks outside of the vm subsystem.

Reviewed by:	alc
MFC after:	2 weeks
X-MFC:		r234039
2012-04-09 17:05:18 +00:00
Dimitry Andric
085e2c2102 Since truss also uses kdump's mkioctls script, pass the value of ${CPP}
there too, similar to r234058.

MFC after:	1 week
2012-04-09 15:34:22 +00:00
John Baldwin
bcd6068179 Recognize the RDRAND instruction feature.
Submitted by:	Michael Fuckner  michael fuckner net
MFC after:	3 days
2012-04-09 15:20:16 +00:00
Dimitry Andric
c1b2e4fc21 In kdump's mkioctls script, use '${CPP}' instead of hardcodedly using
'gcc -E'.  This fixes building when WITH_CLANG_IS_CC is in effect.

Report by:	Niclas Zeising <zeising@daemonic.se>
MFC after:	1 week
2012-04-09 14:47:18 +00:00
Jilles Tjoelker
5844994b1e sem_open: Make sure to fail an O_CREAT|O_EXCL open, even if that semaphore
is already open in this process.

If the named semaphore is already open, sem_open() only increments a
reference count and did not take the flags into account (which otherwise
happens by passing them to open()). Add an extra check for O_CREAT|O_EXCL.

PR:		kern/166706
Reviewed by:	davidxu
MFC after:	10 days
2012-04-09 14:17:22 +00:00
Benjamin Kaduk
ac5b109f31 Fix a couple of style issues. Tweak grammar and markup while here.
Approved by:	hrs (mentor)
2012-04-09 01:20:50 +00:00
Andriy Gapon
2885c2e4bb intpm: return only SMB bus error codes from SMB methods
PR:		kern/25733
MFC after:	5 days
2012-04-08 20:48:39 +00:00
Andriy Gapon
32048b2bff intpm: reflect the fact that SB800 and later AMD chipsets are not supported
They do not have compatible configuration registers in PCI configuration
space.  Instead their configuration resides in AMD "PM I/O" space
(accessed via a pair of I/O space registers).

MFC after:	5 days
2012-04-08 19:58:38 +00:00
Alan Cox
1c8279e4e7 Fix mincore(2) so that it reports PG_CACHED pages as resident.
MFC after:	2 weeks
2012-04-08 18:25:12 +00:00
Alan Cox
908e3da10e If a page belonging a reservation is cached, then mark the reservation so
that it will be freed to the cache pool rather than the default pool.
Otherwise, the cached pages within the reservation may be recycled sooner
than necessary.

Reported by:	Andrey Zonov
2012-04-08 17:00:46 +00:00
Edward Tomasz Napierala
2b028c25d3 Fix panic in ffs_reload(), which may happen when read-only filesystem
gets resized and then reloaded.

Reviewed by:	kib, mckusick (earlier version)
Sponsored by:	The FreeBSD Foundation
2012-04-08 13:44:55 +00:00
Robert Watson
3ee3cd17f6 Merge a local fix to OpenBSM's libauditd to avoid a directory descriptor
leak when iterating over possible audit trail directories.  This fix will
be merged upstream in an identical form, but hasn't yet appeared in an
OpenBSM release.

Submitted by:	guido
Obtained from:	TrustedBSD Project
MFC after:	3 days
2012-04-08 11:05:22 +00:00
Robert Watson
b4ef8be228 When allocation of labels on files is implicitly disabled due to MAC
policy configuration, avoid leaking resources following failed calls
to get and set MAC labels by file descriptor.

Reported by:	Mateusz Guzik <mjguzik at gmail.com> + clang scan-build
MFC after:	3 days
2012-04-08 11:01:49 +00:00
Stanislav Sedov
cf771f223b - Update FreeBSD's Heimdal distribution to 1.5.2. This is a bugfix
release, which fixes a DoS issue in libkrb5.
2012-04-08 08:19:17 +00:00
Kirk McKusick
85121b0979 Expand locking around identification of filesystem mount point when
accounting for I/O counts at completion of I/O operation. Also switch
from using global devmtx to vnode mutex to reduce contention.

Suggested and reviewed by: kib
2012-04-08 06:20:21 +00:00
Kirk McKusick
827e334c01 Add I/O accounting to msdos filesystem.
Suggested and reviewed by: kib
2012-04-08 06:18:18 +00:00
Kirk McKusick
b73ffa31d4 Drop an unnecessary setting of si_mountpt when updating a UFS mount point.
Clearly it must have been set when the mount was done.

Reviewed by: kib
2012-04-08 06:14:49 +00:00
Adrian Chadd
87632709bc Teach wlanstats about the new BAR TX statistics. 2012-04-08 04:51:43 +00:00
Adrian Chadd
fcacf9318c Add some statistics to track BAR TX. 2012-04-08 04:51:25 +00:00
Stanislav Sedov
feec362185 - Update vendor tree of heimdal to 1.5.2. 2012-04-08 04:47:53 +00:00
Adrian Chadd
d61c74edc5 Add AR_ISR_S5 and AR_ISR_S5_S. 2012-04-08 04:42:53 +00:00