14 hours agoFix the exporting of SCTP association states to userland. Without this, master github/master
tuexen [Sat, 29 Aug 2015 09:14:32 +0000 (09:14 +0000)]
Fix the exporting of SCTP association states to userland. Without this,
associations in SHUTDOWN-PENDING were never reported correctly.

MFC after: 3 weeks

14 hours agoReport CLOSED as state for bound sockets for consistency with
tuexen [Sat, 29 Aug 2015 09:10:52 +0000 (09:10 +0000)]
Report CLOSED as state for bound sockets for consistency with
netstat and the way TCP is handled.

PR: 201585
MFC after: 3 weeks

15 hours agoIn r286705 (Illumos 5960/a2cdcdd), a separate thread is created with curproc
delphij [Sat, 29 Aug 2015 08:16:57 +0000 (08:16 +0000)]
In r286705 (Illumos 5960/a2cdcdd), a separate thread is created with curproc
as parent.  In the case of a send or receive, the curproc would be the
userland application that issues the ioctl.  This would trigger an assertion
failure introduced in Solaris compatibility shims in r196458 when kernel is
compiled with INVARIANTS.

Fix this by using p0 (proc0 or kernel) as the parent thread when creating
the kernel threads.

15 hours agoAdd reminder to run etcupdate or mergemaster to get updated
glebius [Sat, 29 Aug 2015 07:59:31 +0000 (07:59 +0000)]
Add reminder to run etcupdate or mergemaster to get updated
rc.d scripts for wireless.

Poked by: adrian

16 hours agoImplement RSS hashing/re-hashing for IPv6 ingress packets.
adrian [Sat, 29 Aug 2015 07:14:29 +0000 (07:14 +0000)]
Implement RSS hashing/re-hashing for IPv6 ingress packets.

This mirrors the basic IPv4 implementation - IPv6 packets under RSS
now are checked for a correct RSS hash and if one isn't provided,
it's done in software.

This only handles the initial receive - it doesn't yet handle
reinjecting / rehashing packets after being decapsulated from
various tunneling setups.  That'll come in some follow-up work.

For non-RSS users, this is almost a giant no-op.

It does change a couple of ipv6 methods to use const mbuf * instead of
mbuf * but it doesn't have any functional changes.

So, the following now occurs:

* If the NIC doesn't do any RSS hashing, it's all done in software.
  Single-queue, non-RSS NICs will now have the RX path distributed
  into multiple receive netisr queues.

* If the NIC provides the wrong hash (eg only IPv6 hash when we needed
  an IPv6 TCP hash, or IPv6 UDP hash when we expected IPv6 hash)
  then the hash is recalculated.

* .. if the hash is recalculated, it'll end up being injected into
  the correct netisr queue for v6 processing.

Submitted by: Tiwei Bie <>
Differential Revision:

16 hours agoRename rss_soft_m2cpuid() -> rss_soft_m2cpuid_v4() in preparation for
adrian [Sat, 29 Aug 2015 06:58:30 +0000 (06:58 +0000)]
Rename rss_soft_m2cpuid() ->  rss_soft_m2cpuid_v4() in preparation for
an IPv6 version to show up.

Submitted by: Tiwei Bie <>
Differential Revision:

17 hours agoThe TLB1 TSIZE is a multiple of 4, not 2, so shift 2 bits, not 1.
jhibbits [Sat, 29 Aug 2015 06:52:14 +0000 (06:52 +0000)]
The TLB1 TSIZE is a multiple of 4, not 2, so shift 2 bits, not 1.

19 hours agoRemove now unused (and #if 0'ed out) headers.
adrian [Sat, 29 Aug 2015 04:33:31 +0000 (04:33 +0000)]
Remove now unused (and #if 0'ed out) headers.

23 hours agoMark ValleyView/Bay Trail as not supported
bapt [Sat, 29 Aug 2015 00:05:39 +0000 (00:05 +0000)]
Mark ValleyView/Bay Trail as not supported

27 hours agoRemove now obsolete comment.
imp [Fri, 28 Aug 2015 20:06:58 +0000 (20:06 +0000)]
Remove now obsolete comment.

MFC After: 2 days

27 hours agoPer overwhelming sentiment in the code review, use FEATURE instead.
imp [Fri, 28 Aug 2015 19:53:19 +0000 (19:53 +0000)]
Per overwhelming sentiment in the code review, use FEATURE instead.

Differential Revision:
MFC After: 2 days

31 hours agoComment out cleaning files, since it cleans too much.
imp [Fri, 28 Aug 2015 16:29:38 +0000 (16:29 +0000)]
Comment out cleaning files, since it cleans too much.

31 hours agoRemove .WAIT hacks and put in specific dependencies.
imp [Fri, 28 Aug 2015 16:23:03 +0000 (16:23 +0000)]
Remove .WAIT hacks and put in specific dependencies.

32 hours agoAdd missing ofw_machdep.h. Make x86 ofw_machdep.h work pc98 too.
imp [Fri, 28 Aug 2015 15:41:09 +0000 (15:41 +0000)]
Add missing ofw_machdep.h. Make x86 ofw_machdep.h work pc98 too.
This allows the owc module to compile on pc98 and seems preferable to
adding another special case in the build system.

32 hours agoAdd underscores to attributes when checking for __has_attribute.
pfg [Fri, 28 Aug 2015 15:36:05 +0000 (15:36 +0000)]
Add underscores to attributes when checking for __has_attribute.

This is a good practice to avoid confusion with allowed macros.

Suggested by: jilles

32 hours agoMove dwmmc.h to dwmmc_reg.h. This is in preperation for adding support to
andrew [Fri, 28 Aug 2015 15:27:55 +0000 (15:27 +0000)]
Move dwmmc.h to dwmmc_reg.h. This is in preperation for adding support to
subclass the dwmmc driver to allow SoC specific attachments.

Sponsored by: ABT Systems Ltd

33 hours agoAdd back missing -m32 for amd64 and powerpc64 that was lost
imp [Fri, 28 Aug 2015 14:50:36 +0000 (14:50 +0000)]
Add back missing -m32 for amd64 and powerpc64 that was lost
in the move to

33 hours agoFix an NFS server bug that manifested in "ls -al" displaying a plus
trasz [Fri, 28 Aug 2015 14:26:11 +0000 (14:26 +0000)]
Fix an NFS server bug that manifested in "ls -al" displaying a plus
sign on every directory exported via NFSv4 with NFSv4 ACLs enabled.

Reviewed by: rmacklem@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision:

33 hours agotrailing space
pfg [Fri, 28 Aug 2015 14:13:01 +0000 (14:13 +0000)]
trailing space

33 hours agoBe more GCC-friendly with attributes
pfg [Fri, 28 Aug 2015 14:06:28 +0000 (14:06 +0000)]
Be more GCC-friendly with attributes

Being clang the default compiler, we were always giving precedence to
the __has_attribute check. Unfortunately clang generally doesn't support
the new attributes (alloc_size was briefly supported and then reverted)
so we were always doing both checks. Give the precedence to GCC as that is
the working case now.

Do the same for  __has_builtin() for consistency.

33 hours agoFix cleaning of files generated from .m sources.
imp [Fri, 28 Aug 2015 13:57:30 +0000 (13:57 +0000)]
Fix cleaning of files generated from .m sources.

37 hours agoOnly check for the bus frequency if it has not already been set, for
andrew [Fri, 28 Aug 2015 10:34:37 +0000 (10:34 +0000)]
Only check for the bus frequency if it has not already been set, for
example through a driver running as a subclass of this.

Sponsored by: ABT Systems Ltd

38 hours agoremove a left-over after r220463 empty #ifdef INET check.
bz [Fri, 28 Aug 2015 09:38:18 +0000 (09:38 +0000)]
remove a left-over after r220463 empty #ifdef INET check.

MFC after: 1 week

41 hours agoPlug memory leaks when running out of memory.
delphij [Fri, 28 Aug 2015 06:41:40 +0000 (06:41 +0000)]
Plug memory leaks when running out of memory.

Reported by: clang scan-build
MFC after: 2 weeks

41 hours agoReplace the printf()s with optional rate limited debugging for RSS.
adrian [Fri, 28 Aug 2015 05:58:16 +0000 (05:58 +0000)]
Replace the printf()s with optional rate limited debugging for RSS.

Submitted by: Tiwei Bie <>
Differential Revision:

42 hours agoFix text alignment. mcsr was indented one too many spaces.
jhibbits [Fri, 28 Aug 2015 05:20:31 +0000 (05:20 +0000)]
Fix text alignment.  mcsr was indented one too many spaces.

43 hours agoAdd another .WAIT since sometimes we lose the race.
imp [Fri, 28 Aug 2015 04:32:43 +0000 (04:32 +0000)]
Add another .WAIT since sometimes we lose the race.

44 hours agoExtend pmap to support e500mc and e5500.
jhibbits [Fri, 28 Aug 2015 03:03:09 +0000 (03:03 +0000)]
Extend pmap to support e500mc and e5500.

As part of this, clean up tlb1_init(), since bootinfo is always NULL here just
eliminate the loop altogether.

Also, fix a bug in mmu_booke_mapdev_attr() where it's possible to map a larger
immediately following a smaller page, causing the mappings to overlap.  Instead,
break up the new mapping into smaller chunks.  The downside to this is that it
uses more precious TLB1 entries, which, on smaller chips (e500v2) it could cause
problems with TLB1 being out of space (e500v2 only has 16 TLB1 entries).

Obtained from: Semihalf (partial)
Sponsored by: Alex Perez/Inertial Computing

45 hours agoSimply to appease gcc's warnings.
imp [Fri, 28 Aug 2015 02:29:31 +0000 (02:29 +0000)]
Simply to appease gcc's warnings.

46 hours agoSet DMA alignment constraint of status, TX and RX LEs(List Elements
yongari [Fri, 28 Aug 2015 01:32:42 +0000 (01:32 +0000)]
Set DMA alignment constraint of status, TX and RX LEs(List Elements
in Marvell terms) to 32768.  32768 looks overkill but it will
ensure correct DMAed update.  This change addresses occasional
watchdog timeouts reported on 10.2-RELEASE.

Tested by: Johann Hugo <>
MFC after: 2 weeks

47 hours agoRespect locale settings.
delphij [Fri, 28 Aug 2015 00:49:30 +0000 (00:49 +0000)]
Respect locale settings.

MFC after: 2 weeks

47 hours agoUse exit() instead of return in main().
delphij [Fri, 28 Aug 2015 00:44:58 +0000 (00:44 +0000)]
Use exit() instead of return in main().

MFC after: 2 weeks

47 hours agoRemove weighted page handling from vm_page_advise().
markj [Fri, 28 Aug 2015 00:44:17 +0000 (00:44 +0000)]
Remove weighted page handling from vm_page_advise().

This was added in r51337 as part of the implementation of
madvise(MADV_DONTNEED).  Its objective was to ensure that the page daemon
would eventually reclaim other unreferenced pages (i.e., unreferenced pages
not touched by madvise()) from the active queue.

Now that the pagedaemon performs steady scanning of the active page queue,
this weighted handling is unnecessary.  Instead, always "cache" clean pages
by moving them to the head of the inactive page queue.  This simplifies the
implementation of vm_page_advise() and eliminates the fragmentation that
resulted from the distribution of pages among multiple queues.

Suggested by: alc
Reviewed by: alc
Sponsored by: EMC / Isilon Storage Division
Differential Revision:

47 hours agoRe-apply r274569. It was reverted in r276848 since that appeared to fix
markj [Fri, 28 Aug 2015 00:38:18 +0000 (00:38 +0000)]
Re-apply r274569. It was reverted in r276848 since that appeared to fix
some ctfmerge crashes that started to occur on i386 weeks after r274569 was
committed. Some later investigation indicated that the crashes were caused
by malformed CTF info that led to a stack overflow. The issue with CTF
info in i386 kernels seems to have been resolved by r261246, which updated
libdwarf and libelf.

r274569 fixes a bug which caused duplicate types to appear in the kernel's
CTF info. This duplication generally does not cause problems when using
DTrace, but makes it easier to hit the limit of 2^15 - 1 distinct type
definitions in a CTF container.

MFC after: 2 weeks

47 hours agoRemove an unneeded instruction.
markj [Fri, 28 Aug 2015 00:17:21 +0000 (00:17 +0000)]
Remove an unneeded instruction.

MFC after: 1 week

47 hours agonv.h lives in sys/ as of r279439.
markj [Fri, 28 Aug 2015 00:12:59 +0000 (00:12 +0000)]
nv.h lives in sys/ as of r279439.

2 days agoUse CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags.
imp [Thu, 27 Aug 2015 23:46:42 +0000 (23:46 +0000)]
Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags.
Go ahead and defined -D_STANDALONE for all targets (only strictly
needed for some architecture, but harmless on those it isn't required
for). Also add -msoft-float to all architectures uniformly rather
that higgley piggley like it is today.

Differential Revision:

2 days agoNew 1-Wire bus implementation. 1-Wire controller is abstracted, though
imp [Thu, 27 Aug 2015 23:33:38 +0000 (23:33 +0000)]
New 1-Wire bus implementation. 1-Wire controller is abstracted, though
only gpiobus configured via FDT is supported. Bus enumeration is
supported. Devices are created for each device found. 1-Wire
temperature controllers are supported, but other drivers could be
written. Temperatures are polled and reported via a sysctl.  Errors
are reported via sysctl counters. Mis-wired bus detection is included
for more trouble shooting. See ow(4), owc(4) and ow_temp(4) for
details of what's supported and known issues.

This has been tested on Raspberry Pi-B, Pi2 and Beagle Bone Black
with up to 7 devices.

Differential Revision:
Relnotes: yes
MFC after: 2 weeks
Reviewed by: loos@ (with many insightful comments)

2 days agoDocument
imp [Thu, 27 Aug 2015 22:42:02 +0000 (22:42 +0000)]

2 days agopf: Remove support for 'scrub fragment crop|drop-ovl'
kp [Thu, 27 Aug 2015 21:27:47 +0000 (21:27 +0000)]
pf: Remove support for 'scrub fragment crop|drop-ovl'

The crop/drop-ovl fragment scrub modes are not very useful and likely to confuse
users into making poor choices.
It's also a fairly large amount of complex code, so just remove the support

Users who have 'scrub fragment crop|drop-ovl' in their pf configuration will be
implicitly converted to 'scrub fragment reassemble'.

Reviewed by: gnn, eri
Relnotes: yes
Differential Revision:

2 days agoFix type bug introduced at r286811.
mav [Thu, 27 Aug 2015 21:16:24 +0000 (21:16 +0000)]
Fix type bug introduced at r286811.

2 days agoFix a conversion error in rc.d/jail
peter [Thu, 27 Aug 2015 20:52:41 +0000 (20:52 +0000)]
Fix a conversion error in rc.d/jail

2 days agoIn vm_pageout_scan(), simplify the logic for determining if a page can be
alc [Thu, 27 Aug 2015 20:38:45 +0000 (20:38 +0000)]
In vm_pageout_scan(), simplify the logic for determining if a page can be
paged out and apply some nearby style fixes.

In collaboration with: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation, EMC / Isilon Storage Division

2 days agoadd documentation for timers that silby added in r197244, almost 6 years
jmg [Thu, 27 Aug 2015 19:12:42 +0000 (19:12 +0000)]
add documentation for timers that silby added in r197244, almost 6 years

2 days agodie() would never return, mark it as so.
delphij [Thu, 27 Aug 2015 18:11:00 +0000 (18:11 +0000)]
die() would never return, mark it as so.

MFC after: 2 weeks

2 days agoMove setting of LDFLAGS to the modules which require it actually, as
ume [Thu, 27 Aug 2015 17:16:18 +0000 (17:16 +0000)]
Move setting of LDFLAGS to the modules which require it actually, as
other kerberos5 modules do so.

2 days agoThere is no need to get the bus tag or handle.
andrew [Thu, 27 Aug 2015 16:27:51 +0000 (16:27 +0000)]
There is no need to get the bus tag or handle.

Sponsored by: ABT Systems Ltd

2 days agoLimit the speed to the bus frequency.
andrew [Thu, 27 Aug 2015 16:24:30 +0000 (16:24 +0000)]
Limit the speed to the bus frequency.

Sponsored by: ABT Systems Ltd

2 days agoAllow the fifo-depth and num-slots to be missing. For the former we read
andrew [Thu, 27 Aug 2015 16:18:22 +0000 (16:18 +0000)]
Allow the fifo-depth and num-slots to be missing. For the former we read
the value from the hardware, for the latter assume a single slot.

Sponsored by: ABT Systems Ltd

2 days agoget_inpcbinfo() and get_pcblist() are UDP local functions and
bz [Thu, 27 Aug 2015 15:27:41 +0000 (15:27 +0000)]
get_inpcbinfo() and get_pcblist() are UDP local functions and
do not do what one would expect by name. Prefix them with "udp_"
to at least obviously limit the scope.

This is a non-functional change.

Reviewed by: gnn, rwatson
MFC after: 2 weeks
Differential Revision:

2 days agoDecompose linkat()/renameat() rights to source and target.
ed [Thu, 27 Aug 2015 15:16:41 +0000 (15:16 +0000)]
Decompose linkat()/renameat() rights to source and target.

To make it easier to understand how Capsicum interacts with linkat() and
renameat(), rename the rights to CAP_{LINK,RENAME}AT_{SOURCE,TARGET}.

This also addresses a shortcoming in Capsicum, where it isn't possible
to disable linking to files stored in a directory. Creating hardlinks
essentially makes it possible to access files with additional rights.

Reviewed by: rwatson, wblock
Differential Revision:

2 days agoMake it buildable with WITH_OPENLDAP, again.
ume [Thu, 27 Aug 2015 15:03:34 +0000 (15:03 +0000)]
Make it buildable with WITH_OPENLDAP, again.

MFC after: 1 week

2 days agoRepair sys/cdefs.h enough to be usable with GCC 5.x
kan [Thu, 27 Aug 2015 14:00:23 +0000 (14:00 +0000)]
Repair sys/cdefs.h enough to be usable with GCC 5.x

The __alloc_size and __alloc_align need to be defined to
nothingness for lint, but the existing check is deficient
and allows attributes with working __has_attrubute() to
slip through.

2 days agoMake ncurses build with GCC 5.0 and up
kan [Thu, 27 Aug 2015 14:00:20 +0000 (14:00 +0000)]
Make ncurses build with GCC 5.0 and up

Merge the end result of two upstream changes:

Original fix from 20141206:
  + modify to work around change in development version of
    gcc introduced here:
    (reports by Marcus Shawcroft, Maohui Lei).

Later fixed in different manner in 20150725:
  + use alternate workaround for gcc 5.x feature (adapted from patch by
    Mikhail Peselnik).

2 days agoUnbreak nvi message catalog generation for 8 bit locales.
kan [Thu, 27 Aug 2015 14:00:16 +0000 (14:00 +0000)]
Unbreak nvi message catalog generation for 8 bit locales.

Feeding any file encoded in 8 bit locales such as KOI8-RU
to sort utility running under UTF-8 locale produces astonishing
result of recoding the output to UTF-8. To counter that, just
run sort under 'C' locale for now.

2 days agoAllow us to select the transfer count. This allows us to work with hardware
andrew [Thu, 27 Aug 2015 13:08:45 +0000 (13:08 +0000)]
Allow us to select the transfer count. This allows us to work with hardware
that seems to only work with a single block at a time.

Sponsored by: ABT Systems Ltd

2 days agoSilent a compilation warning on callout_stop()
jch [Thu, 27 Aug 2015 10:43:35 +0000 (10:43 +0000)]
Silent a compilation warning on callout_stop()

2 days agoIn callout_stop(), do not forget to initialize not_running variable.
jch [Thu, 27 Aug 2015 08:58:03 +0000 (08:58 +0000)]
In callout_stop(), do not forget to initialize not_running variable.
Thanks to hselasky for noticing that.

Differential Revision: (Updated)
Submitted by: hselasky
Pointy hat to: jch

2 days agoReplay r286410. Change KPI of how device drivers that provide wireless
glebius [Thu, 27 Aug 2015 08:56:39 +0000 (08:56 +0000)]
Replay r286410. Change KPI of how device drivers that provide wireless
connectivity interact with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann,
Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in

Reviewed by: adrian
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

2 days agoIn callout_stop(), if a callout is both pending and currently
jch [Thu, 27 Aug 2015 08:15:32 +0000 (08:15 +0000)]
In callout_stop(), if a callout is both pending and currently
being serviced return 0 (fail) but it is applicable only
mpsafe callouts.  Thanks to hselasky for finding this.

Differential Revision: (Updated)
Submitted by: hselasky
Reviewed by: jch

2 days agoFix packets/bytes accounting on i386.
melifaro [Thu, 27 Aug 2015 07:53:58 +0000 (07:53 +0000)]
Fix packets/bytes accounting on i386.

Spotted by: julian

2 days agoPlug a possible memory leak.
delphij [Thu, 27 Aug 2015 06:28:42 +0000 (06:28 +0000)]
Plug a possible memory leak.

MFC after: 2 weeks

2 days agoMore fixes to the new macros
bapt [Thu, 27 Aug 2015 05:39:32 +0000 (05:39 +0000)]
More fixes to the new macros

2 days agoFix typo in new macros
bapt [Thu, 27 Aug 2015 05:27:18 +0000 (05:27 +0000)]
Fix typo in new macros

2 days agoAn error of -1 from parse_mount() indicates that the specification
marcel [Thu, 27 Aug 2015 04:25:27 +0000 (04:25 +0000)]
An error of -1 from parse_mount() indicates that the specification
was invalid. Don't trigger a mount failure (which by default means
a panic), but instead just move on to the next directive in the
configuration. This typically has us ask for the root mount.

PR: 163245

2 days agoFix freescale sdhc driver, and add it to the files list.
jhibbits [Thu, 27 Aug 2015 03:47:56 +0000 (03:47 +0000)]
Fix freescale sdhc driver, and add it to the files list.

Also, add it to the mmc DRIVER_MODULE attachment list.

2 days agoUse the macro definition for EXC_PGM_TRAP, instead of the magic number.
jhibbits [Thu, 27 Aug 2015 03:44:06 +0000 (03:44 +0000)]
Use the macro definition for EXC_PGM_TRAP, instead of the magic number.

2 days agoMake more compatible with fmake by refraining from using :U
imp [Thu, 27 Aug 2015 02:59:48 +0000 (02:59 +0000)]
Make more compatible with fmake by refraining from using :U

Differential Revision:

2 days agoAutomatically append SUBDIR.yes to the SUBDIR variable, and
imp [Thu, 27 Aug 2015 01:55:00 +0000 (01:55 +0000)]
Automatically append SUBDIR.yes to the SUBDIR variable, and
remove duplicates. We cannot sort SUBDIR because many Makefiles
have .WAIT in the list which is strongly ordering. Rather than
try to second guess when to sort and when to not sort depending
on .WAIT being in the list, just remove duplicates.

2 days agoFor each FOO in FILESLISTS, append the value of FOO.yes, sort, and
imp [Thu, 27 Aug 2015 01:52:45 +0000 (01:52 +0000)]
For each FOO in FILESLISTS, append the value of FOO.yes, sort, and
remove duplicates.

2 days agoWhen the kernel is compiled with INVARIANTS, export that as
imp [Wed, 26 Aug 2015 23:58:03 +0000 (23:58 +0000)]
When the kernel is compiled with INVARIANTS, export that as

Differential Revision:
MFC after: 3 days

3 days agoAdd SCTP support.
tuexen [Wed, 26 Aug 2015 23:45:06 +0000 (23:45 +0000)]
Add SCTP support.

PR: 201585
MFC after: 3 weeks

3 days agoReplace strndup with OpenBSD's implementation.
delphij [Wed, 26 Aug 2015 23:28:10 +0000 (23:28 +0000)]
Replace strndup with OpenBSD's implementation.

MFC after: 2 weeks

3 days agoRemove a variable which is set but never used.
tuexen [Wed, 26 Aug 2015 22:52:18 +0000 (22:52 +0000)]
Remove a variable which is set but never used.

PR: 201585
MFC after: 3 weeks

3 days agoPrint the status on the first line of a socket description, not at
tuexen [Wed, 26 Aug 2015 22:50:53 +0000 (22:50 +0000)]
Print the status on the first line of a socket description, not at
the last one. This doesn't matter for TCP, but it does for the upcoming
SCTP support.

PR: 201585
MFC after: 3 weeks

3 days agoMerge i915_emit_box_p and i915_emit_box as done in linux 3.8
bapt [Wed, 26 Aug 2015 22:19:53 +0000 (22:19 +0000)]
Merge i915_emit_box_p and i915_emit_box as done in linux 3.8

Reviewed by: dumbbell
Differential Revision:

3 days agoBack out a change which should not have been committed yet
bapt [Wed, 26 Aug 2015 22:09:12 +0000 (22:09 +0000)]
Back out a change which should not have been committed yet

3 days agobackout a change that should not have crept in
bapt [Wed, 26 Aug 2015 22:00:40 +0000 (22:00 +0000)]
backout a change that should not have crept in

3 days agoReduce diff against linux 3.8
bapt [Wed, 26 Aug 2015 21:35:16 +0000 (21:35 +0000)]
Reduce diff against linux 3.8

Reviewed by: dumbbell
Differential Revision:

3 days agoReduce diff with linux 3.8.13 on i915_drv.c
bapt [Wed, 26 Aug 2015 21:33:43 +0000 (21:33 +0000)]
Reduce diff with linux 3.8.13 on i915_drv.c

While here update the list of devices id to match the one in linux 3.8.13

Reviewed by: dumbbell
Differential Revision:

3 days agoAdd more DRM_* debug macros from linux 3.8.13
bapt [Wed, 26 Aug 2015 21:31:04 +0000 (21:31 +0000)]
Add more DRM_* debug macros from linux 3.8.13

3 days agoSynchronize i915_reg.h with linux 3.8.13 version
bapt [Wed, 26 Aug 2015 21:17:48 +0000 (21:17 +0000)]
Synchronize i915_reg.h with linux 3.8.13 version

Keep a couple of old macros that will be removed lated when the rest of the code
will be updated to 3.8.13 equivalent.
Chase the renamed macros

Reviewed by: dumbbell
Differential Revision:

3 days agoBelatedly add entries for to catch up with r284745.
jkim [Wed, 26 Aug 2015 18:22:59 +0000 (18:22 +0000)]
Belatedly add entries for to catch up with r284745.

3 days agoAdd the SOC_HISI_HI6220 option. This will be used to enable drivers for
andrew [Wed, 26 Aug 2015 18:09:17 +0000 (18:09 +0000)]
Add the SOC_HISI_HI6220 option. This will be used to enable drivers for
the HiSilicon hi6220 SoC used in the HiKey 96boards board.

Sponsored by: ABT Systems Ltd

3 days agoMerge ACPICA 20150818.
jkim [Wed, 26 Aug 2015 17:13:47 +0000 (17:13 +0000)]
Merge ACPICA 20150818.

3 days agoAfter consultations with the arm community, don't define softfp for
imp [Wed, 26 Aug 2015 17:10:43 +0000 (17:10 +0000)]
After consultations with the arm community, don't define softfp for
armv6. It's too ambiguous. We do use the softfp ABI for the moment on
armv6, but we allow floating point register use (and the compilers
will generate it). This is too ambiguous to use it as a decider for
which algorithms to use on the platform. Err on the side of caution
and not define it.

Submitted by: ian@
Reviewed by: andrew@

3 days agoSummary: Add the interactivity equations to the header comment for our
gnn [Wed, 26 Aug 2015 16:36:41 +0000 (16:36 +0000)]
Summary: Add the interactivity equations to the header comment for our
interactivity calculation routine.

Suggested by: rwatson

3 days agoReduce diff on i915_dma.c against linux 3.8.13
bapt [Wed, 26 Aug 2015 13:23:56 +0000 (13:23 +0000)]
Reduce diff on i915_dma.c against linux 3.8.13

No functional changes

Discussed with: dumbbell
Reviewed by: dumbbell

3 days agoFix race condition in its_cmd_send()
zbb [Wed, 26 Aug 2015 12:32:46 +0000 (12:32 +0000)]
Fix race condition in its_cmd_send()

its_cmd_send() can be called by multiple CPUs simultaneously.
After the command is pushed to ITS command ring the completion
status is polled using global pointer to the next free ring slot.
Use copied pointer and provide correct locking to avoid spurious
pointer value when concurrent access occurs.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision:

3 days agoFix SEE ALSO.
pluknet [Wed, 26 Aug 2015 11:54:40 +0000 (11:54 +0000)]

The history mechanism applies to csh.

Sponsored by: Nginx, Inc.

3 days agoAdd an option to select which SoCs we are building for. It is intended to
andrew [Wed, 26 Aug 2015 11:36:23 +0000 (11:36 +0000)]
Add an option to select which SoCs we are building for. It is intended to
be used with any SoC specific drivers, for example a ThunderX nic driver
would use something like the following in files.arm64:

arm64/cavium/thunder_nic.c optional soc_cavm_thunderx thndr_nic

Reviewed by: imp
Sponsored by: ABT Systems Ltd
Differential Revision:

3 days agoOnly access the Samsung registers when targeting Samsung hardware.
andrew [Wed, 26 Aug 2015 10:54:14 +0000 (10:54 +0000)]
Only access the Samsung registers when targeting Samsung hardware.

Sponsored by: ABT Systems Ltd

3 days agoAdd a above the virtio section.
andrew [Wed, 26 Aug 2015 10:32:23 +0000 (10:32 +0000)]
Add a above the virtio section.

3 days agoFix filemon locking races.
bdrewery [Wed, 26 Aug 2015 03:44:48 +0000 (03:44 +0000)]
Fix filemon locking races.

Convert filemon_lock and struct filemon* lock to sx(9), rather than a
self-rolled reader-writer lock, and hold it for the entire time needed.

At least filemon_lock_write() was not checking for active readers when
it would successfully return with the write lock "held".  This led to
a race with reading entries from filemon_inuse as they were removed.  This
could be seen with QUEUE_MACRO_DEBUG enabled, causing -1 to be read as an
entry rather than a valid struct filemon*.

Fixing filemon_lock_write() to check readers was insufficient to fix the

sx(9) was used as the lock could be held while taking proctree_lock and sleeping
in fo_write.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

3 days agoThe Freescale qoriq PCIe controller is compatible with mpc85xx.
jhibbits [Wed, 26 Aug 2015 03:37:33 +0000 (03:37 +0000)]
The Freescale qoriq PCIe controller is compatible with mpc85xx.

Add the compatible checks.

Obtained from: Semihalf (partial)
Sponsored by: Alex Perez/Inertial Computing

3 days agoAvoid taking proctree_lock and searching parents in wrappers if not needed.
bdrewery [Wed, 26 Aug 2015 03:37:18 +0000 (03:37 +0000)]
Avoid taking proctree_lock and searching parents in wrappers if not needed.

This should help the case where filemon is loaded but not in use.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

3 days agoRemove unneeded inuse list locking in filemon_comment().
bdrewery [Wed, 26 Aug 2015 03:33:34 +0000 (03:33 +0000)]
Remove unneeded inuse list locking in filemon_comment().

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

3 days agoMove common locking for filemon_inuse and struct filemon* to filemon_pid_check().
bdrewery [Wed, 26 Aug 2015 03:32:47 +0000 (03:32 +0000)]
Move common locking for filemon_inuse and struct filemon* to filemon_pid_check().

This keeps the lock for the filemon_inuse list held only while reading
the list.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

3 days agoDrop a .WAIT into the list. Items later in the list than this depend
imp [Wed, 26 Aug 2015 02:47:11 +0000 (02:47 +0000)]
Drop a .WAIT into the list. Items later in the list than this depend
on items earlier. Enable parallel builds.

4 days agosh: Fix out of bounds read when there is no ] after a [:class:].
jilles [Tue, 25 Aug 2015 21:55:15 +0000 (21:55 +0000)]
sh: Fix out of bounds read when there is no ] after a [:class:].

The initial check for a matching ] was incorrect if a ] may be consumed by a
[:class:]. The subsequent loop assumed that there must be a ].

Remove the initial check and make the loop cope with a missing ].

Found with afl-fuzz.

MFC after: 1 week