]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMerge ^/head r284737 through r285152.
dim [Sat, 4 Jul 2015 21:50:39 +0000 (21:50 +0000)]
Merge ^/head r284737 through r285152.

8 years agoSummary: Add missing files necessary to build with IPSEC and crypto
gnn [Sat, 4 Jul 2015 21:32:44 +0000 (21:32 +0000)]
Summary: Add missing files necessary to build with IPSEC and crypto

8 years agoFix up tabs vs. spaces
gnn [Sat, 4 Jul 2015 20:31:06 +0000 (20:31 +0000)]
Fix up tabs vs. spaces

8 years agoAdd llvm patch corresponding to r285149.
dim [Sat, 4 Jul 2015 20:09:24 +0000 (20:09 +0000)]
Add llvm patch corresponding to r285149.

8 years agoPull in r241142 from upstream llvm trunk (by David Majnemer):
dim [Sat, 4 Jul 2015 20:07:37 +0000 (20:07 +0000)]
Pull in r241142 from upstream llvm trunk (by David Majnemer):

  [SCCP] Turn loads of null into undef instead of zero initialized values

  Surprisingly, this is a correctness issue: the mmx type exists for
  calling convention purposes, LLVM doesn't have a zero representation for
  them.

  This partially fixes PR23999.

Pull in r241143 from upstream llvm trunk (by David Majnemer):

  [LoopUnroll] Use undef for phis with no value live

  We would create a phi node with a zero initialized operand instead of
  undef in the case where no value was originally available.  This was
  problematic for x86_mmx which has no null value.

These fix a "Cannot create a null constant of that type!" error when
compiling the graphics/sdl2_gfx port with MMX enabled.

Reported by: amdmi3

8 years agoUse the correct type for physical addresses.
jhibbits [Sat, 4 Jul 2015 19:00:38 +0000 (19:00 +0000)]
Use the correct type for physical addresses.

On Book-E, physical addresses are actually 36-bits, not 32-bits.  This is
currently worked around by ignoring the top bits.  However, in some cases, the
boot loader configures CCSR to something above the 32-bit mark.  This is stage 1
in updating the pmap to handle 36-bit physaddr.

8 years agoChange comment added in r284540.
mav [Sat, 4 Jul 2015 18:51:54 +0000 (18:51 +0000)]
Change comment added in r284540.

This appeared to be not card's issue, but driver's, though solution is
the same so far.

8 years agoDrop discovered targets when initiator role is disabled.
mav [Sat, 4 Jul 2015 18:38:46 +0000 (18:38 +0000)]
Drop discovered targets when initiator role is disabled.

8 years agoRemove duplicate header string.h.
araujo [Sat, 4 Jul 2015 18:36:02 +0000 (18:36 +0000)]
Remove duplicate header string.h.

8 years agoAdd machine check register printing
jhibbits [Sat, 4 Jul 2015 18:16:41 +0000 (18:16 +0000)]
Add machine check register printing

This will print out the Memory Subsystem Status Register on MPC745x (G4+ class),
and the Machine Check Status Register on Book-E class CPUs, to aid in debugging
machine checks.  Other relevant registers, for other CPUs, can be added in the
future.

8 years agoRemove unused variable flags reported by clang. The function zygote_clone()
araujo [Sat, 4 Jul 2015 17:38:56 +0000 (17:38 +0000)]
Remove unused variable flags reported by clang. The function zygote_clone()
always receive the flags with value 0 and this flags is never checked on
zygote_main().

Differential Revision: D2689
Reviewed by: rodrigc, oshogbo

8 years agoEnable IPSEC in all GENERIC kernels.
gnn [Sat, 4 Jul 2015 17:37:00 +0000 (17:37 +0000)]
Enable IPSEC in all GENERIC kernels.

Universe and kernel build tests passed 4 July 2015

PR: 128030
Sponsored by: Rubicon Communications (Netgate)

8 years agoRemove unused variable to silence clang warning.
araujo [Sat, 4 Jul 2015 17:22:07 +0000 (17:22 +0000)]
Remove unused variable to silence clang warning.

Differential Revision: D2683
Reviewed by: rodrigc, bapt

8 years agoAdd fdclose(3) function.
oshogbo [Sat, 4 Jul 2015 16:42:14 +0000 (16:42 +0000)]
Add fdclose(3) function.

This function is equivalent to fclose(3) function except that it
does not close the underlying file descriptor.
fdclose(3) is step forward to make FILE structure private.

Reviewed by: wblock, jilles, jhb, pjd
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D2697

8 years agoMove the nvlist source and private includes from sys/kern to seperate
oshogbo [Sat, 4 Jul 2015 16:33:37 +0000 (16:33 +0000)]
Move the nvlist source and private includes from sys/kern to seperate
directory sys/contrib/libnv.

The goal of this operation is to NOT install header files which shouldn't
be used outside the nvlist library.

Approved by: pjd (mentor)

8 years agoInstall loader.rc with ARM u-boot loader (ubldr).
loos [Sat, 4 Jul 2015 16:19:38 +0000 (16:19 +0000)]
Install loader.rc with ARM u-boot loader (ubldr).

loader.rc is the responsible to read and process loader.conf variables.

This fix the issue of loader.conf being silently ignored.

MFC after: 3 days

8 years agoFix validation of crypted password
bapt [Sat, 4 Jul 2015 15:56:59 +0000 (15:56 +0000)]
Fix validation of crypted password
Small cleanups

8 years agoAlso validate inputs of pw groupmod -h and groupmod -H
bapt [Sat, 4 Jul 2015 15:54:11 +0000 (15:54 +0000)]
Also validate inputs of pw groupmod -h and groupmod -H

8 years agovfs: use shared vnode locking when looking up ".." in vop_stdvptocnp
mjg [Sat, 4 Jul 2015 15:46:39 +0000 (15:46 +0000)]
vfs: use shared vnode locking when looking up ".." in vop_stdvptocnp

Briefly discussed with: kib

8 years agofd: de-k&r-ify functions + some whitespace fixes
mjg [Sat, 4 Jul 2015 15:42:03 +0000 (15:42 +0000)]
fd: de-k&r-ify functions + some whitespace fixes

No functional changes.

8 years agoValidate input of pw usermod -h and pwusermod -H
bapt [Sat, 4 Jul 2015 15:27:04 +0000 (15:27 +0000)]
Validate input of pw usermod -h and pwusermod -H

Push the code that set the password into a separate function to improve
readability

Add regression tests about pw usermod -h and pw usermod -H

8 years agosysctl: get rid of sysctl_lock/unlock
mjg [Sat, 4 Jul 2015 14:44:39 +0000 (14:44 +0000)]
sysctl: get rid of sysctl_lock/unlock

Inline their contents into the only consumer.

8 years agoRemove non-existent dnvlist functions.
oshogbo [Sat, 4 Jul 2015 10:33:33 +0000 (10:33 +0000)]
Remove non-existent dnvlist functions.

Approved by: pjd (mentor)

8 years agoMove nvlist documentation to the FreeBSD Kernel Developer's sections.
oshogbo [Sat, 4 Jul 2015 10:27:30 +0000 (10:27 +0000)]
Move nvlist documentation to the FreeBSD Kernel Developer's sections.

Approved by: pjd (mentor)

8 years agoStaticize some stuff in mountd(8); no functional changes.
trasz [Sat, 4 Jul 2015 08:40:48 +0000 (08:40 +0000)]
Staticize some stuff in mountd(8); no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoimprove dependencies for this module a bit... not great, but at
jmg [Sat, 4 Jul 2015 08:16:32 +0000 (08:16 +0000)]
improve dependencies for this module a bit...  not great, but at
least gives some basics...  I would add them to DPSRC, but due to the
intrinsics headers, they can't be added...

8 years agosysctl: remove a debugging printf which crept in with r285125
mjg [Sat, 4 Jul 2015 07:01:43 +0000 (07:01 +0000)]
sysctl: remove a debugging printf which crept in with r285125

8 years agosysctl: switch sysctllock to a sleepable rmlock
mjg [Sat, 4 Jul 2015 06:54:15 +0000 (06:54 +0000)]
sysctl: switch sysctllock to a sleepable rmlock

The lock is almost never taken for writing.

8 years agoCache _MPATH and pass it down into the modules build. Some NFS setups
imp [Sat, 4 Jul 2015 05:43:45 +0000 (05:43 +0000)]
Cache _MPATH and pass it down into the modules build. Some NFS setups
make the find it does extremely expensive, so compute it only
once. Also make sure the 'traditional' module building method works at
the expense of a bit of duplicated code.

8 years agoQuieten the scorpion SoC/WMAC reset path. Stuff the non-error stuff
adrian [Sat, 4 Jul 2015 03:15:42 +0000 (03:15 +0000)]
Quieten the scorpion SoC/WMAC reset path.  Stuff the non-error stuff
under HALDEBUG().

8 years agoCall the WMAC DDR flush before handling an interrupt for the
adrian [Sat, 4 Jul 2015 03:07:28 +0000 (03:07 +0000)]
Call the WMAC DDR flush before handling an interrupt for the
Atheros AHB (internally) connected MAC.

TODO:

* verify the interrupt was for us before doing the DDR flush.

8 years agoReshuffle all of the DDR flush operations into a single switch/mux,
adrian [Sat, 4 Jul 2015 03:05:57 +0000 (03:05 +0000)]
Reshuffle all of the DDR flush operations into a single switch/mux,
and start teaching subsystems about it.

The Atheros MIPS platforms don't guarantee any kind of FIFO consistency
with interrupts in hardware.  So software needs to do a flush when it
receives an interrupt and before it calls the interrupt handler.

There are new ones for the QCA934x and QCA955x, so do a few things:

* Get rid of the individual ones (for ethernet and IP2);
* Create a mux and enum listing all the variations on DDR flushes;
* replace the uses of IP2 with the relevant one (which will typically
  be "PCI" here);
* call the USB DDR flush before calling the real USB interrupt handlers;
* call the ethernet one upon receiving an interrupt that's for us,
  rather than never calling it during operation.

Tested:

* QCA9558 (TP-Link archer c7 v2)
* AR9331 (Carambola 2)

TODO:

* PCI, USB, ethernet, etc need to do a double-check to see if the
  interrupt was truely for them before doing the DDR.  For now I
  prefer "correct" over "fast".

8 years agoWake up the hardware before doing anything in sysctl.
adrian [Sat, 4 Jul 2015 02:59:30 +0000 (02:59 +0000)]
Wake up the hardware before doing anything in sysctl.

This stops the panics that occur on MIPS platforms when doing say,
'sysctl dev.ath.0' whilst the MAC is asleep.  The MIPS platform is
rather unforgiving in getting power-save register access wrong and you
will get all kinds of odd failures if you don't have things woken
up at the right times.

Tested:

* QCA9558 (TP-Link Archer C7 v2)
* AR9331 (Carambola 2)

.. with no VAPs configured and ath0 down (thus the MAC is definitely
   asleep.)

PR: kern/201117

8 years agoAdd support for TEST_METADATA
jmmv [Sat, 4 Jul 2015 02:37:36 +0000 (02:37 +0000)]
Add support for TEST_METADATA

Allow Makefiles to define generic metadata settings that apply to all test
programs defined by a Makefile.  The generic TEST_METADATA variable extends
the per-test program settings already supported via TEST_METADATA.<program>.

This feature will be useful to easily apply some settings to all programs
in a directory.  In particular, Kyua 0.12 will support parallel execution
of test programs and a bunch of them will need to be tagged as is_exclusive
to indicate that they cannot be run in parallel with anything else due to
their side-effects.  It will be reasonable to set this setting on whole
directories.

MFC after: 1 week

8 years agoAdd missing shebang
jmmv [Sat, 4 Jul 2015 02:24:47 +0000 (02:24 +0000)]
Add missing shebang

Plain test programs are not preprocessed by the build system (as opposed to
ATF test cases, which automatically gain a shebang pointing at atf-sh), so
we must take care of providing the shebang ourselves.

I'm not sure why this was not causing problems with Kyua 0.11, but the
upcoming 0.12 release chokes on this particular issue.

MFC after: 1 week

8 years agoMake cleanup routines idempotent
jmmv [Sat, 4 Jul 2015 02:22:26 +0000 (02:22 +0000)]
Make cleanup routines idempotent

cleanup routines can be executed at any point during the execution of the
body, including even before the body has done any real work.  In those
cases, cleanup routines should be careful to not raise spurious errors so
as to not "override" the actual result of the test case.

This is just general good coding style but is not a problem in practice
for these specific tests.  (The way I discovered the issue, though, was
due to a regression I introduced in Kyua itself while refactoring some
internals.)

MFC after: 1 week

8 years agoUpdate LLDB snapshot to upstream r241361
emaste [Sat, 4 Jul 2015 01:02:43 +0000 (01:02 +0000)]
Update LLDB snapshot to upstream r241361

Notable upstream commits (upstream revision in parens):

- Add a JSON producer to LLDB (228636)
- Don't crash on bad DWARF expression (228729)
- Add support of DWARFv3 DW_OP_form_tls_address (231342)
- Assembly profiler for MIPS64 (232619)
- Handle FreeBSD/arm64 core files (233273)
- Read/Write register for MIPS64 (233685)
- Rework LLDB system initialization (233758)
- SysV ABI for aarch64 (236098)
- MIPS software single stepping (236696)
- FreeBSD/arm live debugging support (237303)
- Assembly profiler for mips32 (237420)
- Parse function name from DWARF DW_AT_abstract_origin (238307)
- Improve LLDB prompt handling (238313)
- Add real time signals support to FreeBSDSignals (238316)
- Fix race in IOHandlerProcessSTDIO (238423)
- MIPS64 Branch instruction emulation for SW single stepping (238820)
- Improve OSType initialization in elf object file's arch_spec (239148)
- Emulation of MIPS64 floating-point branch instructions (239996)
- ABI Plugin for MIPS32 (239997)
- ABI Plugin for MIPS64 (240123)
- MIPS32 branch emulation and single stepping (240373)
- Improve instruction emulation based stack unwinding on ARM (240533)
- Add branch emulation to aarch64 instruction emulator (240769)

8 years agoRevert r285018, r285019, r285076, r285078, r285082.
gjb [Sat, 4 Jul 2015 00:01:41 +0000 (00:01 +0000)]
Revert r285018, r285019, r285076, r285078, r285082.

The true cause of the missing UFS/MSDOSFS labels has been
identified, and only affects stable/10 at the moment.

An request for commit to stable/10 will be pending RE approval
after this commit.

MFC after: 1 day
X-MFC-Note: never
X-MFC-Never: r285018, r285019, r285076, r285078, r285082
Sponsored by: The FreeBSD Foundation

8 years agoIf a "principal" argument isn't provided for a Kerberized NFS mount,
rmacklem [Fri, 3 Jul 2015 22:11:07 +0000 (22:11 +0000)]
If a "principal" argument isn't provided for a Kerberized NFS mount,
the kernel would generate a bogus one with a ":/<path>" suffix.
This would only occur for the case where there was no explicit
"principal" argument and the getaddrinfo() call in mount_nfs.c failed to a
return a cannonical name for the server.
This patch fixes this unusual case.

PR: 201073
Submitted by: masato@itc.naist.jp
MFC after: 2 weeks

8 years agoUpdate the date on the manual page.
gnn [Fri, 3 Jul 2015 20:42:31 +0000 (20:42 +0000)]
Update the date on the manual page.

Noticed by: bz

8 years agoNew AES modes for IPSec, user space components.
gnn [Fri, 3 Jul 2015 20:09:14 +0000 (20:09 +0000)]
New AES modes for IPSec, user space components.
Update setkey and libipsec to understand aes-gcm-16 as an
encryption method.

A partial commit of the work in review D2936.

Submitted by: eri
Reviewed by: jmg
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agoKeep IPv6 address specified by IPV6_PKTINFO socket option in kernel
ae [Fri, 3 Jul 2015 19:01:38 +0000 (19:01 +0000)]
Keep IPv6 address specified by IPV6_PKTINFO socket option in kernel
internal form to be able handle link-local IPv6 addresses.

Reported by: kp
Tested by: kp

8 years agoAdd the routines to activate the GMAC clock and setup the GMAC mode.
loos [Fri, 3 Jul 2015 18:39:25 +0000 (18:39 +0000)]
Add the routines to activate the GMAC clock and setup the GMAC mode.

Tested on Cubieboard 2 and Banana pi.

8 years agoRename a10_emac_gpio_config() to a10_gpio_ethernet_activate() to make the
loos [Fri, 3 Jul 2015 17:54:41 +0000 (17:54 +0000)]
Rename a10_emac_gpio_config() to a10_gpio_ethernet_activate() to make the
change to GMAC easier on A20 SoCs.

On A10 only the EMAC controller is available (fast ethernet), but on A20
there is also GMAC a high (or better) performant controller (gigabit
ethernet).

On A20 the both controllers uses the same pins to talk to the ethernet PHY
(MII or RGMII) and they can be selected by the GPIO pin mux.

There is work in progress to bring in GMAC support.

8 years agoGrammar and language fixes.
kib [Fri, 3 Jul 2015 17:30:31 +0000 (17:30 +0000)]
Grammar and language fixes.

Submitted by: wblock
Review: https://reviews.freebsd.org/D2969
MFC after: 12 days

8 years agoRemove duplicate and unnecessary includes.
loos [Fri, 3 Jul 2015 17:09:27 +0000 (17:09 +0000)]
Remove duplicate and unnecessary includes.

While here remove an unused and wrong define.

8 years agoImport LLDB as of upstream SVN 241361 (git 612c075f)
emaste [Fri, 3 Jul 2015 16:57:06 +0000 (16:57 +0000)]
Import LLDB as of upstream SVN 241361 (git 612c075f)

8 years agoMake ctl(4) appear in "man -k iscsi" results.
trasz [Fri, 3 Jul 2015 16:55:08 +0000 (16:55 +0000)]
Make ctl(4) appear in "man -k iscsi" results.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

8 years agoMinor update to the proto(4) man page:
marcel [Fri, 3 Jul 2015 16:20:14 +0000 (16:20 +0000)]
Minor update to the proto(4) man page:
1.  We now support ISA devices
2.  DMA support has been added

8 years agoRemove commented-out and non-existent cbus(4) attachment for uart(4).
marcel [Fri, 3 Jul 2015 16:02:06 +0000 (16:02 +0000)]
Remove commented-out and non-existent cbus(4) attachment for uart(4).

8 years agoAllow proto(4) to be compiled into the kernel.
marcel [Fri, 3 Jul 2015 15:56:00 +0000 (15:56 +0000)]
Allow proto(4) to be compiled into the kernel.

8 years agoReduce overhead of IPSEC for traffic generated from host
eri [Fri, 3 Jul 2015 15:31:56 +0000 (15:31 +0000)]
Reduce overhead of IPSEC for traffic generated from host

When IPSEC is enabled on the kernel the forwarding path has an optimization to not enter the code paths
for checking security policies but first checks if there is any security policy active at all.

The patch introduces the same optimization but for traffic generated from the host itself.
This reduces the overhead by 50% on my tests for generated host traffic without and SP active.

Differential Revision: https://reviews.freebsd.org/D2980
Reviewed by: ae, gnn
Approved by: gnn(mentor)

8 years agoo Add a description for virtio block device implemented
br [Fri, 3 Jul 2015 14:46:57 +0000 (14:46 +0000)]
o Add a description for virtio block device implemented
  in PISM (Bluespec C-interface device)
o Add a kernel config

Sponsored by: HEIF5

8 years agoAllow BERI virtio-platform code to operate with no PIO devices specified.
br [Fri, 3 Jul 2015 14:27:28 +0000 (14:27 +0000)]
Allow BERI virtio-platform code to operate with no PIO devices specified.
We will use it with Bluespec simulator of CHERI processor for invalidating
caches only.

8 years agoAdd 'prewrite' method allowing us to run some platform-specific
br [Fri, 3 Jul 2015 14:13:16 +0000 (14:13 +0000)]
Add 'prewrite' method allowing us to run some platform-specific
code before each write happens, e.g. write-back caches.
This will help booting in Bluespec simulator of CHERI processor.

8 years agoAdd AHCI attachment code for Allwinner A10/A20 SoCs.
loos [Fri, 3 Jul 2015 14:11:01 +0000 (14:11 +0000)]
Add AHCI attachment code for Allwinner A10/A20 SoCs.

The Allwinner SoC has an AHCI device on its internal main bus rather
than the PCI bus.  This SoC is somewhat underdocumented, and its SATA
controller is no exception.  The methods to support this chip were
harvested from the Linux Allwinner SDK, and then constants invented to
describe what's going on based on low-level constants contained in the
SATA standard and guess work.

This SoC requires a specific AHCI channel setup in order to start the
operations on the channel properly.

Clock setup and AHCI channel setup idea came from NetBSD.

Tested on Cubieboard 2 and Banana pi (and attachment on Cubieboard by
Pratik Singhal).

Differential Revision: https://reviews.freebsd.org/D737
Submitted by: imp
Reviewed by: imp, ganbold, mav, andrew

8 years agonetfront: preserve configuration across migrations
royger [Fri, 3 Jul 2015 12:09:05 +0000 (12:09 +0000)]
netfront: preserve configuration across migrations

Try to preserve the xn configuration when migrating. This is not always
possible since the backend might not have the same set of options
available, in which case we will try to preserve as many as possible.

MFC after:    2 weeks
PR:           183139
Reported by:  mcdouga9@egr.msu.edu
Sponsored by: Citrix Systems R&D

8 years agoFix broken implementation of "kvasprintf()" function by adding missing
hselasky [Fri, 3 Jul 2015 11:16:20 +0000 (11:16 +0000)]
Fix broken implementation of "kvasprintf()" function by adding missing
kmalloc() call. Make function global instead of static inline to fix
compiler warnings about passing variable argument lists to inline
functions.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoRemove OpenSSL dependency from iscsid(8) and ctld(8).
trasz [Fri, 3 Jul 2015 10:08:10 +0000 (10:08 +0000)]
Remove OpenSSL dependency from iscsid(8) and ctld(8).

Differential Revision: https://reviews.freebsd.org/D2866
Submitted by: Tony Morlan <tony at scroner.com> (earlier version)
Reviewed by: bapt@, delphij@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoUser proper terminology - iSCSI sessions, not iSCSI connections.
trasz [Fri, 3 Jul 2015 10:04:41 +0000 (10:04 +0000)]
User proper terminology - iSCSI sessions, not iSCSI connections.

Sponsored by: The FreeBSD Foundation

8 years agoMove comment to the right position.
bz [Fri, 3 Jul 2015 09:53:56 +0000 (09:53 +0000)]
Move comment to the right position.

PR: 152791
Submitted by: vangyzen (as part of the functional change)
MFC after: 3 days

8 years agoOops - fix typo.
adrian [Fri, 3 Jul 2015 07:00:24 +0000 (07:00 +0000)]
Oops - fix typo.

8 years agoTest for loader.rc existence before attempting to create
gjb [Fri, 3 Jul 2015 06:15:54 +0000 (06:15 +0000)]
Test for loader.rc existence before attempting to create
the symlink from loader.rc.sample.

Fix paths relative to the CHROOTDIR.

MFC after: 3 days
X-MFC-With: r285076, r285078
X-MFC-Before: 10.2-BETA1
Sponsored by: The FreeBSD Foundation

8 years agoUpdated depends
sjg [Fri, 3 Jul 2015 06:11:54 +0000 (06:11 +0000)]
Updated depends

8 years agoFix generation of src.conf.5
sjg [Fri, 3 Jul 2015 06:10:09 +0000 (06:10 +0000)]
Fix generation of src.conf.5

Since makeman turns all options on, we need to guard somethings from
make(showconfig)

8 years agoAdd initial support for the TP-Link Archer C7 v2.
adrian [Fri, 3 Jul 2015 06:09:56 +0000 (06:09 +0000)]
Add initial support for the TP-Link Archer C7 v2.

The SoC, the flash, the ethernet ports and ethernet switch all work.
The USB works.

The 11ac PCIe NIC internally is at least seen by the PCIE RC, but
I haven't tried using it yet.  There's no driver and I haven't
yet swapped it out for a non-11ac chip.

The on-chip 2GHz wifi works, but there are some data errors that
get thrown up in STA mode when scanning.  I have a feeling I have
to finish the DDR flush code out and have it run correctly on the
shared interrupts; that'll take a bit of time to get right.

But if you're after an updated piece of hardware, the Archer C7 v2
is certainly there, and you can replace the 11ac NIC with a 3x3
Atheros PCIe device (eg AR9380, AR9390, AR9580, etc) and it'll
"just work".

Tested:

* TP-Link archer c7v2.

8 years agoRevert r285018 and r285019, which attempted to resolve
gjb [Fri, 3 Jul 2015 06:07:21 +0000 (06:07 +0000)]
Revert r285018 and r285019, which attempted to resolve
UFS/MSDOSFS label issues on FreeBSD/arm builds, however
the real problem was addressed in r285076, which is due
to two separate issues, unrelated to md(4) stale device
existence.

MFC after: 3 days
X-MFC-With: r285076
X-MFC-Before: 10.2-BETA1
Sponsored by: The FreeBSD Foundation

8 years agoAdd pcb1 to the QCA955x.
adrian [Fri, 3 Jul 2015 06:06:44 +0000 (06:06 +0000)]
Add pcb1 to the QCA955x.

The Tp-link Archer-C7v2 unit has a QCA9558 internally but hangs the
QCA988x 11ac PCIe NIC off of PCI RC #1, not #0.

So I actually finally /do/ have a board to verify whether PCIe is working.
Grr.

Tested:

* TP-Link Archer-C7v2.

8 years agoFix the real problem with missing UFS/MSDOSFS labels on the
gjb [Fri, 3 Jul 2015 06:01:37 +0000 (06:01 +0000)]
Fix the real problem with missing UFS/MSDOSFS labels on the
FreeBSD/arm builds.  The problem stems from the loader.rc file
not existing, as well as geom_label not being loaded at boot.

For now, add the geom_label_load entry to loader.conf, and
symlink loader.rc.sample to loader.rc, both of which allowed
my BeagleBone Black to boot fine with a UFS label reference in
fstab(5).

MFC after: 3 days
X-MFC-Before: 10.2-BETA1
Sponsored by: The FreeBSD Foundation

8 years agoImplement busdma_md_unload() and busdma_sync().
marcel [Fri, 3 Jul 2015 05:47:56 +0000 (05:47 +0000)]
Implement busdma_md_unload() and busdma_sync().

While here:
1.  have the Python bindings contain constants for the space
    identifiers and the sync operation.
2.  change the segment iterators to return None when done,
    not ENXIO.

8 years agoImplement unload and sync operations.
marcel [Fri, 3 Jul 2015 05:44:58 +0000 (05:44 +0000)]
Implement unload and sync operations.

8 years agoEnable setting the QCA955x GPIO output mux configuration.
adrian [Fri, 3 Jul 2015 03:34:21 +0000 (03:34 +0000)]
Enable setting the QCA955x GPIO output mux configuration.

It's not used by any boards yet, but it's going to creep up soon
as more boards show up.

8 years agoAdd register defines for the QCA955x DDR flush and GPIO control.
adrian [Fri, 3 Jul 2015 03:32:54 +0000 (03:32 +0000)]
Add register defines for the QCA955x DDR flush and GPIO control.

8 years agoAdd busdma_md_create, busdma_md_destroy and busdma_md_load.
marcel [Fri, 3 Jul 2015 02:06:47 +0000 (02:06 +0000)]
Add busdma_md_create, busdma_md_destroy and busdma_md_load.

8 years agomore word smithing wrt the crd_inject field...
jmg [Fri, 3 Jul 2015 01:55:06 +0000 (01:55 +0000)]
more word smithing wrt the crd_inject field...

We've already defined IV earlier, so no need to expand it a second
time here...

8 years agoAdd create, destroy and load of memory descriptors.
marcel [Fri, 3 Jul 2015 01:52:22 +0000 (01:52 +0000)]
Add create, destroy and load of memory descriptors.

8 years agoKill MFILES and find things automatically. It turned out to be only
imp [Fri, 3 Jul 2015 01:50:26 +0000 (01:50 +0000)]
Kill MFILES and find things automatically. It turned out to be only
lightly used. Find the proper .m file when we depend on *_if.[ch] in
the srcs line, with seat-belts for false positive matches.  This uses
make's path mechanism. A further refinement would be to calculate this
once, and then pass the resulting _MPATH to modules submakes.

Differential Revision: https://reviews.freebsd.org/D2327

8 years agomfiutil: increase buffer size to accommodate sprintf string
emaste [Fri, 3 Jul 2015 01:43:11 +0000 (01:43 +0000)]
mfiutil: increase buffer size to accommodate sprintf string

PR: 201289
MFC after: 1 week

8 years agoAlex Burlyga reported a POLA violation for the new NFS client as
rmacklem [Fri, 3 Jul 2015 01:15:21 +0000 (01:15 +0000)]
Alex Burlyga reported a POLA violation for the new NFS client as
compared to the old NFS client via email to the freebsd-fs@ mailing list.
For the new client, when multiple clients attempted to create a symbolic
link concurrently, more that one client would report success instead of
EEXIST. This was caused by code in the new client that mapped EEXIST to
OK assuming it was caused by a retried RPC request.
Since the old client did not do this, the patch defaults to the old
behaviour and permits the new behaviour to be enabled via a sysctl.

Reported by: alex.burlyga.ietf@gmail.com
Tested by: alex.burlyga.ietf@gmail.com
MFC after: 2 weeks

8 years agoupdate the documentation of the _IV_ flags... _IV_PRESENT doesn't
jmg [Fri, 3 Jul 2015 00:37:16 +0000 (00:37 +0000)]
update the documentation of the _IV_ flags...  _IV_PRESENT doesn't
mean what you think it should...  This will be fixed in the future
with a flag rename, but document what the flag really does and make
the _IV_ flags clear what their presents (or lack there of) means...

Reviewed by: gnn, eri (both earlier version)

8 years agoAdd repository.callsign, to help arcanist figure out what repo it's
mat [Thu, 2 Jul 2015 22:23:52 +0000 (22:23 +0000)]
Add repository.callsign, to help arcanist figure out what repo it's
doing things on when not using Subversion.

With hat: phabric-admin@
Sponsored by: Absolight

8 years agoLet the nv.h and dnv.h includes be only in sys directory.
oshogbo [Thu, 2 Jul 2015 21:58:10 +0000 (21:58 +0000)]
Let the nv.h and dnv.h includes be only in sys directory.

Change consumers to include those files from sys.
Add duplicated files to ObsoleteFiles.

Approved by: pjd (mentor)

8 years agoAdd stddef.h for size_t typedef.
oshogbo [Thu, 2 Jul 2015 21:46:07 +0000 (21:46 +0000)]
Add stddef.h for size_t typedef.

Approved by: pjd (mentor)

8 years agoBump .Dd due to changes made in r285050 and r285053
garga [Thu, 2 Jul 2015 19:41:08 +0000 (19:41 +0000)]
Bump .Dd due to changes made in r285050 and r285053

Spotted by: loos
Approved by: loos

8 years agoAdd an ISA/ACPI bus attachment to proto(4).
marcel [Thu, 2 Jul 2015 19:21:29 +0000 (19:21 +0000)]
Add an ISA/ACPI bus attachment to proto(4).

8 years agosysvshm: fix up some whitespace issues and spurious initialisation
mjg [Thu, 2 Jul 2015 19:14:30 +0000 (19:14 +0000)]
sysvshm: fix up some whitespace issues and spurious initialisation

8 years agosysvshm: don't lock proc when calculating attach_va
mjg [Thu, 2 Jul 2015 19:03:44 +0000 (19:03 +0000)]
sysvshm: don't lock proc when calculating attach_va

vm_daddr is constant and RLIMIT_DATA can be obtained from thread's copy of
rlimits.

8 years agosysvshm: fix shmrealloc
mjg [Thu, 2 Jul 2015 19:00:22 +0000 (19:00 +0000)]
sysvshm: fix shmrealloc

The code was supposed to initialize new segs in newsegs array, but used the old
pointer.

8 years agovm: don't lock proc around accesses to vm_{t,d}addr and RLIMIT_DATA in sys_mmap
mjg [Thu, 2 Jul 2015 18:30:12 +0000 (18:30 +0000)]
vm: don't lock proc around accesses to vm_{t,d}addr and RLIMIT_DATA in sys_mmap

vm_{t,d}addr are constant and we can use thread's copy of resource limits

8 years agoImprove pw_lock.3 text changed in r285050
garga [Thu, 2 Jul 2015 18:27:18 +0000 (18:27 +0000)]
Improve pw_lock.3 text changed in r285050

Suggested by: wblock
Approved by: gnn

8 years agoAvoid doing multiple route lookups for the same destination IP during forwarding
eri [Thu, 2 Jul 2015 18:10:41 +0000 (18:10 +0000)]
Avoid doing multiple route lookups for the same destination IP during forwarding

ip_forward() does a route lookup for testing this packet can be sent to a known destination,
it also can do another route lookup if it detects that an ICMP redirect is needed,
it forgets all of this and handovers to ip_output() to do the same lookup yet again.

This optimisation just does one route lookup during the forwarding path and handovers that to be considered by ip_output().

Differential Revision: https://reviews.freebsd.org/D2964
Approved by: ae, gnn(mentor)
MFC after: 1 week

8 years agoWhen passwd or group information is changed (by pw, vipw, chpass, ...)
garga [Thu, 2 Jul 2015 17:30:59 +0000 (17:30 +0000)]
When passwd or group information is changed (by pw, vipw, chpass, ...)
temporary file is created and then a rename() call move it to official file.
This operation didn't have any check to make sure data was written to disk
and if a power cycle happens system could end up with a 0 length passwd
or group database.

There is a pfSense bug with more infor about it:

https://redmine.pfsense.org/issues/4523

The following changes were made to protect passwd and group operations:

* lib/libutil/gr_util.c:
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.c
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file

* usr.sbin/pwd_mkdb/pwd_mkdb.c
 - Added O_SYNC flag on dbopen() calls
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.3
 - pw_lock() returns a file descriptor to master password file on success

Differential Revision: https://reviews.freebsd.org/D2978
Approved by: bapt
Sponsored by: Netgate

8 years agoRemove an unneeded define and old comment referencing amd64.
andrew [Thu, 2 Jul 2015 16:13:29 +0000 (16:13 +0000)]
Remove an unneeded define and old comment referencing amd64.

8 years agoRemove an old comment, the cache is enabled.
andrew [Thu, 2 Jul 2015 15:26:40 +0000 (15:26 +0000)]
Remove an old comment, the cache is enabled.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoAccount for the main process stack being one page below the highest
kib [Thu, 2 Jul 2015 15:22:13 +0000 (15:22 +0000)]
Account for the main process stack being one page below the highest
user address when ABI uses shared page.

Note that the change is no-op for correctness, since shared page does
not fault.  The mapping for the shared page is installed at the
address space creation, the page is unmanaged and its pte/pv entry
cannot be reclaimed.

Submitted by: Oliver Pinter
Review: https://reviews.freebsd.org/D2954
MFC after: 1 week

8 years agoUse pmap_load to load table entries. This simplifies finding places where
andrew [Thu, 2 Jul 2015 15:17:30 +0000 (15:17 +0000)]
Use pmap_load to load table entries. This simplifies finding places where
we access the tables.

Obtained from: ABT Systems Ltd
Sponsored by: The fReeBSD Foundation

8 years agoForce the dynamic linker to resolve _end early so we pick up the correct
andrew [Thu, 2 Jul 2015 15:02:59 +0000 (15:02 +0000)]
Force the dynamic linker to resolve _end early so we pick up the correct
copy.

Sponsored by: ABT Systems Ltd

8 years agoCleanup brk and sbrk to use the same code to find curbrk and minbrk when
andrew [Thu, 2 Jul 2015 14:54:21 +0000 (14:54 +0000)]
Cleanup brk and sbrk to use the same code to find curbrk and minbrk when
both compiling for PIC and non-PIC.

Sponsored by: ABT Systems Ltd

8 years agoUpdate meta2deps example after i386-elf to i386 rename
emaste [Thu, 2 Jul 2015 14:44:30 +0000 (14:44 +0000)]
Update meta2deps example after i386-elf to i386 rename

8 years agoUse single instance of the identical INKERNEL() and PMC_IN_KERNEL()
kib [Thu, 2 Jul 2015 14:37:21 +0000 (14:37 +0000)]
Use single instance of the identical INKERNEL() and PMC_IN_KERNEL()
macros on amd64 and i386.  Move the definition to machine/param.h.
kgdb defines INKERNEL() too, the conflict is resolved by renaming kgdb
version to PINKERNEL().

On i386, correct the lowest kernel address.  After the shared page was
introduced, USRSTACK no longer points to the last user address + 1 [*]

Submitted by: Oliver Pinter [*]
Sponsored by: The FreeBSD Foundation
MFC after: 1 week