]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdditional manual page updates for r234103.
jh [Fri, 13 Apr 2012 05:40:26 +0000 (05:40 +0000)]
Additional manual page updates for r234103.

Submitted by: bde

12 years agoUse strdup() on the name (and free it when it's done) so non-static names
adrian [Fri, 13 Apr 2012 04:22:42 +0000 (04:22 +0000)]
Use strdup() on the name (and free it when it's done) so non-static names
can be used in firmware_register().

12 years agoUpdate the ddb and gdb backends for the new 'trace_thread' hook.
jhb [Thu, 12 Apr 2012 21:34:58 +0000 (21:34 +0000)]
Update the ddb and gdb backends for the new 'trace_thread' hook.
It is implemented via db_trace_thread() for DDB and not implemented
for GDB.  This should have been part of r234190.

Pointy hat to: jhb
Reported by: jkim
MFC after: 1 week

12 years agoAdd myself and my relation to my mentors.
madpilot [Thu, 12 Apr 2012 20:22:17 +0000 (20:22 +0000)]
Add myself and my relation to my mentors.

Approved by: crees

12 years agoComplete polled-mode operation by using a callout if the device will be
grehan [Thu, 12 Apr 2012 18:46:48 +0000 (18:46 +0000)]
Complete polled-mode operation by using a callout if the device will be
used in polled-mode. The callout invokes uart_intr, which rearms the timeout.
Implemented for bhyve, but generically useful for e.g. embedded bringup
when the interrupt controller hasn't been setup, or if it's not deemed
worthy to wire an interrupt line from a serial port.

Submitted by: neel
Reviewed by: marcel
Obtained from: NetApp
MFC after: 3 weeks

12 years agoAdd missing LibUSB 1.0 API function.
hselasky [Thu, 12 Apr 2012 18:06:30 +0000 (18:06 +0000)]
Add missing LibUSB 1.0 API function.

Reported by: lme @
MFC after: 1 week

12 years ago- Extend the KDB interface to add a per-debugger callback to print a
jhb [Thu, 12 Apr 2012 17:43:59 +0000 (17:43 +0000)]
- Extend the KDB interface to add a per-debugger callback to print a
  backtrace for an arbitrary thread (rather than the calling thread).
  A kdb_backtrace_thread() wrapper function uses the configured debugger
  if possible, otherwise it falls back to using stack(9) if that is
  available.
- Replace a direct call to db_trace_thread() in propagate_priority()
  with a call to kdb_backtrace_thread() instead.

MFC after: 1 week

12 years agoStyle.
trasz [Thu, 12 Apr 2012 16:55:48 +0000 (16:55 +0000)]
Style.

12 years agoUpdate the swi_add prototype after struct ithd was split up into
pluknet [Thu, 12 Apr 2012 16:02:45 +0000 (16:02 +0000)]
Update the swi_add prototype after struct ithd was split up into
struct intr_event and struct intr_thread.

PR: docs/166864
Reviewed by: jhb (older version)
MFC after: 1 week

12 years agoIf a linker file contains at least one module, but all of the modules
jhb [Thu, 12 Apr 2012 14:49:25 +0000 (14:49 +0000)]
If a linker file contains at least one module, but all of the modules
fail to load (the MOD_LOAD event fails) during a kldload(2), unload the
linker file and fail the kldload(2) with ENOEXEC.

Reported by: gcooper
MFC after: 1 week

12 years agoApparently the length field in advanced descriptors
luigi [Thu, 12 Apr 2012 14:06:05 +0000 (14:06 +0000)]
Apparently the length field in advanced descriptors
does not include the CRC irrespective of the setting
of CRCSTRIP. The 82599 data sheets (sec. 7.1.6) say differently.
Very strange. Need to check what happens on legacy descriptors,
but for the time being this restores functionality.

12 years agoFix error messages containing the executed command name
dumbbell [Thu, 12 Apr 2012 14:02:59 +0000 (14:02 +0000)]
Fix error messages containing the executed command name

Before, we took the first argument to pam_exec(8). With the addition of
options in front of the command, this could be wrong.

Now, options are parsed before calling _pam_exec() and messages contain
the proper command name.

While here, fix a warning.

Sponsored by: Yakaz (http://www.yakaz.com)

12 years agoAdd OFED and the associated options and drivers to x86 LINT builds:
jhb [Thu, 12 Apr 2012 14:01:06 +0000 (14:01 +0000)]
Add OFED and the associated options and drivers to x86 LINT builds:
- Mark 'sdp' as requiring 'inet'.
- Always include "opt_inet.h" and "opt_inet6.h" and modify the IB
  driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options
  to determine what should be enabled during a module build.
- Fix the mlxen(4) driver and the core IB code to compile without
  if INET is disabled (including when both INET and INET6 are disabled).

Reviewed by: bz
MFC after: 2 weeks

12 years agoDon't update if_obytes when transmitting packets. That is already done
jhb [Thu, 12 Apr 2012 13:53:49 +0000 (13:53 +0000)]
Don't update if_obytes when transmitting packets.  That is already done
in IFQ_HANDOFF() when the packet is passed to the start routine, so doing
it here resulted in double counting.

Reported by: Alex Tutubalin  lexa lexa ru
MFC after: 1 week

12 years agoRemove block reallocation used to make room for the cylinder group
trasz [Thu, 12 Apr 2012 13:43:43 +0000 (13:43 +0000)]
Remove block reallocation used to make room for the cylinder group
summary structure.  From now on, when there is no room for it,
we simply allocate new one in a newly added cylinder group.

This patch removes a conditional in updcsloc(), reindents some code
there, and removes unused routines.  I decided to do it this way instead
of disabling reallocation when the filesystem is live and leaving it
as it is otherwise, because this allows for removal of lots of complicated
and hard to test code.  Also, conditionally disabling it would result
in a different layout in filesystems resized online and offline, which
would look somewhat weird.

Reviewed by: mckusick
No objections from: kib
Sponsored by: The FreeBSD Foundation

12 years agoRefactor da(4) to remove one of two code paths used to query capacity
trasz [Thu, 12 Apr 2012 12:58:14 +0000 (12:58 +0000)]
Refactor da(4) to remove one of two code paths used to query capacity
data.

Reviewed by: ken, mav (earlier version)
Sponsored by: The FreeBSD Foundation

12 years agoRead backup GPT header from the last LBA only when primary GPT header and
ae [Thu, 12 Apr 2012 12:37:53 +0000 (12:37 +0000)]
Read backup GPT header from the last LBA only when primary GPT header and
table aren't valid. If they are ok, use hdr_lba_alt value to read backup
header. This will make gptboot happy when GPT used atop of some GEOM
provider, e.g. GEOM_MIRROR.

Reviewed by: pjd
MFC after: 2 weeks

12 years agoSome code restructuring to bring the memory allocator out of netmap.c
luigi [Thu, 12 Apr 2012 11:27:09 +0000 (11:27 +0000)]
Some code restructuring to bring the memory allocator out of netmap.c
and make it easier to replace it with a different implementation.
On passing, also fix indentation.

NOTE: I know that #include "foo.c" is ugly, but the alternative
(add another entry to sys/conf/files, add a separate header with
structs and prototypes, and expose functions that are meant to
be private) looks even worse to me.
We need a more modular way to specify dependencies and build options.

12 years agoKeep a copy of the original pointer returned by openpam_readline() so
des [Thu, 12 Apr 2012 11:23:24 +0000 (11:23 +0000)]
Keep a copy of the original pointer returned by openpam_readline() so
we can free it later, instead of trying to free a pointer that points
to the end of the buffer.

Committed to head because this code no longer exists upstream.

Submitted by: jasone@

12 years agoAdd thread-private flag to indicate that error value is already placed
kib [Thu, 12 Apr 2012 10:48:43 +0000 (10:48 +0000)]
Add thread-private flag to indicate that error value is already placed
in td_errno. Flag is supposed to be used by syscalls returning
EJUSTRETURN because errno was already placed into the usermode frame
by a call to set_syscall_retval(9). Both ktrace and dtrace get errno
value from td_errno if the flag is set.

Use the flag to fix sigsuspend(2) error return ktrace records.

Requested by: bde
MFC after: 1 week

12 years agoremove an unnecessary #define
luigi [Thu, 12 Apr 2012 10:32:34 +0000 (10:32 +0000)]
remove an unnecessary #define

12 years agoPropagate the current state of rtld_bind_lock to dlopen_object() calls
kib [Thu, 12 Apr 2012 10:32:22 +0000 (10:32 +0000)]
Propagate the current state of rtld_bind_lock to dlopen_object() calls
through the filter loading call chain. This fixes attempts to
write-lock the already locked rtld_bind_lock when filter loading is
initiated by relocation of dlopening dso.

Reported and tested by: Taku YAMAMOTO <taku tackymt homeip net>
MFC after: 1 week

12 years agouse correct selinfo pointer for the generic interrupt handler
luigi [Thu, 12 Apr 2012 08:54:01 +0000 (08:54 +0000)]
use correct selinfo pointer for the generic interrupt handler
(it is never used in current FreeBSD drivers).

12 years agouse getopt to parse options, add one option to set
luigi [Thu, 12 Apr 2012 08:38:56 +0000 (08:38 +0000)]
use getopt to parse options, add one option to set
the wait time for link-up events

12 years agoThe BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
dougb [Thu, 12 Apr 2012 01:53:33 +0000 (01:53 +0000)]
The BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
This change was noticed by ISC at:

https://lists.isc.org/pipermail/bind-users/2012-April/087345.html

and verified by me both by comparing the contents of the old and new
distfiles and by verifying the PGP signature on the new distfile.

12 years agoSet the proto to LAGG_PROTO_NONE before calling the detach routine so packets
thompsa [Thu, 12 Apr 2012 01:07:17 +0000 (01:07 +0000)]
Set the proto to LAGG_PROTO_NONE before calling the detach routine so packets
are discarded, this is an issue because lacp drops the lock which may allow
network threads to access freed memory. Expand the lock coverage so the
detach/attach happen atomically.

Submitted by: Andrew Boyer (earlier version)

12 years agoSort completions
eadler [Thu, 12 Apr 2012 00:12:17 +0000 (00:12 +0000)]
Sort completions
Add a new one for sysctl

Submitted by: rm (the new completion)
Approved by: cperciva (implicit)
MFC after: 3 days

12 years agoExport vinactive() from kern/vfs_subr.c (e.g., make it no longer
mckusick [Wed, 11 Apr 2012 23:01:11 +0000 (23:01 +0000)]
Export vinactive() from kern/vfs_subr.c (e.g., make it no longer
static and declare its prototype in sys/vnode.h) so that it can be
called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c)
instead of the body of vinactive() being cut and pasted into
process_deferred_inactive().

Reviewed by: kib
MFC after:   2 weeks

12 years agoWhitespace cleanup.
mckusick [Wed, 11 Apr 2012 22:43:40 +0000 (22:43 +0000)]
Whitespace cleanup.

12 years agoWe don't need kcopy() in any of the remaining places it is used, so
nwhitehorn [Wed, 11 Apr 2012 22:23:50 +0000 (22:23 +0000)]
We don't need kcopy() in any of the remaining places it is used, so
remove it.

MFC after: 2 weeks

12 years agoOnly manipulate the PGA_EXECUTABLE flag on managed pages. This is a proxy
nwhitehorn [Wed, 11 Apr 2012 21:56:55 +0000 (21:56 +0000)]
Only manipulate the PGA_EXECUTABLE flag on managed pages. This is a proxy
for whether the page is physical. On dense phys mem systems (32-bit),
VM_PHYS_TO_PAGE will not return NULL for device memory pages if device
memory is above physical memory even if there is no allocated vm_page.
Attempting to use the returned page could then cause either memory
corruption or a page fault.

12 years agoReapply r223198 which was reverted in the previous vendor import. Some
jhb [Wed, 11 Apr 2012 21:33:45 +0000 (21:33 +0000)]
Reapply r223198 which was reverted in the previous vendor import.  Some
portions were already reapplied in r233708:
- Use a dedicated task to handle deferred transmits from the if_transmit
  method instead of reusing the existing per-queue interrupt task.
  Reusing the per-queue interrupt task could result in both an interrupt
  thread and the taskqueue thread trying to handle received packets on a
  single queue resulting in out-of-order packet processing.
- Call ether_ifdetach() earlier in igb_detach().
- Drain tasks and free taskqueues during igb_detach().

MFC after: 1 week

12 years agoTrim stray blank line.
jhb [Wed, 11 Apr 2012 21:00:33 +0000 (21:00 +0000)]
Trim stray blank line.

12 years agoAllow device_busy() and device_unbusy() to be invoked while a device is
jhb [Wed, 11 Apr 2012 20:57:41 +0000 (20:57 +0000)]
Allow device_busy() and device_unbusy() to be invoked while a device is
being attached.  This is implemented by adding a new DS_ATTACHING state
while a device's DEVICE_ATTACH() method is being invoked.  A driver is
required to not fail an attach of a busy device.  The device's state will
be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked
busy during DEVICE_ATTACH().

Reviewed by: kib
MFC after: 1 week

12 years agoFix error in r233949. Synchronizing icaches on uncacheable pages turns out
nwhitehorn [Wed, 11 Apr 2012 20:28:05 +0000 (20:28 +0000)]
Fix error in r233949. Synchronizing icaches on uncacheable pages turns out
not to be a good idea, and of course the PV entry list for a page is never
empty after the page has been mapped.

12 years agoA couple of changes related to ixgbe operation in netmap mode:
luigi [Wed, 11 Apr 2012 16:11:08 +0000 (16:11 +0000)]
A couple of changes related to ixgbe operation in netmap mode:

- add a sysctl, dev.netmap.ix_crcstrip, to control whether ixgbe should
  strip the CRC on received frames. Defaults to 0, which keeps the CRC.
  and improves performance when receiving min-sized (64-byte) frames.
  This matters because  min-sized frames is one of the standard
  benchmarks for switches and routers, some chipsets seem to issue
  read-modify-write cycles for PCIe transactions that are not a
  full cache line, and a min-sized frame triggers the bug, resulting
  in reduced throughput -- 9.7 instead of 14.88 Mpps -- and heavy
  bus load.

- for the time being, always look for incoming packets on a select/poll
  even if there has not been an interrupt in the meantime. This is
  only a temporary workaround for a probable race condition in keeping
  track of rx interrupts.
  Add a couple of diagnostic vars to help studying the problem.

12 years agoRestore the blank line incorrectly removed in r234104.
jh [Wed, 11 Apr 2012 15:48:50 +0000 (15:48 +0000)]
Restore the blank line incorrectly removed in r234104.

Pointed out by: bde

12 years agoSupport percent-encoded user and password
emaste [Wed, 11 Apr 2012 15:42:02 +0000 (15:42 +0000)]
Support percent-encoded user and password

RFC 1738 specifies that any ":", "@", or "/" within a user name or
password in a URL is percent-encoded, to avoid ambiguity with the use
of those characters as URL component separators.

Reviewed by:    rstone@
MFC after: 1 month

12 years agoEnable prefetching of descriptors on the TX ring, using the same
luigi [Wed, 11 Apr 2012 15:02:14 +0000 (15:02 +0000)]
Enable prefetching of descriptors on the TX ring, using the same
values as in the Intel driver 3.8.21 for linux.  The fact that it
is standard in the above driver suggests that it has no bad side
effects.

But of course there must be a reason for enabling features, not
just "it does not harm", so here it is a good one:

Prefetching enables full line rate even using a single queue (14.88
Mpps, compared to ~12 Mpps without prefetch).  This in turn is
terribly useful when one wants to schedule traffic.

For obvious reasons the difference is only visible with netmap
or other high speed solutions, but presumably the advantage
should be in the order of a fraction of a microsecond when
starting transmission on an empty queue.

Discussed with Jack Vogel.

MFC after: 1 week

12 years agoFix typo (add a missing '%/' in sed)
eadler [Wed, 11 Apr 2012 14:36:05 +0000 (14:36 +0000)]
Fix typo (add a missing '%/' in sed)

Submitted by: jmallett
Approved by: cperciva (implicit)
MFC after: 3 days

12 years agos/Free Memory Pages/Free Memory/ to avoid confusion, since we're
eadler [Wed, 11 Apr 2012 14:18:18 +0000 (14:18 +0000)]
s/Free Memory Pages/Free Memory/ to avoid confusion, since we're
reporting a number of bytes rather than a number of pages

PR: misc/165208
Submitted by: Arnaud Lacombe <lacombar@gmail.com>
Approved by: cperciva
MFC after: 3 days

12 years ago- remove the length shortening on the path
eadler [Wed, 11 Apr 2012 14:13:22 +0000 (14:13 +0000)]
- remove the length shortening on the path
- make the default prompt a bit more like scp
- make the user show as root even when using 'su' instead of 'su -'
- the key bindings didn't hurt anything but likely hide a bug
- merge history instead of overwriting it

Submitted by: gavin, joel
Approved by: cperciva

12 years agoMake the item numbers match the crypt magic number
eadler [Wed, 11 Apr 2012 14:12:28 +0000 (14:12 +0000)]
Make the item numbers match the crypt magic number

PR: docs/166497
Submitted by: Mike Kelly <pioto@pioto.org>
Approved by: cperciva
MFC after: 1 week

12 years agoReturn EBADF instead of EMFILE from dup2 when the second argument is
eadler [Wed, 11 Apr 2012 14:08:09 +0000 (14:08 +0000)]
Return EBADF instead of EMFILE from dup2 when the second argument is
outside the range of valid file descriptors

PR: kern/164970
Submitted by: Peter Jeremy <peterjeremy@acm.org>
Reviewed by: jilles
Approved by: cperciva
MFC after: 1 week

12 years agoIt is a logical error that in carp_multicast_cleanup()
glebius [Wed, 11 Apr 2012 12:26:30 +0000 (12:26 +0000)]
It is a logical error that in carp_multicast_cleanup()
we look at count of addresses on a particular vhid, we
should account number of addresses on cif.

To achieve this we need to run carp_attach() and
carp_detach() under appropriate cif lock.

12 years agoIt seems that libdisk(3) incorrectly sets d_secperunit value.
ae [Wed, 11 Apr 2012 06:35:13 +0000 (06:35 +0000)]
It seems that libdisk(3) incorrectly sets d_secperunit value.
Automatically fix it like GEOM_PART_BSD does.

MFC after: 1 week

12 years agoBack out r228476.
yongari [Wed, 11 Apr 2012 06:34:25 +0000 (06:34 +0000)]
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

12 years agouart_cpu_amd64.c and uart_cpu_i386.c (under sys/dev/uart) are
marcel [Wed, 11 Apr 2012 02:42:01 +0000 (02:42 +0000)]
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.

12 years agoFix the default, non-superg compile.
adrian [Wed, 11 Apr 2012 02:34:32 +0000 (02:34 +0000)]
Fix the default, non-superg compile.

Pointy-hat-to: adrian

12 years agoDo not restore the register holding the TLS pointer when doing various
nwhitehorn [Wed, 11 Apr 2012 00:00:40 +0000 (00:00 +0000)]
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

12 years agoFix compilation with IEEE80211_ENABLE_SUPERG defined.
adrian [Tue, 10 Apr 2012 19:47:44 +0000 (19:47 +0000)]
Fix compilation with IEEE80211_ENABLE_SUPERG defined.

PR: kern/164951

12 years agoConvert the flags over to a set of bit flags.
adrian [Tue, 10 Apr 2012 19:25:43 +0000 (19:25 +0000)]
Convert the flags over to a set of bit flags.

12 years agoBack out r233646. Although it fixed most libgeom consumers under 32-bit
jmallett [Tue, 10 Apr 2012 17:37:24 +0000 (17:37 +0000)]
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

12 years agoQueue CCBs internally instead of using CAM_REQUEUE_REQ status. This fixes
jimharris [Tue, 10 Apr 2012 16:33:19 +0000 (16:33 +0000)]
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

12 years agoFix !SMP build after r234074.
marius [Tue, 10 Apr 2012 16:08:46 +0000 (16:08 +0000)]
Fix !SMP build after r234074.

Reviewed by: attilio, jhb

12 years agoApply changes from r233787 to ext2fs:
jh [Tue, 10 Apr 2012 16:05:52 +0000 (16:05 +0000)]
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

12 years ago- Return EPERM from ufs_setattr() when an user without PRIV_VFS_SYSFLAGS
jh [Tue, 10 Apr 2012 15:59:37 +0000 (15:59 +0000)]
- 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

12 years agoParenthesize args in yyless() and unput() replacement text
schweikh [Tue, 10 Apr 2012 15:29:28 +0000 (15:29 +0000)]
Parenthesize args in yyless() and unput() replacement text
so they are safer when used with expressions.

MFC after: 1 week

12 years agoProperly parse 40G media types from newer Mellanox adapters that are
jhb [Tue, 10 Apr 2012 14:01:09 +0000 (14:01 +0000)]
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

12 years agoAdd media types for 40G media that might be used with FreeBSD.
jhb [Tue, 10 Apr 2012 13:59:35 +0000 (13:59 +0000)]
Add media types for 40G media that might be used with FreeBSD.

Reviewed by: bz
MFC after: 2 weeks

12 years ago- Add rc.d script for kfd, kerberos forwarded tickets daemon.
stas [Tue, 10 Apr 2012 09:27:41 +0000 (09:27 +0000)]
- Add rc.d script for kfd, kerberos forwarded tickets daemon.

12 years agoBlank the aggregate stats whenever the zero ioctl is called.
adrian [Tue, 10 Apr 2012 07:27:42 +0000 (07:27 +0000)]
Blank the aggregate stats whenever the zero ioctl is called.

12 years agoSquirrel away SYNC interrupt debugging if it's enabled in the HAL.
adrian [Tue, 10 Apr 2012 07:23:37 +0000 (07:23 +0000)]
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().

12 years agoRevert this for now - it may work for -8 and -9 and -HEAD, but not
adrian [Tue, 10 Apr 2012 07:16:28 +0000 (07:16 +0000)]
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.

12 years agoSquirrel away the SYNC interrupt in case we're doing interrupt debugging.
adrian [Tue, 10 Apr 2012 07:11:33 +0000 (07:11 +0000)]
Squirrel away the SYNC interrupt in case we're doing interrupt debugging.

12 years agoM_DONTWAIT is a flag from historical mbuf(9)
glebius [Tue, 10 Apr 2012 06:52:39 +0000 (06:52 +0000)]
M_DONTWAIT is a flag from historical mbuf(9)
allocator, not malloc(9) or uma(9) flag.

12 years agoM_DONTWAIT is a flag from historical mbuf(9)
glebius [Tue, 10 Apr 2012 06:52:21 +0000 (06:52 +0000)]
M_DONTWAIT is a flag from historical mbuf(9)
allocator, not malloc(9) or uma(9) flag.

12 years ago* Since the API changed along the -CURRENT path (december 2011),
adrian [Tue, 10 Apr 2012 06:25:11 +0000 (06:25 +0000)]
* 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.)

12 years agoCARP should be capable to run on if_bridge(4). Unfortunately,
glebius [Tue, 10 Apr 2012 05:42:48 +0000 (05:42 +0000)]
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>

12 years agoUpdate examples with corrections from the author
eadler [Tue, 10 Apr 2012 01:49:31 +0000 (01:49 +0000)]
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)

12 years agoBSP is not added to the mask of valid target CPUs for interrupts
attilio [Mon, 9 Apr 2012 22:41:19 +0000 (22:41 +0000)]
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

12 years agoRemove unused and wrong SA_PROC internal signal property.
jilles [Mon, 9 Apr 2012 21:58:58 +0000 (21:58 +0000)]
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.

12 years agoImprove error reporting when no cpufreq(4) support is available.
rmh [Mon, 9 Apr 2012 20:59:14 +0000 (20:59 +0000)]
Improve error reporting when no cpufreq(4) support is available.

Reviewed by: njl, acpi

12 years agoInclude <signal.h> (for SIGINFO).
rmh [Mon, 9 Apr 2012 20:55:23 +0000 (20:55 +0000)]
Include <signal.h> (for SIGINFO).

12 years agoMicrooptimize cpu_search().
mav [Mon, 9 Apr 2012 18:24:58 +0000 (18:24 +0000)]
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.

12 years ago- Introduce a cache-miss optimization for consistency with other
attilio [Mon, 9 Apr 2012 17:05:18 +0000 (17:05 +0000)]
- 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

12 years agoSince truss also uses kdump's mkioctls script, pass the value of ${CPP}
dim [Mon, 9 Apr 2012 15:34:22 +0000 (15:34 +0000)]
Since truss also uses kdump's mkioctls script, pass the value of ${CPP}
there too, similar to r234058.

MFC after: 1 week

12 years agoRecognize the RDRAND instruction feature.
jhb [Mon, 9 Apr 2012 15:20:16 +0000 (15:20 +0000)]
Recognize the RDRAND instruction feature.

Submitted by: Michael Fuckner  michael fuckner net
MFC after: 3 days

12 years agoIn kdump's mkioctls script, use '${CPP}' instead of hardcodedly using
dim [Mon, 9 Apr 2012 14:47:18 +0000 (14:47 +0000)]
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

12 years agosem_open: Make sure to fail an O_CREAT|O_EXCL open, even if that semaphore
jilles [Mon, 9 Apr 2012 14:17:22 +0000 (14:17 +0000)]
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

12 years agoFix a couple of style issues. Tweak grammar and markup while here.
bjk [Mon, 9 Apr 2012 01:20:50 +0000 (01:20 +0000)]
Fix a couple of style issues. Tweak grammar and markup while here.

Approved by: hrs (mentor)

12 years agointpm: return only SMB bus error codes from SMB methods
avg [Sun, 8 Apr 2012 20:48:39 +0000 (20:48 +0000)]
intpm: return only SMB bus error codes from SMB methods

PR: kern/25733
MFC after: 5 days

12 years agointpm: reflect the fact that SB800 and later AMD chipsets are not supported
avg [Sun, 8 Apr 2012 19:58:38 +0000 (19:58 +0000)]
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

12 years agoFix mincore(2) so that it reports PG_CACHED pages as resident.
alc [Sun, 8 Apr 2012 18:25:12 +0000 (18:25 +0000)]
Fix mincore(2) so that it reports PG_CACHED pages as resident.

MFC after: 2 weeks

12 years agoIf a page belonging a reservation is cached, then mark the reservation so
alc [Sun, 8 Apr 2012 17:00:46 +0000 (17:00 +0000)]
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

12 years agoFix panic in ffs_reload(), which may happen when read-only filesystem
trasz [Sun, 8 Apr 2012 13:44:55 +0000 (13:44 +0000)]
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

12 years agoMerge a local fix to OpenBSM's libauditd to avoid a directory descriptor
rwatson [Sun, 8 Apr 2012 11:05:22 +0000 (11:05 +0000)]
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

12 years agoWhen allocation of labels on files is implicitly disabled due to MAC
rwatson [Sun, 8 Apr 2012 11:01:49 +0000 (11:01 +0000)]
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

12 years ago- Update FreeBSD's Heimdal distribution to 1.5.2. This is a bugfix
stas [Sun, 8 Apr 2012 08:19:17 +0000 (08:19 +0000)]
- Update FreeBSD's Heimdal distribution to 1.5.2.  This is a bugfix
  release, which fixes a DoS issue in libkrb5.

12 years agoExpand locking around identification of filesystem mount point when
mckusick [Sun, 8 Apr 2012 06:20:21 +0000 (06:20 +0000)]
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

12 years agoAdd I/O accounting to msdos filesystem.
mckusick [Sun, 8 Apr 2012 06:18:18 +0000 (06:18 +0000)]
Add I/O accounting to msdos filesystem.

Suggested and reviewed by: kib

12 years agoDrop an unnecessary setting of si_mountpt when updating a UFS mount point.
mckusick [Sun, 8 Apr 2012 06:14:49 +0000 (06:14 +0000)]
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

12 years agoTeach wlanstats about the new BAR TX statistics.
adrian [Sun, 8 Apr 2012 04:51:43 +0000 (04:51 +0000)]
Teach wlanstats about the new BAR TX statistics.

12 years agoAdd some statistics to track BAR TX.
adrian [Sun, 8 Apr 2012 04:51:25 +0000 (04:51 +0000)]
Add some statistics to track BAR TX.

12 years agoAdd AR_ISR_S5 and AR_ISR_S5_S.
adrian [Sun, 8 Apr 2012 04:42:53 +0000 (04:42 +0000)]
Add AR_ISR_S5 and AR_ISR_S5_S.

12 years agoUnlike other functions __aeabi_read_tp function must preserve r1-r3. The
andrew [Sun, 8 Apr 2012 04:36:27 +0000 (04:36 +0000)]
Unlike other functions __aeabi_read_tp function must preserve r1-r3. The
currently generated code clobbers r3. Fix this by loading ARM_TP_ADDRESS
using inline assembly.

Approved by: imp (mentor)

12 years ago- Add a "real" symbol version map to libasn1. The upstream version
stas [Sun, 8 Apr 2012 04:22:09 +0000 (04:22 +0000)]
- Add a "real" symbol version map to libasn1.  The upstream version
  of the version map just exported all the symbols, which caused a
  binutils bug being triggered when ld fails to link two objects, one
  of which exports a versioned version of the symbol, and another --
  unversioned. [1]
- Also add version map for libkafs5.

Submitted by: jchandra@ (based on)

12 years ago- Use __NO_TLS preprocessor value to make assumptions about TLS support
stas [Sun, 8 Apr 2012 03:55:25 +0000 (03:55 +0000)]
- Use __NO_TLS preprocessor value to make assumptions about TLS support
  on a platform.

12 years agoAfter reviewing the mcast/sleep station code a little, undo some brain
adrian [Sun, 8 Apr 2012 00:40:16 +0000 (00:40 +0000)]
After reviewing the mcast/sleep station code a little, undo some brain
damage which I committed when I had less clue about such things.

Don't ever put normal data frames on the mcast software queue.
Just put mcast frames there if needed.

Pass the txq decision into ath_tx_normal_setup(), as we've already made
the decision.  Don't re-do it.

Whilst i'm here, add another random debugging statement.

12 years ago- Revert part of r234005, which I did not intend to commit.
stas [Sat, 7 Apr 2012 23:51:16 +0000 (23:51 +0000)]
- Revert part of r234005, which I did not intend to commit.
  Sorry! :(