]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoAlso call configtest before reload to ensure working config.
Bryan Drewery [Tue, 16 Apr 2013 17:30:13 +0000 (17:30 +0000)]
Also call configtest before reload to ensure working config.

Approved by: jhb
MFC after: 1 week
X-MFC-With: r249489

11 years agoUse a suitable code generation when building libstand for MIPS.
Robert Watson [Tue, 16 Apr 2013 17:20:52 +0000 (17:20 +0000)]
Use a suitable code generation when building libstand for MIPS.

Reviewed by: imp
Sponsored by: DARPA, AFRL
MFC after: 3 days

11 years agoAdapt libstand's setjmp/longjmp MIPS support to be portable across 32-bit
Robert Watson [Tue, 16 Apr 2013 17:03:35 +0000 (17:03 +0000)]
Adapt libstand's setjmp/longjmp MIPS support to be portable across 32-bit
and 64-bit MIPS.  Don't use the floating-point coprocessor in the libstand
context for MIPS.

Reviewed by: imp
MFC after: 3 days
Sponsored by: DARPA, AFRL

11 years agoFix build after r249543.
Tijl Coosemans [Tue, 16 Apr 2013 16:59:29 +0000 (16:59 +0000)]
Fix build after r249543.

11 years agoPoint to regdef.h. May need to dig up references to the N32 standard
Warner Losh [Tue, 16 Apr 2013 16:54:37 +0000 (16:54 +0000)]
Point to regdef.h. May need to dig up references to the N32 standard
that support this usage (which may be a bit rough, since different
parts of the standard say mutually contradictory things).

11 years agoAllow the vnode to be unlocked for the weird case of
Rick Macklem [Tue, 16 Apr 2013 14:22:16 +0000 (14:22 +0000)]
Allow the vnode to be unlocked for the weird case of
LK_EXCLOTHER. LK_EXCLOTHER is only used to acquire a
usecount on a vnode during NFSv4 recovery from an
expired lease.

Reported and tested by: pho
MFC after: 2 weeks

11 years agoCorrect error message.
Pawel Jakub Dawidek [Tue, 16 Apr 2013 12:31:16 +0000 (12:31 +0000)]
Correct error message.

Reported by: Dirk Engling <erdgeist@erdgeist.org>

11 years agoFix accounting after the r249528, also add several another counters to
Andrey V. Elsukov [Tue, 16 Apr 2013 11:31:26 +0000 (11:31 +0000)]
Fix accounting after the r249528, also add several another counters to
the statistics.

11 years agoReplace hardcoded numbers. Also use interface-local scope name instead
Andrey V. Elsukov [Tue, 16 Apr 2013 11:25:45 +0000 (11:25 +0000)]
Replace hardcoded numbers. Also use interface-local scope name instead
of node-local.

11 years agoUse IP6S_M2MMAX macro.
Andrey V. Elsukov [Tue, 16 Apr 2013 11:19:13 +0000 (11:19 +0000)]
Use IP6S_M2MMAX macro.

11 years agoReplace hardcoded numbers.
Andrey V. Elsukov [Tue, 16 Apr 2013 11:12:58 +0000 (11:12 +0000)]
Replace hardcoded numbers.

11 years agoSome compilers issue a warning when wider integer is casted to narrow
Konstantin Belousov [Tue, 16 Apr 2013 07:11:52 +0000 (07:11 +0000)]
Some compilers issue a warning when wider integer is casted to narrow
pointer.  Supposedly shut down the warning by casting through
uintptr_t.

Reported by: ian

11 years agoThe source address selection algorithm tries to apply several rules
Andrey V. Elsukov [Mon, 15 Apr 2013 21:02:40 +0000 (21:02 +0000)]
The source address selection algorithm tries to apply several rules
for the set of IPv6 addresses. Now each attempt goes into IPv6 statistics,
even if given rule did not won. Change this and take into account only
those rules, that won. Also add accounting for cases, when algorithm
fails to select an address.

11 years agoDTrace: NFS translators should be split into client/server pieces
Pedro F. Giffuni [Mon, 15 Apr 2013 20:16:31 +0000 (20:16 +0000)]
DTrace: NFS translators should be split into client/server pieces

Merge change from illumos:

1731 DTrace NFS translators should be split into client/server pieces

Illumos Revision: 13523:6763769941d2

This code seems to be currently unused on FreeBSD.

Reference:
https://www.illumos.org/issues/1731

Obtained from: Illumos
MFC after: 1 week

11 years agoThe origin_subst_one() function limits the length of the string to
Konstantin Belousov [Mon, 15 Apr 2013 20:06:56 +0000 (20:06 +0000)]
The origin_subst_one() function limits the length of the string to
PATH_MAX after the token substitution.  This is wrong, because
origin_subst_one() performs the substitution on the whole rpath and
similar strings, which contain several pathes separated by colon.  As
result, long (but correct) rpath consisting of many path elements is
rejected by the function.

Correct the problem by rewriting the origin_subst_one() to perform two
passes, first pass to calculate the number of substitutions to be
performed, and second pass to generate the resulting string.  Second
pass allocates the memory for the result based on the count from the
first pass, without enforcing a limit.

Reported and tested by: pgj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

11 years agoFix N32/N64 register saving by ensuring that all registers resolve
Warner Losh [Mon, 15 Apr 2013 19:32:14 +0000 (19:32 +0000)]
Fix N32/N64 register saving by ensuring that all registers resolve
to unique values.

There's some confusion about what the n32 assembler API really is
(since on page 9 of the spec they say that t0-t3 don't exist, then
turn around on page 22 and say that t4-t7 don't exist), and this
doesn't touch that.

NetBSD's version of this file follows the convention I used here, and
is likely to be correct.

This should fix gdb/ptrace.

11 years agoReflect version update.
Xin LI [Mon, 15 Apr 2013 18:35:09 +0000 (18:35 +0000)]
Reflect version update.

MFC after: 13 days

11 years agoNow that the register definitions are in -HEAD, enable this.
Adrian Chadd [Mon, 15 Apr 2013 17:59:06 +0000 (17:59 +0000)]
Now that the register definitions are in -HEAD, enable this.

11 years agoBring over some AR9271 register definitions from the QCA HAL.
Adrian Chadd [Mon, 15 Apr 2013 17:58:11 +0000 (17:58 +0000)]
Bring over some AR9271 register definitions from the QCA HAL.

Obtained from: Qualcomm Atheros

11 years agoPoint args[0] not at the thread that is ending but at the one that
George V. Neville-Neil [Mon, 15 Apr 2013 17:21:02 +0000 (17:21 +0000)]
Point args[0] not at the thread that is ending but at the one that
is starting.  This is in line with practice in OpenSolaris.

Note that this change is only in ULE and not in the 4BSD scheduler.
Once this change settles in (MFC timeout has expired) we'll try it out
on 4BSD as well.

PR: 177706
Submitted by: Tiwei Bie
MFC after: 1 month

11 years agoCorrections to the RX checksum code, make sure its disabled as
Jack F Vogel [Mon, 15 Apr 2013 17:01:42 +0000 (17:01 +0000)]
Corrections to the RX checksum code, make sure its disabled as
well as enabled when necessary. And simplify the checksum routine
itself, adding UDP bit to the test. Thanks to Kevin Lo for pointing
out the problems and code suggestions.

11 years agoIntroduce glabel labels based on GEOM ident attributes. In this initial
Ivan Voras [Mon, 15 Apr 2013 16:09:24 +0000 (16:09 +0000)]
Introduce glabel labels based on GEOM ident attributes. In this initial
implementation, error on the side of conservatism and only create labels
for GEOMs of classes DISK and MULTIPATH.

Discussed with: trasz
Approved by: silence from freebsd-geom@

11 years agoIntroduce a symbol for the GEOM class name instead of using the ad-hoc string
Ivan Voras [Mon, 15 Apr 2013 15:55:40 +0000 (15:55 +0000)]
Introduce a symbol for the GEOM class name instead of using the ad-hoc string
constant.

11 years agoSwitch lagg(4) statistics to counter(9).
Gleb Smirnoff [Mon, 15 Apr 2013 13:00:42 +0000 (13:00 +0000)]
Switch lagg(4) statistics to counter(9).

The lagg(4) is often used to bond high speed links, so basic per-packet +=
on statistics cause cache misses and statistics loss.

Perfect solution would be to convert ifnet(9) to counters(9), but this
requires much more work, and unfortunately ABI change, so temporarily
patch lagg(4) manually.

We store counters in the softc, and once per second push their values
to legacy ifnet counters.

Sponsored by: Nginx, Inc.

11 years agofix a bug in the computation of the userspace offset for a give netmap buffer.
Luigi Rizzo [Mon, 15 Apr 2013 11:49:16 +0000 (11:49 +0000)]
fix a bug in the computation of the userspace offset for a give netmap buffer.

Submitted by: Hugh Nhan

11 years agoAlthough we perform path compression to reduce the height of the trie and
Alan Cox [Mon, 15 Apr 2013 06:12:00 +0000 (06:12 +0000)]
Although we perform path compression to reduce the height of the trie and
the number of interior nodes, we have previously created a level zero
interior node at the root of every non-empty trie, even when that node is
not strictly necessary, i.e., it has only one child.  This change is the
second (and final) step in eliminating those unnecessary level zero interior
nodes.  Specifically, it updates the deletion and insertion functions so
that they do not require a level zero interior node at the root of the trie.
For a "buildworld" workload, this change results in a 16.8% reduction in the
number of interior nodes allocated and a similar reduction in the average
execution time for lookup functions.  For example, the average execution
time for a call to vm_radix_lookup_ge() is reduced by 22.9%.

Reviewed by: attilio, jeff (an earlier version)
Sponsored by: EMC / Isilon Storage Division

11 years agoUse arc4random() instead of random().
Xin LI [Mon, 15 Apr 2013 05:39:21 +0000 (05:39 +0000)]
Use arc4random() instead of random().

MFC after: 2 weeks

11 years agoMFV r249496,249498. The most visible change is that we no longer shuts
Xin LI [Mon, 15 Apr 2013 05:31:59 +0000 (05:31 +0000)]
MFV r249496,249498.  The most visible change is that we no longer shuts
down the connection when stdin closes, by default.  This matches Hobbit's
original netcat and GNU netcat.

Old behavior can be restored with the new -N flag.

MFC after: 2 weeks

11 years agoIntegrate two OpenBSD commits to nc(1):
Xin LI [Mon, 15 Apr 2013 05:24:43 +0000 (05:24 +0000)]
Integrate two OpenBSD commits to nc(1):

date: 2013/03/12 02:57:37;  author: deraadt;
All accept() errors are considered fatal, until someone gives a different
reason.  No code changed, just documenting it...

date: 2013/03/20 09:27:56;  author: sthen;
Don't shutdown nc(1)'s network socket when stdin closes. Matches *Hobbit*'s
original netcat and GNU netcat; revert to old behaviour with the new -N flag
if needed. After much discussion with otto deraadt tedu and Martin Pelikan.
ok deraadt@

11 years agoVendor import from OpenBSD tag OPENBSD_5_3 as of today.
Xin LI [Mon, 15 Apr 2013 05:18:49 +0000 (05:18 +0000)]
Vendor import from OpenBSD tag OPENBSD_5_3 as of today.

11 years agoFixing a typo.
Hiren Panchasara [Mon, 15 Apr 2013 03:02:55 +0000 (03:02 +0000)]
Fixing a typo.

Submitted by: Benedikt Steinbusch (benedikt.steinbusch@googlemail.com)
Approved by: sbruno (mentor)

11 years agoRun configtest before restarting so that the system is not
Bryan Drewery [Sun, 14 Apr 2013 21:11:19 +0000 (21:11 +0000)]
Run configtest before restarting so that the system is not
left without a running sshd.

Approved by: des
MFC after: 1 week

11 years agoSimilarly to proc_getargv() and proc_getenvv(), export proc_getauxv()
Mikolaj Golub [Sun, 14 Apr 2013 20:03:48 +0000 (20:03 +0000)]
Similarly to proc_getargv() and proc_getenvv(), export proc_getauxv()
to be able to reuse the code.

MFC after: 3 weeks

11 years agoRe-factor the code to provide kern_proc_filedesc_out(), kern_proc_out(),
Mikolaj Golub [Sun, 14 Apr 2013 20:01:36 +0000 (20:01 +0000)]
Re-factor the code to provide kern_proc_filedesc_out(), kern_proc_out(),
and kern_proc_vmmap_out() functions to output process kinfo structures
to sbuf, to make the code reusable.

The functions are going to be used in the coredump routine to store
procstat info in the core program header notes.

Reviewed by: kib
MFC after: 3 weeks

11 years agoRe-factor coredump routines. For each type of notes an output
Mikolaj Golub [Sun, 14 Apr 2013 19:59:38 +0000 (19:59 +0000)]
Re-factor coredump routines.  For each type of notes an output
function is provided, which is used either to calculate the note size
or output it to sbuf.  On the first pass the notes are registered in a
list and the resulting size is found, on the second pass the list is
traversed outputing notes to sbuf.  For the sbuf a drain routine is
provided that writes data to a core file.

The main goal of the change is to make coredump to write notes
directly to the core file, without preliminary preparing them all in a
memory buffer.  Storing notes in memory is not a problem for the
current, rather small, set of notes we write to the core, but it may
becomes an issue when we start to store procstat notes.

Reviewed by: jhb (initial version), kib
Discussed with: jhb, kib
MFC after: 3 weeks

11 years agoPrint MB and GB instead of MiB and GiB mislabeled as MB and GB.
Warner Losh [Sun, 14 Apr 2013 19:21:43 +0000 (19:21 +0000)]
Print MB and GB instead of MiB and GiB mislabeled as MB and GB.
SD cards are sold in GB not GiB, this will result in less confusion.
Also, cache parent device pointer to save a few cycles for loops.

11 years agoInstall a symlink
Tim Kientzle [Sun, 14 Apr 2013 19:13:51 +0000 (19:13 +0000)]
Install a symlink
  /usr/lib/include ==> /usr/include

This fixes -print-file-name=include in clang (and is
arguably a better way to fix the same issue in GCC than
the change I made in r231336).

MFC after: 1 week

11 years agoRemove some more pieces of multilevel freeze mechanism, missed in r249466.
Alexander Motin [Sun, 14 Apr 2013 18:09:08 +0000 (18:09 +0000)]
Remove some more pieces of multilevel freeze mechanism, missed in r249466.

11 years agoAdd fdallocn function and use it when passing fds over unix socket.
Mateusz Guzik [Sun, 14 Apr 2013 17:08:34 +0000 (17:08 +0000)]
Add fdallocn function and use it when passing fds over unix socket.

This gets rid of "unp_externalize fdalloc failed" panic.

Reviewed by: pjd
MFC after: 1 week

11 years agoBackport upstream r684 (OPENPAM_DEBUG enables debugging macros but does
Dag-Erling Smørgrav [Sun, 14 Apr 2013 16:49:27 +0000 (16:49 +0000)]
Backport upstream r684 (OPENPAM_DEBUG enables debugging macros but does
not turn debugging on by default) and add OPENPAM_DEBUG to CFLAGS.

11 years agoupdate information about debugging sysctl...
John-Mark Gurney [Sun, 14 Apr 2013 16:20:25 +0000 (16:20 +0000)]
update information about debugging sysctl...

MFC after: 1 week

11 years agoUsnure that PCI bus BIS_GET_DMA_TAG() method sees the actual PCI
Konstantin Belousov [Sun, 14 Apr 2013 14:02:34 +0000 (14:02 +0000)]
Usnure that PCI bus BIS_GET_DMA_TAG() method sees the actual PCI
device which makes the request for dma tag, instead of some descendant
of the PCI device, by creating a pass-through trampoline for vga_pci
and ata_pci buses.

Sponsored by: The FreeBSD Foundation
Suggested by: jhb
Discussed with: jhb, mav
MFC after: 1 week

11 years agoSilence "received disconnect" in the common case.
Dag-Erling Smørgrav [Sun, 14 Apr 2013 13:06:07 +0000 (13:06 +0000)]
Silence "received disconnect" in the common case.

11 years agoApply a patch from OpenSSH bugzilla #2057 to silence "received disconnect"
Dag-Erling Smørgrav [Sun, 14 Apr 2013 12:55:39 +0000 (12:55 +0000)]
Apply a patch from OpenSSH bugzilla #2057 to silence "received disconnect"
errors in the common case (i.e. client intentionally disconnected).

11 years agoAdd one more obsolete file.
Antoine Brodin [Sun, 14 Apr 2013 12:20:13 +0000 (12:20 +0000)]
Add one more obsolete file.

11 years agolibc: Fix typo in French translation.
Jilles Tjoelker [Sun, 14 Apr 2013 11:44:47 +0000 (11:44 +0000)]
libc: Fix typo in French translation.

PR: kern/177704
Submitted by: martymac
MFC after: 1 week

11 years agoRemove owner field from struct cam_ed, unused at least since FreeBSD 7.
Alexander Motin [Sun, 14 Apr 2013 10:14:26 +0000 (10:14 +0000)]
Remove owner field from struct cam_ed, unused at least since FreeBSD 7.

11 years agoMFprojects/camlock r248982:
Alexander Motin [Sun, 14 Apr 2013 09:55:48 +0000 (09:55 +0000)]
MFprojects/camlock r248982:
Stop abusing xpt_periph in random plases that really have no periph related
to CCB, for example, bus scanning.  NULL value is fine in such cases and it
is correctly logged in debug messages as "noperiph".  If at some point we
need some real XPT periphs (alike to pmpX now), quite likely they will be
per-bus, and not a single global instance as xpt_periph now.

11 years agoMFprojects/camlock r248890, r248897, r248898, r248900, r248903, r248905,
Alexander Motin [Sun, 14 Apr 2013 09:28:14 +0000 (09:28 +0000)]
MFprojects/camlock r248890, r248897, r248898, r248900, r248903, r248905,
r248917, r248918, r248978, r249001, r249014, r249030:

Remove multilevel freezing mechanism, implemented to handle specifics of
the ATA/SATA error recovery, when post-reset recovery commands should be
allocated when queues are already full of payload requests.  Instead of
removing frozen CCBs with specified range of priorities from the queue
to provide free openings, use simple hack, allowing explicit CCBs over-
allocation for requests with priority higher (numerically lower) then
CAM_PRIORITY_OOB threshold.

Simplify CCB allocation logic by removing SIM-level allocation queue.
After that SIM-level queue manages only CCBs execution, while allocation
logic is localized within each single device.

Suggested by: gibbs

11 years agoFix typo from previous commit.
Joel Dahl [Sun, 14 Apr 2013 08:49:35 +0000 (08:49 +0000)]
Fix typo from previous commit.

Submitted by: Ronald Klop <ronald-freebsd8@klop.yi.org>

11 years agoLSD first synthesised 16/11/38, not 7/4/43.
Joel Dahl [Sun, 14 Apr 2013 08:47:01 +0000 (08:47 +0000)]
LSD first synthesised 16/11/38, not 7/4/43.

Submitted by: James J. Lippard
Obtained from: OpenBSD

11 years agoCorrect spelling is "Christiaan Huygens".
Joel Dahl [Sun, 14 Apr 2013 08:40:24 +0000 (08:40 +0000)]
Correct spelling is "Christiaan Huygens".

Submitted by: James J. Lippard
Obtained from: OpenBSD

11 years agoFixing a clang warning indicating uninitialized variable usage.
Hiren Panchasara [Sun, 14 Apr 2013 02:42:40 +0000 (02:42 +0000)]
Fixing a clang warning indicating uninitialized variable usage.

PR: kern/177164
Approved by: sbruno (mentor)

11 years agoImprove/correct a comment. We now support a lot more cpu types.
Hiren Panchasara [Sun, 14 Apr 2013 02:26:12 +0000 (02:26 +0000)]
Improve/correct a comment. We now support a lot more cpu types.

PR: kern/177496
Approved by: sbruno (mentor)

11 years agoClean up.
Dag-Erling Smørgrav [Sun, 14 Apr 2013 00:59:56 +0000 (00:59 +0000)]
Clean up.

11 years agoInclude ldns's b{32,64}_{ntop,pton}().
Dag-Erling Smørgrav [Sat, 13 Apr 2013 22:45:41 +0000 (22:45 +0000)]
Include ldns's b{32,64}_{ntop,pton}().

11 years agoClean up the ntop / pton code. Part of a patch which has been submitted
Dag-Erling Smørgrav [Sat, 13 Apr 2013 22:44:48 +0000 (22:44 +0000)]
Clean up the ntop / pton code.  Part of a patch which has been submitted
upstream but not yet adopted.

11 years agoCreate sysctl node 'hw.vmm.vmx' and populate it with oids that expose the VMX
Neel Natu [Sat, 13 Apr 2013 21:41:51 +0000 (21:41 +0000)]
Create sysctl node 'hw.vmm.vmx' and populate it with oids that expose the VMX
hardware capabilities.

Obtained from: NetApp

11 years agoFix undefined behaviour in several gpio_pin_setflags() routines (under
Dimitry Andric [Sat, 13 Apr 2013 21:21:13 +0000 (21:21 +0000)]
Fix undefined behaviour in several gpio_pin_setflags() routines (under
sys/arm and sys/mips), squelching the clang 3.3 warnings about this.

Noticed by: tinderbox and many irate spectators
Submitted by: Luiz Otavio O Souza <loos.br@gmail.com>
PR: kern/177759
MFC after: 3 days

11 years agomove the error report to a lower log level... Now you can see when it
John-Mark Gurney [Sat, 13 Apr 2013 19:02:58 +0000 (19:02 +0000)]
move the error report to a lower log level...  Now you can see when it
returns an error without getting every single io that went through it..

MFC after: 1 week

11 years agoFix the name of the pcb member in the comments.
Konstantin Belousov [Sat, 13 Apr 2013 15:20:33 +0000 (15:20 +0000)]
Fix the name of the pcb member in the comments.

Submitted by: Oliver Pinter <oliver.pntr@gmail.com>
MFC after: 3 days

11 years agoMFprojects/camlock r248894:
Alexander Motin [Sat, 13 Apr 2013 14:03:44 +0000 (14:03 +0000)]
MFprojects/camlock r248894:
Use full freeze while PMP does hard reset. This is only cosmetical change.

11 years agoFix changes made in r249408.
Jayachandran C. [Sat, 13 Apr 2013 07:23:37 +0000 (07:23 +0000)]
Fix changes made in r249408.

In some cases, kern_envp is set by the architecture code and env_pos does
not contain the length of the static kernel environment. In these cases
r249408 causes the kernel to discard the environment.

Fix this by updating the check for empty static env to *kern_envp != '\0'

Reported by: np@

11 years agoUse the MAKEDEV_CHECKNAME flag to check for an invalid device name and return
Neel Natu [Sat, 13 Apr 2013 05:11:21 +0000 (05:11 +0000)]
Use the MAKEDEV_CHECKNAME flag to check for an invalid device name and return
an error instead of panicking.

Obtained from: NetApp

11 years agoUnbreak tinderbox build after r249420.
Jung-uk Kim [Fri, 12 Apr 2013 23:10:56 +0000 (23:10 +0000)]
Unbreak tinderbox build after r249420.

11 years agoUse the CONNECT method to proxy HTTPS connections through HTTP proxies.
Dag-Erling Smørgrav [Fri, 12 Apr 2013 22:05:15 +0000 (22:05 +0000)]
Use the CONNECT method to proxy HTTPS connections through HTTP proxies.

PR: bin/80176
Submitted by: Yuichiro NAITO <naito.yuichiro@gmail.com>

11 years agoFix build.
Sergey Kandaurov [Fri, 12 Apr 2013 21:29:37 +0000 (21:29 +0000)]
Fix build.
- pass a format string to printf
- catch up with constifying uz_name

MFC after: 3 days

11 years agoCosmetic change: make a comment reference Sandy Bridge *Xeon*
Ryan Stone [Fri, 12 Apr 2013 20:43:14 +0000 (20:43 +0000)]
Cosmetic change: make a comment reference Sandy Bridge *Xeon*

Reviewed by: sbruno
MFC after: 1 week

11 years agoAlthough we perform path compression to reduce the height of the trie and
Alan Cox [Fri, 12 Apr 2013 20:21:28 +0000 (20:21 +0000)]
Although we perform path compression to reduce the height of the trie and
the number of interior nodes, we always create a level zero interior node at
the root of every non-empty trie, even when that node is not strictly
necessary, i.e., it has only one child.  This change is the first step in
eliminating those unnecessary level zero interior nodes.  Specifically, it
updates all of the lookup functions so that they do not require a level zero
interior node at the root.

Reviewed by: attilio, jeff (an earlier version)
Sponsored by: EMC / Isilon Storage Division

11 years agoDtrace: resolve const types from fbt and other fixes.
Pedro F. Giffuni [Fri, 12 Apr 2013 20:10:27 +0000 (20:10 +0000)]
Dtrace: resolve const types from fbt and other fixes.

Merge change from illumos:

3519 DTrace fails to resolve const types from fbt
3520 dtrace internal error -- token type 316 is not a valid D
     compilation token
3521 clean up dtrace unit tests

Illumos Revision: e98f46c

Reference:
https://www.illumos.org/issues/3519
https://www.illumos.org/issues/3520
https://www.illumos.org/issues/3521

Tested by: Fabian Keil
Obtained from: Illumos
MFC after: 1 month

11 years agolibthr: Remove _thr_rtld_fini(), unused since r245630.
Jilles Tjoelker [Fri, 12 Apr 2013 19:47:32 +0000 (19:47 +0000)]
libthr: Remove _thr_rtld_fini(), unused since r245630.

11 years agoUpgrade our copy of llvm/clang to trunk r178860, in preparation of the
Dimitry Andric [Fri, 12 Apr 2013 17:57:40 +0000 (17:57 +0000)]
Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.

11 years agoRemove the NVME_IDENTIFY_CONTROLLER and NVME_IDENTIFY_NAMESPACE IOCTLs and replace
Jim Harris [Fri, 12 Apr 2013 17:56:47 +0000 (17:56 +0000)]
Remove the NVME_IDENTIFY_CONTROLLER and NVME_IDENTIFY_NAMESPACE IOCTLs and replace
them with the NVMe passthrough equivalent.

Sponsored by: Intel

11 years agoAdd support for passthrough NVMe commands.
Jim Harris [Fri, 12 Apr 2013 17:52:17 +0000 (17:52 +0000)]
Add support for passthrough NVMe commands.

This includes a new IOCTL to support a generic method for nvmecontrol(8) to pass
IDENTIFY, GET_LOG_PAGE, GET_FEATURES and other commands to the controller, rather than
separate IOCTLs for each.

Sponsored by: Intel

11 years agoMove the busdma mapping functions to nvme_qpair.c.
Jim Harris [Fri, 12 Apr 2013 17:48:45 +0000 (17:48 +0000)]
Move the busdma mapping functions to nvme_qpair.c.

This removes nvme_uio.c completely.

Sponsored by: Intel

11 years agoRemove the NVMe-specific physio and associated routines.
Jim Harris [Fri, 12 Apr 2013 17:44:55 +0000 (17:44 +0000)]
Remove the NVMe-specific physio and associated routines.

These were added early on for benchmarking purposes to avoid the mapped I/O
penalties incurred in kern_physio.  Now that FreeBSD (including kern_physio)
supports unmapped I/O, the need for these NVMe-specific routines no longer exists.

Sponsored by: Intel

11 years agoAdd a mutex to each namespace, for general locking operations on the namespace.
Jim Harris [Fri, 12 Apr 2013 17:41:24 +0000 (17:41 +0000)]
Add a mutex to each namespace, for general locking operations on the namespace.

Sponsored by: Intel

11 years agoRename the controller's fail_req_lock, so that it can be used for other
Jim Harris [Fri, 12 Apr 2013 17:36:48 +0000 (17:36 +0000)]
Rename the controller's fail_req_lock, so that it can be used for other
locking operations on the controller.

Sponsored by: Intel

11 years agoDo not panic when a busdma mapping operation fails.
Jim Harris [Fri, 12 Apr 2013 17:34:49 +0000 (17:34 +0000)]
Do not panic when a busdma mapping operation fails.

Instead, print an error message and fail the associated command with
DATA_TRANSFER_ERROR NVMe completion status.

Sponsored by: Intel

11 years agoMove MIPS_MAX_TLB_ENTRIES definition from cpuregs.h to tlb.c
Jayachandran C. [Fri, 12 Apr 2013 17:22:12 +0000 (17:22 +0000)]
Move MIPS_MAX_TLB_ENTRIES definition from cpuregs.h to tlb.c

Having MIPS_MAX_TLB_ENTRIES defined to 128 is misleading, since it used
to be 64 in older releases of MIPS architecture (where it could be read
from Config1) and can be much more than 128 for the newer processors.

For now, move the definition to the only file using it (mips/mips/tlb.c)
and define MIPS_MAX_TLB_ENTRIES depending on the MIPS cpu defined. Also
add few checks so that we do not write beyond the end of the tlb_state
array.

This fixes a kernel data corruption seen in Netlogic XLP, which was casued
by tlb_save() writing beyond the end of tlb_state array when breaking into
debugger.

11 years agoAdd some more dates and relationships.
Gavin Atkinson [Fri, 12 Apr 2013 17:01:07 +0000 (17:01 +0000)]
Add some more dates and relationships.

Submitted by: jkoshy, gj, dfr

11 years agoFix usage for soreceive(9) - uio must always be non-NULL.
Edward Tomasz Napierala [Fri, 12 Apr 2013 16:36:18 +0000 (16:36 +0000)]
Fix usage for soreceive(9) - uio must always be non-NULL.

MFC after: 1 week

11 years agoReflect removing of the counter_u64_subtract() function in the macro.
Andrey V. Elsukov [Fri, 12 Apr 2013 16:29:15 +0000 (16:29 +0000)]
Reflect removing of the counter_u64_subtract() function in the macro.

11 years agoRemove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE'
Edward Tomasz Napierala [Fri, 12 Apr 2013 16:25:03 +0000 (16:25 +0000)]
Remove ctl(4) from GENERIC.  Also remove 'options CTL_DISABLE'
and kern.cam.ctl.disable tunable; those were introduced as a workaround
to make it possible to boot GENERIC on low memory machines.

With ctl(4) being built as a module and automatically loaded by ctladm(8),
this makes CTL work out of the box.

Reviewed by: ken
Sponsored by: FreeBSD Foundation

11 years agoFix incorrect KASSERTs in xlpge
Jayachandran C. [Fri, 12 Apr 2013 16:03:22 +0000 (16:03 +0000)]
Fix incorrect KASSERTs in xlpge

Fix for crash in Netlogic XLP network accelerator driver when invariants
are enabled - use correct the condition for KASSERT.

11 years agoFix kenv behavior when there is no static environment
Jayachandran C. [Fri, 12 Apr 2013 15:58:53 +0000 (15:58 +0000)]
Fix kenv behavior when there is no static environment

In case where there are no static kernel environment entries, the
function init_dynamic_kenv() adds an incorrect entry at position 0 of
the dynamic kernel environment. This in turn causes kenv(1) to print
and empty list even though there are dynamic entries added later.

Fix this by checking env_pos in init_dynamic_kenv() and adding dynamic
entries only if there are static entries.

11 years agosh: Don't modify exit status when break/continue/return passes !.
Jilles Tjoelker [Fri, 12 Apr 2013 15:19:35 +0000 (15:19 +0000)]
sh: Don't modify exit status when break/continue/return passes !.

This matches what would happen if  ! P  were to be replaced with
if P; then false; else true; fi.

Example:
  f() { ! return 0; }; f

11 years ago- Do not bail out if stat(2) fails with ENOENT in the spool directory. This
Pietro Cerutti [Fri, 12 Apr 2013 14:32:16 +0000 (14:32 +0000)]
- Do not bail out if stat(2) fails with ENOENT in the spool directory. This
  happens if another atrm process removes a job while we're scanning through
  the directory.
- While at it, optimize a bit the directory scanning, so that we quit looping
  as soon as all jobs specified in argv have been dealt with.

Approved by: cognet

11 years ago- Switch order of setting real uid and gid. If we set uid first, then we
Pietro Cerutti [Fri, 12 Apr 2013 14:19:44 +0000 (14:19 +0000)]
- Switch order of setting real uid and gid. If we set uid first, then we
  don't have enough privileges to set gid.

  This looks like a long standing bug, just recently revealed by r241852.

Approved by: cognet

11 years agoisa_if.h is indirectly included.
Bjoern A. Zeeb [Fri, 12 Apr 2013 13:56:21 +0000 (13:56 +0000)]
isa_if.h is indirectly included.
Depend on it to unbreak pc98 builds.

11 years agoAttempt to clean up spacing and long lines.
Gleb Smirnoff [Fri, 12 Apr 2013 08:52:19 +0000 (08:52 +0000)]
Attempt to clean up spacing and long lines.

11 years agoUpdate with several early mentor/mentee relationships and dates commit
Gavin Atkinson [Fri, 12 Apr 2013 08:39:18 +0000 (08:39 +0000)]
Update with several early mentor/mentee relationships and dates commit
bits were granted.  Relationships have been provided by the mentees,
dates have been sourced from either the mentees or the CVS mailing list
archives.

Obtained from: mux, wilko, msmith, peter, schweikh
Obtained from: gallatin, dfr, murray, jkoshy

11 years agoFree memory after deleting an address policy entry.
Andrey V. Elsukov [Fri, 12 Apr 2013 07:59:54 +0000 (07:59 +0000)]
Free memory after deleting an address policy entry.

MFC after: 1 week

11 years agoFix a few typos.
Xin LI [Fri, 12 Apr 2013 02:01:17 +0000 (02:01 +0000)]
Fix a few typos.

Reviewed by: gjb
MFC after: 3 days

11 years agoIf vmm.ko could not be initialized correctly then prevent the creation of
Neel Natu [Fri, 12 Apr 2013 01:16:52 +0000 (01:16 +0000)]
If vmm.ko could not be initialized correctly then prevent the creation of
virtual machines subsequently.

Submitted by: Chris Torek

11 years agoIf doing buildworld -DWITH_BMAKE make sure bmake does the build.
Simon J. Gerraty [Fri, 12 Apr 2013 00:34:19 +0000 (00:34 +0000)]
If doing buildworld -DWITH_BMAKE make sure bmake does the build.

11 years agoAdd pciids of the T5 based cards. The ones that I haven't tested with
Navdeep Parhar [Thu, 11 Apr 2013 23:40:05 +0000 (23:40 +0000)]
Add pciids of the T5 based cards.  The ones that I haven't tested with
cxgbe(4) are disabled for now.  This will change.

MFC after: 2 weeks

11 years agoCosmetic change (s/wrwc/wcwr/;s/WRWC/WCWR/).
Navdeep Parhar [Thu, 11 Apr 2013 22:49:29 +0000 (22:49 +0000)]
Cosmetic change (s/wrwc/wcwr/;s/WRWC/WCWR/).

MFC after: 3 days.

11 years agoAuto-reduce the holdoff timers that are greater than the maximum value
Navdeep Parhar [Thu, 11 Apr 2013 22:46:39 +0000 (22:46 +0000)]
Auto-reduce the holdoff timers that are greater than the maximum value
allowed by the hardware.

MFC after: 3 days

11 years agoGenerate a LINT for powerpc and for powerpc64.
Bjoern A. Zeeb [Thu, 11 Apr 2013 22:18:20 +0000 (22:18 +0000)]
Generate a LINT for powerpc and for powerpc64.

Discussed with: nwhitehorn