]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoDo not force a writer to the devfs file to drain the buffer writes.
kib [Sun, 23 Dec 2012 22:43:27 +0000 (22:43 +0000)]
Do not force a writer to the devfs file to drain the buffer writes.

Requested and tested by: Ian Lepore <freebsd@damnhippie.dyndns.org>
MFC after: 2 weeks

11 years agoenable building picobsd with CC instead of CLANG
luigi [Sun, 23 Dec 2012 22:41:54 +0000 (22:41 +0000)]
enable building picobsd with CC instead of CLANG

11 years agoPull in r170096 from upstream clang trunk:
andrew [Sun, 23 Dec 2012 21:41:39 +0000 (21:41 +0000)]
Pull in r170096 from upstream clang trunk:

  Initial support for FreeBSD on ARM.

11 years agoRemove extraneous space and new-line.
matthew [Sun, 23 Dec 2012 20:39:03 +0000 (20:39 +0000)]
Remove extraneous space and new-line.

Submitted by: pjd, gcooper
Approved by: bapt
MFC after: 2 weeks

11 years agoFix the Makefile so it can build gssd.c after r244604.
rmacklem [Sun, 23 Dec 2012 20:12:57 +0000 (20:12 +0000)]
Fix the Makefile so it can build gssd.c after r244604.

MFC after: 2 weeks

11 years agozfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead
avg [Sun, 23 Dec 2012 19:58:41 +0000 (19:58 +0000)]
zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead

To do: remove KM_ZERO declaration
Pointyhat to: avg (for mindlessly using the pseudo-flag)
MFC after: instantly (to fix stable/8 build)

11 years agoAdd parentheses to IP_FW_ARG_TABLEARG() definition.
melifaro [Sun, 23 Dec 2012 18:35:42 +0000 (18:35 +0000)]
Add parentheses to IP_FW_ARG_TABLEARG() definition.

Suggested by: glebius
MFC with: r244633

11 years agoUse unified IP_FW_ARG_TABLEARG() macro for most tablearg checks.
melifaro [Sun, 23 Dec 2012 16:28:18 +0000 (16:28 +0000)]
Use unified IP_FW_ARG_TABLEARG() macro for most tablearg checks.
Log real value instead of IP_FW_TABLEARG (65535) in ipfw_log().

Noticed by: Vitaliy Tokarenko <rphone@ukr.net>
MFC after: 2 weeks

11 years agoCorrect a series of errors in the hand-rolled locking for drace_debug.c:
rstone [Sun, 23 Dec 2012 15:50:37 +0000 (15:50 +0000)]
Correct a series of errors in the hand-rolled locking for drace_debug.c:

- Use spinlock_enter()/spinlock_exit() to prevent a thread holding a
  debug lock from being preempted to prevent other threads waiting
  on that lock from starvation.

- Handle the possibility of CPU migration in between the fetch of curcpu
  and the call to spinlock_enter() by saving curcpu in a local variable.

- Use memory barriers to prevent reordering of loads and stores of the
  data protected by the lock outside of the critical section

- Eliminate false sharing of the locks by moving them into the structures
  that they protect and aligning them to a cacheline boundary.

- Record the owning thread in the lock to make debugging future problems
  easier.

Reviewed by: rpaulo (initial version)
MFC after: 2 weeks

11 years agoUPDATING: add a note about the clang+zfs+i386 stack overflow issue
avg [Sun, 23 Dec 2012 13:04:04 +0000 (13:04 +0000)]
UPDATING: add a note about the clang+zfs+i386 stack overflow issue

11 years agoUpgrade our copy of llvm/clang to 3.2 release.
dim [Sun, 23 Dec 2012 13:04:00 +0000 (13:04 +0000)]
Upgrade our copy of llvm/clang to 3.2 release.

Release notes for llvm:
http://llvm.org/releases/3.2/docs/ReleaseNotes.html

Release notes for clang:
http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html

MFC after: 2 weeks

11 years agolock.9: fix incorrect descriptions of LK_SHARED and LK_DOWNGRADE behavior
avg [Sun, 23 Dec 2012 12:56:04 +0000 (12:56 +0000)]
lock.9: fix incorrect descriptions of LK_SHARED and LK_DOWNGRADE behavior

Reviewed by: attilio
MFC after: 5 days
X-MFC after: r243900

11 years agoThird time's the charm. pkg -N output needs to go to stderr.
matthew [Sun, 23 Dec 2012 11:22:18 +0000 (11:22 +0000)]
Third time's the charm.  pkg -N output needs to go to stderr.

Approved by: bapt
MFC after: 2 weeks

11 years agoFix regression issue after r244503.
hselasky [Sun, 23 Dec 2012 10:21:01 +0000 (10:21 +0000)]
Fix regression issue after r244503.

MFC after: 1 week

11 years agoDocument the new gssd daemon options added by r244604.
rmacklem [Sat, 22 Dec 2012 23:34:28 +0000 (23:34 +0000)]
Document the new gssd daemon options added by r244604.
This is a content change.

MFC after: 2 weeks

11 years agoIt was reported via email that some sshds create kerberos
rmacklem [Sat, 22 Dec 2012 23:21:17 +0000 (23:21 +0000)]
It was reported via email that some sshds create kerberos
credential cache files with names other than /tmp/krb5cc_<uid>.
The gssd daemon does not know how to find these credential caches.
This patch implements a new option "-s" that does a search for
credential cache files, using roughly the same algorithm as the
gssd daemon for Linux uses. The gssd behaviour is only changed
if the new "-s" option is specified. It also implements two other
new options related to the "-s" option.

Reported by: Piete.Brooks at cl.cam.ac.uk, Herbert Poeckl
Tested by: Herbert Poeckl (admin at ist.tugraz.at), Illias A. Marinos
MFC after: 2 weeks

11 years agoMFV r244559:
mm [Sat, 22 Dec 2012 21:32:12 +0000 (21:32 +0000)]
MFV r244559:
Update contrib/xz to version 5.0.4

MFC after: 2 weeks

11 years agoFix a bug in ld --gc-sections: it strips out .note sections, while it
dim [Sat, 22 Dec 2012 20:46:46 +0000 (20:46 +0000)]
Fix a bug in ld --gc-sections: it strips out .note sections, while it
should never do so.  This can cause global constructors and destructors
to not be executed at run-time, resulting in crashes and other strange
behaviour.

Reported by: rene
MFC after: 1 week

11 years agoPull in r170353 from upstream llvm trunk:
dim [Sat, 22 Dec 2012 20:16:21 +0000 (20:16 +0000)]
Pull in r170353 from upstream llvm trunk:

  Fix another SROA crasher, PR14601.

  This was a silly oversight, we weren't pruning allocas which were used
  by variable-length memory intrinsics from the set that could be widened
  and promoted as integers. Fix that.

This should fix the following assertion failure:

  Assertion failed: (CanSROA), function visitUsers, file
  /usr/src/lib/clang/libllvmscalaropts/../../../contrib/llvm/lib/Transforms/Scalar/SROA.cpp,
  line 2395.

Reported by: gerald

11 years agoSwitch from 'pkg -n' to 'pkg -N' as the test for pkgn activation
matthew [Sat, 22 Dec 2012 15:13:16 +0000 (15:13 +0000)]
Switch from 'pkg -n' to 'pkg -N' as the test for pkgn activation
status. '-n' is already used extensively elsewhere in pkgng (to mean
'dry-run') and this reduces the potential confusion

Submitted by: eadler
Approved by: bapt
MFC after: 2 weeks

11 years agoMangle label names containing spaces, non-printable characters '%' or
jh [Sat, 22 Dec 2012 13:43:12 +0000 (13:43 +0000)]
Mangle label names containing spaces, non-printable characters '%' or
'"'.  Mangling is only done for label names read from file system
metadata. Encoding resembles URL encoding. For example, the space
character becomes %20.

Help by: kib
Discussed with: imp, kib, pjd

11 years agoReject spaces and double quotation marks in device names. devctl(4)
jh [Sat, 22 Dec 2012 13:33:28 +0000 (13:33 +0000)]
Reject spaces and double quotation marks in device names. devctl(4)
and devd(8) can't handle names with such characters properly.

PR: bin/144736, kern/161912
Discussed with: imp, kib, pjd

11 years agoFixup r240424: On entering KDB backends, the hijacked thread to run
attilio [Sat, 22 Dec 2012 09:37:34 +0000 (09:37 +0000)]
Fixup r240424: On entering KDB backends, the hijacked thread to run
interrupt context can still be idlethread. At that point, without the
panic condition, it can still happen that idlethread then will try to
acquire some locks to carry on some operations.

Skip the idlethread check on block/sleep lock operations when KDB is
active.

Reported by: jh
Tested by: jh
MFC after: 1 week

11 years agocxgbe(4): Add support for the T440-LP-CR card. This is the 4x10G low
np [Sat, 22 Dec 2012 07:47:07 +0000 (07:47 +0000)]
cxgbe(4): Add support for the T440-LP-CR card.  This is the 4x10G low
profile card with a QSFP+ transceiver.

MFC after: 3 days

11 years agoAdd the missing '$' from the LIBNETBSD variable
andrew [Sat, 22 Dec 2012 04:53:35 +0000 (04:53 +0000)]
Add the missing '$' from the LIBNETBSD variable

11 years agoMake struct fstate aligned to the same as an int as its pointer is cast to
andrew [Sat, 22 Dec 2012 04:11:59 +0000 (04:11 +0000)]
Make struct fstate aligned to the same as an int as its pointer is cast to
an int pointer in args.c. This fixes an issue with ARM where the struct
will be byte aligned but an int pointer must be 4 byte aligned.

11 years agoif_start() is being used here as a way of kick-starting the new queue
adrian [Sat, 22 Dec 2012 01:17:49 +0000 (01:17 +0000)]
if_start() is being used here as a way of kick-starting the new queue
processing.  For if_transmit() style hardware drivers (which none publicly
exist yet, for wireless) they will need to still implement if_start()
but only to re-start the TX queue.

11 years agoRemove a use of if_start() - instead, use if_transmit() to dispatch the
adrian [Sat, 22 Dec 2012 01:16:28 +0000 (01:16 +0000)]
Remove a use of if_start() - instead, use if_transmit() to dispatch the
frame.

11 years agoThe manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
cognet [Sat, 22 Dec 2012 01:04:29 +0000 (01:04 +0000)]
The manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
allocate a map or mapping resources.  That seems to imply that any memory
allocations it does must use M_NOWAIT and check for NULL.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoThe VM_MEMATTR_ constants are enumerated, not a bitset. Compare accordingly.
cognet [Sat, 22 Dec 2012 01:03:23 +0000 (01:03 +0000)]
The VM_MEMATTR_ constants are enumerated, not a bitset.  Compare accordingly.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years ago - Reduce buffer size from LINE_MAX to PATH_MAX, there is no point to store
delphij [Fri, 21 Dec 2012 22:20:59 +0000 (22:20 +0000)]
 - Reduce buffer size from LINE_MAX to PATH_MAX, there is no point to store
   path longer than this.
 - Fix an unreached case of check against sizeof buf, which in turn leads
   to an off-by-one nul byte write on the stack.  The original condition
   can never be satisfied because the passed boundary is the maximum value
   that can be returned, so code was harmless.

MFC after: 1 month

11 years agoReduce stack usage in the USB audio driver by moving some large stack
hselasky [Fri, 21 Dec 2012 21:41:23 +0000 (21:41 +0000)]
Reduce stack usage in the USB audio driver by moving some large stack
elements to the USB audio softc structure. This fixes a double CPU
fault when attaching USB audio devices in 10-current for i386 at
least.

MFC after: 1 week

11 years agoSplit dialog(1)-based validators for hostname/netmask into two, providing
dteske [Fri, 21 Dec 2012 21:33:47 +0000 (21:33 +0000)]
Split dialog(1)-based validators for hostname/netmask into two, providing
transparent validators that can be used free of dialog(1) where needed.

Syntax/return of the original dialog(1)-based validators remains unchanged.

11 years agoRemove unused include.
dteske [Fri, 21 Dec 2012 21:03:34 +0000 (21:03 +0000)]
Remove unused include.

11 years agoAdd NetBSD's mtree to the tree and install it as nmtree as the first step
brooks [Fri, 21 Dec 2012 21:00:00 +0000 (21:00 +0000)]
Add NetBSD's mtree to the tree and install it as nmtree as the first step
towards replacing our mtree.

Sponsored by: DARPA, AFRL
Thanks to: cristos@NetBSD for reviewing and committing my patches
wiz@NetBSD for fixing typos in my patches

11 years agoChange axiom for initialization. Including script can disable (default)
dteske [Fri, 21 Dec 2012 20:46:58 +0000 (20:46 +0000)]
Change axiom for initialization. Including script can disable (default)
automatic initialization by setting appropriate variable to particular value.

11 years agoAdd libnetbsd, a thin compatibility layer intended to allow a limited
brooks [Fri, 21 Dec 2012 20:37:38 +0000 (20:37 +0000)]
Add libnetbsd, a thin compatibility layer intended to allow a limited
set of NetBSD software to compile as part of the FreeBSD build with
little or no modifiction.  It is built as a static library and not
installed for general use.  Likewise, its header files are not
installed.

Sponsored by: DARPA, AFRL

11 years agoRemove erroneous use of "local" (not in a function).
dteske [Fri, 21 Dec 2012 20:36:12 +0000 (20:36 +0000)]
Remove erroneous use of "local" (not in a function).

11 years agoNew f_show_info() function for dialog(1) --infobox using printf(1) syntax.
dteske [Fri, 21 Dec 2012 20:29:28 +0000 (20:29 +0000)]
New f_show_info() function for dialog(1) --infobox using printf(1) syntax.

11 years agoUse f_show_help() where printf(1) syntax is desired.
dteske [Fri, 21 Dec 2012 20:11:41 +0000 (20:11 +0000)]
Use f_show_help() where printf(1) syntax is desired.

11 years agoIn preparation for making 'pkg -n' the one true method of determining
matthew [Fri, 21 Dec 2012 20:01:13 +0000 (20:01 +0000)]
In preparation for making 'pkg -n' the one true method of determining
whether a system has been configured to use pkgng, cause /usr/sbin/pkg
recognise a -n option and exit with a failure code when the pkg port
is not installed.

Approved by: bapt
MFC after: 2 weeks

11 years agocxgbe(4): must hold a write-lock on the table while allocating an L2
np [Fri, 21 Dec 2012 19:28:17 +0000 (19:28 +0000)]
cxgbe(4): must hold a write-lock on the table while allocating an L2
entry for switching.

MFC after: 3 days

11 years agoImprove the debugging abilities and clean up debug messages. In most cases,
dteske [Fri, 21 Dec 2012 19:26:17 +0000 (19:26 +0000)]
Improve the debugging abilities and clean up debug messages. In most cases,
all one has to do is set the environment variable DEBUGGING to get the debug
messages to appear on the console.

11 years agoPut kthreads under curproc so they are attached to nvmecontrol rather
jimharris [Fri, 21 Dec 2012 19:13:48 +0000 (19:13 +0000)]
Put kthreads under curproc so they are attached to nvmecontrol rather
than pid 0.

Sponsored by: Intel

11 years agoAdd much-needed dialog(1) --inputbox function for simplifying the process of
dteske [Fri, 21 Dec 2012 18:58:19 +0000 (18:58 +0000)]
Add much-needed dialog(1) --inputbox function for simplifying the process of
requesting input from the user.

11 years agoTag 2012-12-21 import of NetBSD's mknod
brooks [Fri, 21 Dec 2012 17:08:17 +0000 (17:08 +0000)]
Tag 2012-12-21 import of NetBSD's mknod

11 years agoVendor import of pack_dev.* from NetBSD's mknod at 2012-12-21
brooks [Fri, 21 Dec 2012 17:08:01 +0000 (17:08 +0000)]
Vendor import of pack_dev.* from NetBSD's mknod at 2012-12-21

11 years agoTag 2012-12-21 import of NetBSD's mtree
brooks [Fri, 21 Dec 2012 16:54:33 +0000 (16:54 +0000)]
Tag 2012-12-21 import of NetBSD's mtree

11 years agoVendor import of NetBSD's mtree at 2012-12-21
brooks [Fri, 21 Dec 2012 16:54:00 +0000 (16:54 +0000)]
Vendor import of NetBSD's mtree at 2012-12-21

11 years agoFix socket calls on error post-r243965.
kevlo [Fri, 21 Dec 2012 15:54:13 +0000 (15:54 +0000)]
Fix socket calls on error post-r243965.

Submitted by: Garrett Cooper

11 years agoMove the 64-bit _setjmp to lib/libstand.
rpaulo [Fri, 21 Dec 2012 15:15:35 +0000 (15:15 +0000)]
Move the 64-bit _setjmp to lib/libstand.

11 years agoRegression issue:
hselasky [Fri, 21 Dec 2012 14:17:39 +0000 (14:17 +0000)]
Regression issue:
Use a boundary of zero, hence a PAGE_SIZE boundary
is implied by all memory allocations.

Background:
Busdma has problems to allocate more than PAGE_SIZE
bytes when the boundary is PAGE_SIZE bytes too.
Initially it was thought that a boundary of PAGE_SIZE
bytes will only affect loading of DMA memory, so that
segments get split correctly, but it also affects
allocation of DMA'able memory.

Solution:
USB can detect big segments and split them as required
by the USB code.

MFC after: 1 week
Reported by: gonzo

11 years agoFixup r218424: uio_yield() was scaling directly to userland priority.
attilio [Fri, 21 Dec 2012 13:14:12 +0000 (13:14 +0000)]
Fixup r218424: uio_yield() was scaling directly to userland priority.
When kern_yield() was introduced with the possibility to specify
a new priority, the behaviour changed by not lowering priority at all
in the consumers, making the yielding mechanism highly ineffective for
high priority kthreads like bufdaemon, syncer, vlrudaemon, etc.
There are no evidences that consumers could bear with such change in
semantic and this situation could finally lead to bugs similar to the
ones fixed in r244240.
Re-specify userland pri for kthreads involved.

Tested by: pho
Reviewed by: kib, mdf
MFC after: 1 week

11 years ago Comment fix: there is no ub_ptr, instead explain meaning of uz_count
glebius [Fri, 21 Dec 2012 10:09:45 +0000 (10:09 +0000)]
  Comment fix: there is no ub_ptr, instead explain meaning of uz_count
field verbally.

11 years agoBuild a 64 bit version of the FICL library. This is need for a 64 bit
rpaulo [Fri, 21 Dec 2012 05:22:14 +0000 (05:22 +0000)]
Build a 64 bit version of the FICL library. This is need for a 64 bit
EFI bootloader (amd64 only for now).

This is not yet connected to the build.

11 years agoDivine the array size by using 'nitems(array)' instead of using magic numbers.
neel [Fri, 21 Dec 2012 04:44:40 +0000 (04:44 +0000)]
Divine the array size by using 'nitems(array)' instead of using magic numbers.

Suggested by: Garrett Cooper

11 years agoNote why fast frames is disabled for 802.11n NICs now.
adrian [Fri, 21 Dec 2012 04:28:05 +0000 (04:28 +0000)]
Note why fast frames is disabled for 802.11n NICs now.

It actually works, but net80211 handles A-MPDU and Fast frames
incorrectly; it tries enabling both in some instances, with tragic
results.

11 years agoSort default option lists
emaste [Fri, 21 Dec 2012 02:18:11 +0000 (02:18 +0000)]
Sort default option lists

11 years agoThe MPtable specification allows for an 8-bit "BUS ID" and "I/O APIC ID".
neel [Fri, 21 Dec 2012 01:31:56 +0000 (01:31 +0000)]
The MPtable specification allows for an 8-bit "BUS ID" and "I/O APIC ID".

Since the 'busses[]' and 'apics[]' arrays are indexed by these 8-bit IDs
make sure that they have enough space to accomodate up to 256 entries.

Submitted by: Ravi Shamanna
Obtained from: NetApp

11 years agoTeach acpidump to dump the DMA Remapping Reporting table (aka DMAR).
neel [Fri, 21 Dec 2012 01:19:48 +0000 (01:19 +0000)]
Teach acpidump to dump the DMA Remapping Reporting table (aka DMAR).

The DMAR table is documented in chapter 8 of the Intel VT-d specification.

Reviewed by: jhb
Obtained from: NetApp

11 years ago- Make sure that errno isn't modified before calling logerror() in error
markj [Thu, 20 Dec 2012 23:21:20 +0000 (23:21 +0000)]
- Make sure that errno isn't modified before calling logerror() in error
  conditions.
- Don't check for AF_INET6 when compiled without INET6 support.

PR: bin/173930
Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoDon't reload syslogd after rotating sendmail.st, as this file isn't
markj [Thu, 20 Dec 2012 23:18:36 +0000 (23:18 +0000)]
Don't reload syslogd after rotating sendmail.st, as this file isn't
managed by syslogd.

PR: conf/169973
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years ago- Change the memory heuristics to an actually working one
gabor [Thu, 20 Dec 2012 22:30:40 +0000 (22:30 +0000)]
- Change the memory heuristics to an actually working one

Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>
Prodded by: kib

11 years agorename the 'tag' and 'map' fields used the rx ring to their
luigi [Thu, 20 Dec 2012 22:26:03 +0000 (22:26 +0000)]
rename the 'tag' and 'map' fields used the rx ring to their
previous names, 'ptag' and 'pmap' -- p stands for packet.

This change reduces the difference between the code in stable/9
and head, and also helps using the same ixgbe_netmap.h on both branches.

Approved by: Jack Vogel

11 years agoAdd etc/periodic/daily/220.backup-pkgdb to OptionalObsoleteFiles.inc
bapt [Thu, 20 Dec 2012 22:07:47 +0000 (22:07 +0000)]
Add etc/periodic/daily/220.backup-pkgdb to OptionalObsoleteFiles.inc

11 years agoRewrite fdgrowtable() so common mortals can actually understand what
des [Thu, 20 Dec 2012 20:18:27 +0000 (20:18 +0000)]
Rewrite fdgrowtable() so common mortals can actually understand what
it does and how, and add comments describing the data structures and
explaining how they are managed.

11 years agoMake SES driver to not fall out on some errors in Additional Status page.
mav [Thu, 20 Dec 2012 19:51:32 +0000 (19:51 +0000)]
Make SES driver to not fall out on some errors in Additional Status page.
This allows CAM devices still get their physical paths even if status of
later elements it corrupted.

Sponsored by: iXsystems, Inc.

11 years agoMake sure all USB drivers allocate buffer memory
hselasky [Thu, 20 Dec 2012 18:38:02 +0000 (18:38 +0000)]
Make sure all USB drivers allocate buffer memory
through the USB API and/or busdma.

The following assumptions have been made:
umass - buffers passed from CAM/SCSI layer are OK
network - mbufs are OK.

Some other nits while at it.

MFC after: 1 week
Suggested by: imp

11 years agoAllocate separate USB buffers for DMA'ed data, so that
hselasky [Thu, 20 Dec 2012 18:13:37 +0000 (18:13 +0000)]
Allocate separate USB buffers for DMA'ed data, so that
DMA data does not reside next to non DMA data. This
might cause more memory to be allocated, but solves
problems on platforms using manual cache
synchronization.

Add a convenience function to get the buffer only
from a USB transfer's page cache structure.

MFC after: 1 week
Suggested by: imp

11 years agoMake bsdgrep behave as gnugrep and as documented: -m should only stop
eadler [Thu, 20 Dec 2012 17:38:14 +0000 (17:38 +0000)]
Make bsdgrep behave as gnugrep and as documented: -m should only stop
reading the specific file, not any file.

Tested by: frogs (irc)
Reviewed by: gabor
Approved by: cperciva (implicit)
MFC after: 1 week

11 years agoAdd support for throttling UMASS.
hselasky [Thu, 20 Dec 2012 17:14:10 +0000 (17:14 +0000)]
Add support for throttling UMASS.
Mostly useful for debugging purposes.

MFC after: 1 week

11 years agoMake sure we block recursion on TTY's inwakeup callback
hselasky [Thu, 20 Dec 2012 16:21:02 +0000 (16:21 +0000)]
Make sure we block recursion on TTY's inwakeup callback

Suggested by: davide
MFC after: 1 week

11 years agomake installation of the 220.backup-pkgdb periodic script depend on PKGTOOLS
bapt [Thu, 20 Dec 2012 11:39:20 +0000 (11:39 +0000)]
make installation of the 220.backup-pkgdb periodic script depend on PKGTOOLS
knob

11 years agoRecognize 5720S PHY and treat it as 5708S PHY.
yongari [Thu, 20 Dec 2012 05:02:12 +0000 (05:02 +0000)]
Recognize 5720S PHY and treat it as 5708S PHY.
Unfortunately 5720S uses 5709S PHY id so add a hack to detect 5720S
PHY by checking parent device name.  5720S PHY does not support 2500SX.

Tested by: Geans Pin < geanspin <> broadcom dot com >

11 years agoFor fiber PHYs, BRGPHY_MII_1000CTL register is not defined at all
yongari [Thu, 20 Dec 2012 04:47:31 +0000 (04:47 +0000)]
For fiber PHYs, BRGPHY_MII_1000CTL register is not defined at all
so do not touch it.

11 years agoReplace generic ARM11 option with more specific
gonzo [Thu, 20 Dec 2012 04:32:02 +0000 (04:32 +0000)]
Replace generic ARM11 option with more specific
support for ARM1136 and ARM1176

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
Obtained from: NetBSD

11 years agoFix misleading comment
gonzo [Thu, 20 Dec 2012 03:33:33 +0000 (03:33 +0000)]
Fix misleading comment

11 years agoMore constant renaming in preparation for newer features.
pfg [Thu, 20 Dec 2012 02:22:36 +0000 (02:22 +0000)]
More constant renaming in preparation for newer features.

We also try to make better use of the fs flags instead of
trying adapt the code according to the fs structures. In
the case of subsecond timestamps and birthtime we now
check that the feature is explicitly enabled: previously
we only checked that the reserved space was available and
silently wrote them.

This approach is much safer, especially if the filesystem
happens to use embedded inodes or support EAs.

Discussed with: Zheng Liu
MFC after: 5 days

11 years agoWe want to build subr_busdma_bufalloc.c on arm.
cognet [Thu, 20 Dec 2012 00:57:24 +0000 (00:57 +0000)]
We want to build subr_busdma_bufalloc.c on arm.

11 years agoUse C comments instead of C++ comments.
cognet [Thu, 20 Dec 2012 00:50:04 +0000 (00:50 +0000)]
Use C comments instead of C++ comments.

Spotted out by: gonzo (thanks, man)

11 years agoBusdma enhancements, especially for managing small uncacheable buffers.
cognet [Thu, 20 Dec 2012 00:38:08 +0000 (00:38 +0000)]
Busdma enhancements, especially for managing small uncacheable buffers.

- Use the new architecture-agnostic buffer pool manager that uses uma(9)
  to manage a set of power-of-2 sized buffers for bus_dmamem_alloc().

- Create pools of buffers backed by both regular and uncacheable memory,
  and use them to handle regular versus BUS_DMA_COHERENT allocations.

- Use uma(9) to manage a pool of bus_dmamap structs instead of local code
  to manage a static list of 500 items (it took 3300 maps to get to
  multi-user mode, so the static pool wasn't much of an optimization).

- Small BUS_DMA_COHERENT allocations no longer waste an entire page per
  allocation, or set pages to uncached when they contain data other than
  DMA buffers.  There's no longer a need for drivers to work around the
  inefficiency by allocing large buffers then sub-dividing them.

- Because we know the alignment and padding of buffers allocated by
  bus_dmamem_alloc() (whether coherent or regular memory, and whether
  obtained from the pool allocator or directly from the kernel) we
  can avoid doing partial cacheline flushes on them.

- Add a fast-out to _bus_dma_could_bounce() (and some comments about
  what the routine really does because the old misplaced comment was wrong).

- Everywhere the dma tag alignment is used, the interpretation is that
  an alignment of 1 means no special alignment.  If the tag is created
  with an alignment argument of zero, store it in the tag as one, and
  remove all the code scattered around that changed 0->1 at point of use.

- Remove stack-allocated arrays of segments, use a local array of two
  segments within the tag struct, or dynamically allocate an array at first
  use if nsegments > 2.  On an arm system I tested, only 5 of 97 tags used
  more than two segments.  On my x86 desktop it was only 7 of 111 tags.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoUse the new allocator in bus_dmamem_alloc().
cognet [Thu, 20 Dec 2012 00:35:26 +0000 (00:35 +0000)]
Use the new allocator in bus_dmamem_alloc().

11 years agoCreate an architecture-agnostic buffer pool manager that uses uma(9) to
cognet [Thu, 20 Dec 2012 00:34:54 +0000 (00:34 +0000)]
Create an architecture-agnostic buffer pool manager that uses uma(9) to
manage a set of power-of-2 sized buffers for bus_dmamem_alloc().

This allows the caller to provide the back-end allocator uma allocator,
allowing full control of the memory pages backing the pool.  For
convenience, it provides an optional builtin allocator that provides pages
allocated with the VM_MEMATTR_UNCACHEABLE attribute, for managing pools of
DMA buffers for BUS_DMA_COHERENT or BUS_DMA_NOCACHE.

This also allows the caller to specify a minimum alignment, and it ensures
that all buffers start on a boundary and have a length that's a multiple of
that value, to avoid using buffers that trigger partial cache line flushes.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoGet the old NFSCLIENT to compile by adding now needed files.
cognet [Thu, 20 Dec 2012 00:06:24 +0000 (00:06 +0000)]
Get the old NFSCLIENT to compile by adding now needed files.

11 years agoReplace expand_name() function with corefile_open() function, which not
pjd [Wed, 19 Dec 2012 23:59:48 +0000 (23:59 +0000)]
Replace expand_name() function with corefile_open() function, which not
only returns name, but also vnode of corefile to use.

This simplifies the code and closes few races, especially in %I handling.

Reviewed by: kib
Obtained from: WHEEL Systems

11 years agoUse correct file permissions when looking for available core file if
pjd [Wed, 19 Dec 2012 23:40:02 +0000 (23:40 +0000)]
Use correct file permissions when looking for available core file if
kern.corefile contains %I.

Obtained from: WHEEL Systems

11 years agoPost r243965 the nfsd daemon will not start up for kernels
rmacklem [Wed, 19 Dec 2012 21:00:22 +0000 (21:00 +0000)]
Post r243965 the nfsd daemon will not start up for kernels
built without "options INET6". This patch fixes the problem.

Reported by: avg
Tested by: avg
MFC after: 2 weeks

11 years agoUse NFSCL since NFSCLIENT build is broken at the moment
gonzo [Wed, 19 Dec 2012 20:33:16 +0000 (20:33 +0000)]
Use NFSCL since NFSCLIENT build is broken at the moment

11 years ago - Add new machine parsable KTR macros for timing events.
jeff [Wed, 19 Dec 2012 20:10:00 +0000 (20:10 +0000)]
 - Add new machine parsable KTR macros for timing events.
 - Use this new format to automatically handle syscalls and VOPs.  This
   changes the earlier format but is still human readable.

Sponsored by: EMC / Isilon Storage Division

11 years ago - Correctly handle EWOULDBLOCK in quiesce_cpus
jeff [Wed, 19 Dec 2012 20:08:06 +0000 (20:08 +0000)]
 - Correctly handle EWOULDBLOCK in quiesce_cpus

Discussed with: mav

11 years agoWhen we have some address to forward (e.g. it was specified with ipfw fwd),
ae [Wed, 19 Dec 2012 17:28:17 +0000 (17:28 +0000)]
When we have some address to forward (e.g. it was specified with ipfw fwd),
we should pass it as first argument into in6_selectroute_fib function to
initiate new route lookup.

MFC after: 1 week

11 years agoMake dst_sa initialization only when it is actually needed.
ae [Wed, 19 Dec 2012 17:08:49 +0000 (17:08 +0000)]
Make dst_sa initialization only when it is actually needed.

MFC after: 1 week

11 years agoThe selectroute functions does own account of EHOSTUNREACH errors,
ae [Wed, 19 Dec 2012 17:02:07 +0000 (17:02 +0000)]
The selectroute functions does own account of EHOSTUNREACH errors,
no need to do it twice.

MFC after: 1 week

11 years agoSupport restrict qualifier in dwarf debug info
emaste [Wed, 19 Dec 2012 16:23:20 +0000 (16:23 +0000)]
Support restrict qualifier in dwarf debug info

Newer clang/llvm emit DW_TAG_restrict_type, which wasn't handled by gdb.
Import support from Apple's gdb-1822:

|  2009-03-24  Jason Molenda  (jmolenda@apple.com)
|
|    * gdbtypes.c (make_cv_type): Rename this function to make_cvr_type to
|    also handle restrict qualifiers.
|    (check_typedef): Handle TYPE_RESTRICT.
|    * gdbtypes.h (TYPE_FLAG_RESTRICT, TYPE_RESTRICT): New.
|    * hpread.c (hpread_type_lookup): Update to use make_cvr_type.
|    * stabsread.c (read_type): Pass the restrict qualifiers along.
|    * parse.c (follow_types): Pass the restrict qualifiers along.
|    * dwarf2read.c (read_tag_const_type): Call make_cvr_type.
|    (read_tag_volatile_type): Same.
|    (read_tag_restrict_type): New function.
|    (read_type_die): Handle DW_TAG_restrict_type.

Obtained from: Apple
Sponsored by: ADARA Networks

11 years agoThe 'flags' argument can be modified in vn_open_cred(), so we need to
pjd [Wed, 19 Dec 2012 12:14:08 +0000 (12:14 +0000)]
The 'flags' argument can be modified in vn_open_cred(), so we need to
set it for every loop interation.

Pointed out by: kib

11 years agoDo not audit paths we try when kern.corefile contains %I.
pjd [Wed, 19 Dec 2012 12:12:53 +0000 (12:12 +0000)]
Do not audit paths we try when kern.corefile contains %I.

Obtained from: WHEEL Systems

11 years agoStyle cleanups.
pjd [Wed, 19 Dec 2012 12:10:14 +0000 (12:10 +0000)]
Style cleanups.

11 years agoThe expand_name() function isn't called with the process lock held anymore,
pjd [Wed, 19 Dec 2012 12:00:09 +0000 (12:00 +0000)]
The expand_name() function isn't called with the process lock held anymore,
so we can safely use malloc(M_WAITOK) now.

Pointed out by: kib

11 years agoFix bug in r242720, that caused additional status page to not be used if
mav [Wed, 19 Dec 2012 09:55:13 +0000 (09:55 +0000)]
Fix bug in r242720, that caused additional status page to not be used if
descriptor page is supported.

11 years agoEliminate some definitions that haven't been used in a decade or more.
alc [Wed, 19 Dec 2012 05:07:27 +0000 (05:07 +0000)]
Eliminate some definitions that haven't been used in a decade or more.