]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoImplement process-shared locks support for libthr.so.3, without
kib [Sun, 28 Feb 2016 17:52:33 +0000 (17:52 +0000)]
Implement process-shared locks support for libthr.so.3, without
breaking the ABI.  Special value is stored in the lock pointer to
indicate shared lock, and offline page in the shared memory is
allocated to store the actual lock.

Reviewed by: vangyzen (previous version)
Discussed with: deischen, emaste, jhb, rwatson,
Martin Simmons <martin@lispworks.com>
Tested by: pho
Sponsored by: The FreeBSD Foundation

8 years agoAdd Allwinner A10/A20 RTC driver.
jmcneill [Sun, 28 Feb 2016 17:42:27 +0000 (17:42 +0000)]
Add Allwinner A10/A20 RTC driver.

Submitted by: Vladimir Belian <fate10@gmail.com>
Reviewed by: andrew, imp, jmcneill
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D5414

8 years agoAdd SMP support to the ARM PLATFORM code. This will allow us to have
andrew [Sun, 28 Feb 2016 13:43:58 +0000 (13:43 +0000)]
Add SMP support to the ARM PLATFORM code. This will allow us to have
different methods to start the secondary cores in a kernel built for
multiple SoCs, e.g. with the Allwinner A20 and A31.

Sponsored by: ABT systems Ltd
Differential Revision: https://reviews.freebsd.org/D5466

8 years agoFix .Xr - autofs(5) is section 5, not 8.
trasz [Sun, 28 Feb 2016 10:40:09 +0000 (10:40 +0000)]
Fix .Xr - autofs(5) is section 5, not 8.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd speed limit to dd(1). This is useful for testing RCTL disk io limits
trasz [Sun, 28 Feb 2016 10:27:12 +0000 (10:27 +0000)]
Add speed limit to dd(1). This is useful for testing RCTL disk io limits
(when they actually get committed, that is), and might also come in handy
in other situations.

Reviewed by: wblock@ (man page)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoBuild ofw_cpu.c on all ARM configs using FDT. As we mve towards using the
andrew [Sun, 28 Feb 2016 09:35:37 +0000 (09:35 +0000)]
Build ofw_cpu.c on all ARM configs using FDT. As we mve towards using the
Linux dts files these are more likely to have cpu nodes we can attach to.

Sponsored by: ABT Systems Ltd

8 years agoMigrate athregs over to use the new stats API.
adrian [Sun, 28 Feb 2016 06:30:39 +0000 (06:30 +0000)]
Migrate athregs over to use the new stats API.

8 years agoMigrate athstats to use the new stats API.
adrian [Sun, 28 Feb 2016 06:29:25 +0000 (06:29 +0000)]
Migrate athstats to use the new stats API.

8 years agoBegin abstracting out the access method for ath(4) ioctls.
adrian [Sun, 28 Feb 2016 06:29:07 +0000 (06:29 +0000)]
Begin abstracting out the access method for ath(4) ioctls.

Each of the ath* commands do their own direct socket/ioctl calls,
which makes it difficult to forklift upgrade things.

So, this is the beginning of abstracting out the stats API calls
in the hope that I can migrate things to use a /dev/athX file for
ioctls and use a more general interface.

Tested:

* QCA9565 NIC, STA mode

8 years agoSort subdirectories in BSD.debug.dist
emaste [Sun, 28 Feb 2016 00:24:13 +0000 (00:24 +0000)]
Sort subdirectories in BSD.debug.dist

8 years ago- Add myself to ports-secteam
junovitch [Sat, 27 Feb 2016 23:39:59 +0000 (23:39 +0000)]
- Add myself to ports-secteam

Approved by:    delphij, miwi, feld

8 years agoFix PIO mode on A31 and later SoCs.
jmcneill [Sat, 27 Feb 2016 22:26:05 +0000 (22:26 +0000)]
Fix PIO mode on A31 and later SoCs.

Newer Allwinner MMC implementations use a different FIFO register offset
(0x200 instead of 0x100). Since the FDT uses the same compat string for
both cases, base the decision on which FIFO offset to use on the Allwinner
SoC family.

Reviewed by: Emmanuel Vadot <manu@bidouilliste.com>
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D5468

8 years agoRemove old compatibility checks.
bdrewery [Sat, 27 Feb 2016 21:08:27 +0000 (21:08 +0000)]
Remove old compatibility checks.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoImplement pmap_change_attr() for PowerPC (Book-E only for now)
jhibbits [Sat, 27 Feb 2016 20:39:36 +0000 (20:39 +0000)]
Implement pmap_change_attr() for PowerPC (Book-E only for now)

Summary:
Some drivers need special memory requirements.  X86 solves this with a
pmap_change_attr() API, which DRM uses for changing the mapping of the GART and
other memory regions.  Implement the same function for PowerPC.  AIM currently
does not need this, but will in the future for DRM, so a default is added for
that, for business as usual.  Book-E has some drivers coming down that do
require non-default memory coherency.  In this case, the Datapath Acceleration
Architecture (DPAA) based ethernet controller has 2 regions for the buffer
portals: cache-inhibited, and cache-enabled.  By default, device memory is
cache-inhibited.  If the cache-enabled memory regions are mapped
cache-inhibited, an alignment exception is thrown on access.

Test Plan:
Tested with a new driver to be added after this (DPAA dTSEC ethernet driver).
No alignment exceptions thrown, driver works as expected with this.

Reviewed By: nwhitehorn
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5471

8 years agoMove another range check to use RMAN_IS_DEFAULT_RANGE().
jhibbits [Sat, 27 Feb 2016 16:27:48 +0000 (16:27 +0000)]
Move another range check to use RMAN_IS_DEFAULT_RANGE().

8 years agoRemove reaming files of the Casper daemon.
oshogbo [Sat, 27 Feb 2016 14:45:32 +0000 (14:45 +0000)]
Remove reaming files of the Casper daemon.

Reported by:    emaste
Approved by: pjd (mentor)

8 years agoCorrect date on ELF Tool Chain UPDATING entry
emaste [Sat, 27 Feb 2016 12:34:51 +0000 (12:34 +0000)]
Correct date on ELF Tool Chain UPDATING entry

Reported by: dhw

8 years agoMove IPI related parts back to (ARM) machine specific file now, when
skra [Sat, 27 Feb 2016 12:03:07 +0000 (12:03 +0000)]
Move IPI related parts back to (ARM) machine specific file now, when
the interrupt framework is also going to be used by another (MIPS)
architecture. IPI implementations may vary much across different
architectures.

An IPI implementation should still define INTR_IPI_COUNT and use
intr_ipi_setup_counters() to setup IPI counters which are inside of
intrcnt[] and intrnames[] arrays. Those are used for sysctl and ddb.
Then, intr_ipi_increment_count() should be used to increment obtained
counter.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D5459

8 years agoMigrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
jhibbits [Sat, 27 Feb 2016 03:38:01 +0000 (03:38 +0000)]
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().

Most calls to bus_alloc_resource() use "anywhere" as the range, with a given
count.  Migrate these to use the new bus_alloc_resource_anywhere() API.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D5370

8 years agoAdd the bus_alloc_resource_anywhere() convenience function.
jhibbits [Sat, 27 Feb 2016 03:35:28 +0000 (03:35 +0000)]
Add the bus_alloc_resource_anywhere() convenience function.

Summary:
Many instances of bus_alloc_resource() simply use 0 and ~0 for start and end to
denote 'anywhere' with a given count.  To clean this up, introduce a
bus_alloc_resource_anywhere() convenience function.

Bump __FreeBSD_version for the new API.

Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D5370

8 years agoReplace several bus_alloc_resource() calls with bus_alloc_resource_any()
jhibbits [Sat, 27 Feb 2016 03:34:01 +0000 (03:34 +0000)]
Replace several bus_alloc_resource() calls with bus_alloc_resource_any()

Most of these are BARs, and we allocate them in their entirety.  The one outlier
in this is amdsbwd, which calls bus_set_resource() prior.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D5370 (partial)

8 years agoMissing tab.
pfg [Sat, 27 Feb 2016 02:11:00 +0000 (02:11 +0000)]
Missing tab.

Pointed out by: bapt

8 years agoRPC: update the getrpcbyname() definition to include a const qualifier.
pfg [Fri, 26 Feb 2016 23:25:21 +0000 (23:25 +0000)]
RPC: update the getrpcbyname() definition to include a const qualifier.

Add const qualifier making getrpcbyname() and getrpcbyname_r()
prototypes match those used in latest Sun RPC code (TI-RPC 2.3).

Obtained from: NetBSD

8 years agopciconf: Silence a GCC warning.
pfg [Fri, 26 Feb 2016 23:12:59 +0000 (23:12 +0000)]
pciconf: Silence a GCC warning.

Fix the build on sparc64 and powerpc.

Taken from: wma

8 years agoRestore lib/casper debug directory, reverting r296130
emaste [Fri, 26 Feb 2016 22:25:35 +0000 (22:25 +0000)]
Restore lib/casper debug directory, reverting r296130

Reported by: bdrewery
Pointy hat to: emaste

8 years agoRemove libexec/casper debug directory missed in r296047
emaste [Fri, 26 Feb 2016 22:19:39 +0000 (22:19 +0000)]
Remove libexec/casper debug directory missed in r296047

8 years agoRemove WARNS inherited fine by ../Makefile.inc.
bdrewery [Fri, 26 Feb 2016 22:14:23 +0000 (22:14 +0000)]
Remove WARNS inherited fine by ../Makefile.inc.

Sponsored by: EMC / Isilon Storage Division

8 years agoMake it clear that the "size" argument is for the dst string.
bdrewery [Fri, 26 Feb 2016 22:14:19 +0000 (22:14 +0000)]
Make it clear that the "size" argument is for the dst string.

The rest of the manpage already referenced 'dstsize' but did not rename
the variable in the prototype in r257646.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate dependencies.
bdrewery [Fri, 26 Feb 2016 22:14:15 +0000 (22:14 +0000)]
Update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unneeded lines.
bdrewery [Fri, 26 Feb 2016 22:14:08 +0000 (22:14 +0000)]
Remove unneeded lines.

- WARNS can be inherited from lib/Makefile.inc
- CFLAGS referred to a non-existent directory and this shouldn't be needed
  anyhow due to the build picking up includes from WORLDTMP.

Sponsored by: EMC / Isilon Storage Division

8 years agoThese can build in parallel.
bdrewery [Fri, 26 Feb 2016 22:14:04 +0000 (22:14 +0000)]
These can build in parallel.

Sponsored by: EMC / Isilon Storage Division

8 years agoImport bsd.clang-analyze.mk based on NetBSD's version.
bdrewery [Fri, 26 Feb 2016 22:14:00 +0000 (22:14 +0000)]
Import bsd.clang-analyze.mk based on NetBSD's version.

This allows 'make analyze' or 'make OBJ.clang-analyzer' to run the
Clang static analyzer and present results on stdout.

Obtained from: NetBSD (CVS Rev. 1.3)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5449

8 years agoMETA_MODE: Default to the silent build.
bdrewery [Fri, 26 Feb 2016 22:13:56 +0000 (22:13 +0000)]
META_MODE: Default to the silent build.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove PROGS logic to proper place and remove redundant and unneeded logic.
bdrewery [Fri, 26 Feb 2016 22:13:52 +0000 (22:13 +0000)]
Move PROGS logic to proper place and remove redundant and unneeded logic.

- bsd.progs.mk is safe to include regardless of PROGS/PROGS_CXX/SCRIPTS
  being set.
- bsd.progs.mk includes bsd.prog.mk always and will bring in
  bsd.files.mk and bsd.obj.mk.
- DIRDEPS_BUILD: There's no need for _SKIP_BUILD or _SKIP_STAGING as the
  PROGS were implicitly being built by the staging dependency anyway.  This
  was also preventing other objects from building if they were not part of
  the staging sets.
- DIRDEPS_BUILD: This fixes PROGS without bsd.test.mk not staging.

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

8 years agoDIRDEPS_BUILD: Fix some things building in MAKELEVEL0.
bdrewery [Fri, 26 Feb 2016 22:13:48 +0000 (22:13 +0000)]
DIRDEPS_BUILD: Fix some things building in MAKELEVEL0.

For PROGS this was recursing twice since MAKELEVEL0 is for 'dirdeps'
which then really builds in a sub-make.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r295991: Only allow 'make destroy*' to include bsd.obj.mk.
bdrewery [Fri, 26 Feb 2016 22:13:45 +0000 (22:13 +0000)]
Follow-up r295991: Only allow 'make destroy*' to include bsd.obj.mk.

Sponsored by: EMC / Isilon Storage Division

8 years agoTrack .meta files for .sh but don't preserve timestamp.
bdrewery [Fri, 26 Feb 2016 22:13:42 +0000 (22:13 +0000)]
Track .meta files for .sh but don't preserve timestamp.

See r291320 for more information.

Sponsored by: EMC / Isilon Storage Division

8 years agoAllow configuring .MAKE.MODE via META_MODE as meta.sys.mk does.
bdrewery [Fri, 26 Feb 2016 22:13:38 +0000 (22:13 +0000)]
Allow configuring .MAKE.MODE via META_MODE as meta.sys.mk does.

meta.sys.mk is only used for the DIRDEPS_BUILD.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove more references to targets we've never had.
bdrewery [Fri, 26 Feb 2016 22:13:35 +0000 (22:13 +0000)]
Remove more references to targets we've never had.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove _manpages and _maninstall targets as they are no longer needed.
bdrewery [Fri, 26 Feb 2016 22:13:31 +0000 (22:13 +0000)]
Remove _manpages and _maninstall targets as they are no longer needed.

r96164 added them to avoid recursing twice with _SUBDIR.  That issue was
fixed in bsd.subdir.mk in r291635 for all targets.

Sponsored by: EMC / Isilon Storage Division

8 years agonet80211: fix 'uma_zalloc_arg: zone "32" with non-sleepable locks held'
avos [Fri, 26 Feb 2016 20:47:08 +0000 (20:47 +0000)]
net80211: fix 'uma_zalloc_arg: zone "32" with non-sleepable locks held'
when 'sysctl net.wlan.devices' is executed.

PR: 207497
Submitted by: glebius
Approved by: adrian (mentor)

8 years agoMake unions in PowerPC libc endian-safe.
nwhitehorn [Fri, 26 Feb 2016 20:38:23 +0000 (20:38 +0000)]
Make unions in PowerPC libc endian-safe.

8 years agoFix inverted test for lock status while waiting for PLL to become stable.
jmcneill [Fri, 26 Feb 2016 20:33:32 +0000 (20:33 +0000)]
Fix inverted test for lock status while waiting for PLL to become stable.

Reviewed by: andrew
Approved by: adrian (mentor)

8 years agoMake FPSCR definition endian clean.
nwhitehorn [Fri, 26 Feb 2016 20:25:26 +0000 (20:25 +0000)]
Make FPSCR definition endian clean.

PR: 207526
Submitted by: Simon Byrne
Obtained from: Julia
MFC after: 1 month

8 years agorlogin(1): Replace select(2) with poll(2).
pfg [Fri, 26 Feb 2016 20:02:01 +0000 (20:02 +0000)]
rlogin(1): Replace select(2) with poll(2).

Obtanied from: NetBSD (CVS Rev. 1.27 - 1.28)

8 years agoAdd debug /libexec directory for rtld-elf debug files
emaste [Fri, 26 Feb 2016 19:49:04 +0000 (19:49 +0000)]
Add debug /libexec directory for rtld-elf debug files

8 years agogetty(8): Undo incomplete support VEOL2 and VSTATUS.
pfg [Fri, 26 Feb 2016 19:35:51 +0000 (19:35 +0000)]
getty(8): Undo incomplete support VEOL2 and VSTATUS.

Forgot to add some definitions for charnames[].

8 years agogetty(8): Support VEOL2 and VSTATUS
pfg [Fri, 26 Feb 2016 19:08:37 +0000 (19:08 +0000)]
getty(8): Support VEOL2 and VSTATUS

Bring some type cleanups while here.

Obtained from: NetBSD

8 years agoMake the CUBIEBOARD config include the A10 config with a few needed
andrew [Fri, 26 Feb 2016 18:54:26 +0000 (18:54 +0000)]
Make the CUBIEBOARD config include the A10 config with a few needed
additions. This is used by the release scripts so we need to keep it
around for now.

Sponsored by: ABT Systems Ltd

8 years agogetty(8): Use poll(2) and nanosleep(2) instead of select(2).
pfg [Fri, 26 Feb 2016 18:52:06 +0000 (18:52 +0000)]
getty(8): Use poll(2) and nanosleep(2) instead of select(2).

Sort headers while here.

Obtained from: NetBSD (CVS Rev. 1.25 - 1.26)

8 years agoBump VM_MAX_MEMSEGS from 2 to 3 to match the number of VM segment
marcel [Fri, 26 Feb 2016 16:18:47 +0000 (16:18 +0000)]
Bump VM_MAX_MEMSEGS from 2 to 3 to match the number of VM segment
identifiers present in vmmapi.h. In particular, it's now possible
to create a VM_FRAMEBUFFER segment.

8 years agoAdd option -C to have the guest memory included in core files.
marcel [Fri, 26 Feb 2016 16:15:02 +0000 (16:15 +0000)]
Add option -C to have the guest memory included in core files.
This aids in debugging OS loaders.

8 years agoSupport version 4 of the userboot structure by implementing the
marcel [Fri, 26 Feb 2016 16:12:20 +0000 (16:12 +0000)]
Support version 4 of the userboot structure by implementing the
vm_set_register() and vm_set_desc() callbacks.

8 years agoAlmost all copies of platform_mp_init_secondary just called
andrew [Fri, 26 Feb 2016 16:04:47 +0000 (16:04 +0000)]
Almost all copies of platform_mp_init_secondary just called
intr_pic_init_secondary. Replace them with a direct call. On BCM2836
and ARMADA XP we need to add this function, but it can be empty.

Reviewed by: ian, imp
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5460

8 years agoAdd vm_set_register() and vm_set_desc() callbacks. These callbacks
marcel [Fri, 26 Feb 2016 16:00:16 +0000 (16:00 +0000)]
Add vm_set_register() and vm_set_desc() callbacks. These callbacks
translate directly into calls to their namesake API functions in
libvmmapi.

It is an improvement over the existing setreg(), setmsr(), setcr()
setgdt() and exec() callbacks in that the new additions give full
control and don't assume we're booting FreeBSD, like exec() and
don't assume one only wants to set the value of RSP, like setreg().

8 years agoRemove platform_mp_probe as it's almost identical on most ARM SoCs, and
andrew [Fri, 26 Feb 2016 15:54:34 +0000 (15:54 +0000)]
Remove platform_mp_probe as it's almost identical on most ARM SoCs, and
slightly wrong on the others. We should just check if mp_ncpus is set to
more than one CPU as we may wish to run on a single core even when SMP is
available.

Reviewed by: ian
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5458

8 years agoCheck that the userboot version is at least 3, rather than
marcel [Fri, 26 Feb 2016 15:52:55 +0000 (15:52 +0000)]
Check that the userboot version is at least 3, rather than
3 exactly. The structure may be of a newer version and as
long as it is backward compatible with 3, we can work with
it.

While here: whitespace nits.

8 years agoInstall elftoolchain elfcopy(1) as objcopy(1) by default
emaste [Fri, 26 Feb 2016 15:46:14 +0000 (15:46 +0000)]
Install elftoolchain elfcopy(1) as objcopy(1) by default

As of r295661 elfcopy supports PE format for EFI boot binaries and is a
viable objcopy implementation for the base system and ports.

The (temporary) src.conf knob WITHOUT_ELFCOPY_AS_OBJCOPY knob may be set
to obtain the GNU version if necessary.

PR: 207091 [exp-run]
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

8 years agorpc: fix failure to clear string by passing the wrong size to memset.
pfg [Fri, 26 Feb 2016 14:39:39 +0000 (14:39 +0000)]
rpc: fix failure to clear string by passing the wrong size to memset.

Noted by NetBSD's PR/21014

Obtained from: NetBSD (CVS Rev. 1.24, 1.25)
MFC after: 1 month

8 years agoo Use uint64_t for page number as it doesn't fit uint32_t.
br [Fri, 26 Feb 2016 14:04:00 +0000 (14:04 +0000)]
o Use uint64_t for page number as it doesn't fit uint32_t.
o Implement growkernel bits for L1 level of pagetables.

This allows us to boot with 128GB of physical memory.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoAdd the start of support for the Allwinner A31 clocks. It only adds
andrew [Fri, 26 Feb 2016 13:53:09 +0000 (13:53 +0000)]
Add the start of support for the Allwinner A31 clocks. It only adds
support for the i2c, mmc, and gmac clocks. Further clocks can be added as
needed.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by: jmcneill
Differential Revision: https://reviews.freebsd.org/D5339

8 years agoRemove the errno argument from unp_drop().
ed [Fri, 26 Feb 2016 12:46:34 +0000 (12:46 +0000)]
Remove the errno argument from unp_drop().

While there, add a comment to clarify that ECONNRESET should always be
returned for POSIX conformance.

Suggested by: Steven Hartland

8 years agoRestore ThunderX Pass1.1 PCI changes removed by r295962
wma [Fri, 26 Feb 2016 12:16:11 +0000 (12:16 +0000)]
Restore ThunderX Pass1.1 PCI changes removed by r295962

    If Enhanced Allocation is not used, we can't allocate any random
    range. All internal devices have hardcoded place where they can
    be located within PCI address space. Fortunately, we can read
    this value from BAR.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           zbb
Differential revision: https://reviews.freebsd.org/D5455

8 years agoChange format string in pciconf EA to jx
wma [Fri, 26 Feb 2016 10:24:24 +0000 (10:24 +0000)]
Change format string in pciconf EA to jx

    Fix compilation error introduced by r296081

8 years agohyperv/hn: Make transmission path channel aware
sephe [Fri, 26 Feb 2016 09:50:35 +0000 (09:50 +0000)]
hyperv/hn: Make transmission path channel aware

Chimney sending buffer still needs conversion, which will be done
along with the upcoming vRSS support.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5457

8 years agohyperv/hn: Remove the useless num_outstanding_sends
sephe [Fri, 26 Feb 2016 09:45:48 +0000 (09:45 +0000)]
hyperv/hn: Remove the useless num_outstanding_sends

We rely on taskqueue draining now.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5456

8 years agohyperv/hn: Associate TX/RX ring with channel
sephe [Fri, 26 Feb 2016 09:41:00 +0000 (09:41 +0000)]
hyperv/hn: Associate TX/RX ring with channel

This fixes the TX/RX ring selection for TX/RX done.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5454

8 years agohyperv/hn: Pass channel to TX/RX done
sephe [Fri, 26 Feb 2016 09:35:45 +0000 (09:35 +0000)]
hyperv/hn: Pass channel to TX/RX done

This is preamble to associate the TX/RX rings to their channel.

While I'm here, revoke unused netvsc_recv_rollup.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5453

8 years agohyperv/hn: Pass channel as the channel callback argument
sephe [Fri, 26 Feb 2016 09:29:50 +0000 (09:29 +0000)]
hyperv/hn: Pass channel as the channel callback argument

This is the preamble to pass channel back to hn(4) upon TX/RX done.

Reviewed by: Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5452

8 years agohyperv: Always set device for channels
sephe [Fri, 26 Feb 2016 09:23:17 +0000 (09:23 +0000)]
hyperv: Always set device for channels

And unregister hv_device only for primary channels, who own the hv_device.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5451

8 years agohyperv: Remove useless channel inbound_lock
sephe [Fri, 26 Feb 2016 09:17:31 +0000 (09:17 +0000)]
hyperv: Remove useless channel inbound_lock

It serves no purpose.

Reviewed by: Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5450

8 years agoAdd ns16550a compatible string in UART 8250 driver
wma [Fri, 26 Feb 2016 08:43:36 +0000 (08:43 +0000)]
Add ns16550a compatible string in UART 8250 driver

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           imp, wma
Differential revision: https://reviews.freebsd.org/D5404

8 years agoAdd support for Enhanced Allocation in pciconf
wma [Fri, 26 Feb 2016 08:35:04 +0000 (08:35 +0000)]
Add support for Enhanced Allocation in pciconf

 * Modified pciconf to print EA capability structure
 * Added register description to pcireg.h

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5440

8 years agoSo far bsd.stand.mk wasn't included in the following files:
sgalabov [Fri, 26 Feb 2016 08:16:44 +0000 (08:16 +0000)]
So far bsd.stand.mk wasn't included in the following files:
sys/boot/fdt/Makefile
sys/boot/uboot/fdt/Makefile
sys/boot/uboot/lib/Makefile

This causes compilation issues on MIPS due to trying to link PIC with non-PIC
code. This revision includes bsd.stand.mk in the above files.

Reviewed by: imp
Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5311

8 years agoCurrently BERI's loader is including the 32-bit version of the FICL MIPS sysdep.h...
sgalabov [Fri, 26 Feb 2016 08:06:25 +0000 (08:06 +0000)]
Currently BERI's loader is including the 32-bit version of the FICL MIPS sysdep.h (sys/boot/ficl/mips/sysdep.h) instead of the 64-bit version (sys/boot/ficl/mips64/sysdep.h).

Although this may not be an issue in practice, it would be more correct if the 64-bit version was used. Also, using the 64-bit version would make it easier to add support for 64-bit ubldr on MIPS.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5310

8 years agoAdd modules support for the bhnd code.
adrian [Fri, 26 Feb 2016 03:34:32 +0000 (03:34 +0000)]
Add modules support for the bhnd code.

Submitted by: Landon Fuller <landonf@landonf.org>
Obtained from: https://github.com/landonf/freebsd/compare/user/landonf/bcm4331-CURRENT

8 years agoBring over the initial rewrite of the broadcom bus support found in their
adrian [Fri, 26 Feb 2016 03:34:08 +0000 (03:34 +0000)]
Bring over the initial rewrite of the broadcom bus support found in their
SoCs and various chips (including, famously, their wifi chips.)

This is "just" (all 20,000 lines of it) code to enumerate the various
versions of busses inside these devices, including the PCI bridge and
the direct SIBA bridge found in MIPS chips.

It also includes shared code for some bus operations (suspend, resume, etc);
EEPROM/SROM/etc parsing and other things that are shared between chips.

Eventually this'll replace the code that bwi/bwn uses for the internal
bus, as well as some apparently upcoming mips74k broadcom SoC support
which uses bwn!

Thanks to Landon Fuller <landonf@landonf.org> for all this work!

Obtained from: https://github.com/landonf/freebsd/compare/user/landonf/bcm4331-CURRENT

8 years agohyperv: Use atomic_fetchadd_int to get GPADL id.
sephe [Fri, 26 Feb 2016 02:26:19 +0000 (02:26 +0000)]
hyperv: Use atomic_fetchadd_int to get GPADL id.

Reviewed by: Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5439

8 years agoLet CLEANDEPENDFILES actually be set before bsd.dep.mk.
bdrewery [Fri, 26 Feb 2016 01:52:33 +0000 (01:52 +0000)]
Let CLEANDEPENDFILES actually be set before bsd.dep.mk.

This fixes 'cleandepend' for kmods after r295983.

Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoUpgrade the firmware carried in driver and loaded during hardware
davidcs [Thu, 25 Feb 2016 22:44:00 +0000 (22:44 +0000)]
Upgrade the firmware carried in driver and loaded during hardware
initialization (a.k.a STORM firmware) to version 7.13.1 (latest version)

8 years agoFix a mistake that crept in when moving between git and svn, pic_ipi_send
andrew [Thu, 25 Feb 2016 22:13:43 +0000 (22:13 +0000)]
Fix a mistake that crept in when moving between git and svn, pic_ipi_send
should not be called from platform_mp_init_secondary.

Sponsored by: ABT Systems Ltd

8 years agoRemove realall references from initial NetBSD import in r219019.
bdrewery [Thu, 25 Feb 2016 21:05:04 +0000 (21:05 +0000)]
Remove realall references from initial NetBSD import in r219019.

We've never had a realall.

Sponsored by: EMC / Isilon Storage Division

8 years agoSlightly lessen the amount of job target output for SUBDIR_PARALLEL.
bdrewery [Thu, 25 Feb 2016 21:04:52 +0000 (21:04 +0000)]
Slightly lessen the amount of job target output for SUBDIR_PARALLEL.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove platform_ipi_send, it's an unneeded as all implementations are
andrew [Thu, 25 Feb 2016 20:48:23 +0000 (20:48 +0000)]
Remove platform_ipi_send, it's an unneeded as all implementations are
identical.

Sponsored by:  ABT Systems Ltd

8 years agoAdd Allwinner A20 HDMI support.
jmcneill [Thu, 25 Feb 2016 20:17:18 +0000 (20:17 +0000)]
Add Allwinner A20 HDMI support.

The HDMI driver will attach a framebuffer device when a display is
connected. If the EDID can be read and contains a preferred mode, it
will be used. Otherwise the framebuffer will default to 800x600.

In addition, if the EDID contains a CEA-861 extension block and the
"basic audio" flag is set, audio playback at 48kHz 16-bit stereo is
enabled on the controller.

Reviewed by: andrew
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D5383

8 years agoLock the NDP default router list and count defrouter references.
markj [Thu, 25 Feb 2016 20:12:05 +0000 (20:12 +0000)]
Lock the NDP default router list and count defrouter references.

This addresses a number of race conditions that can cause crashes as a
result of unsynchronized access to the list.

PR: 206904
Tested by: Larry Rosenman <ler@lerctr.org>,
Kevin Bowling <kevin.bowling@kev009.com>
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D5315

8 years agoFix build without FAST_DEPEND and without running 'make depend' after r295985.
bdrewery [Thu, 25 Feb 2016 20:02:42 +0000 (20:02 +0000)]
Fix build without FAST_DEPEND and without running 'make depend' after r295985.

The OBJS_DEPEND_GUESS mechanism required moving the bsd.dep.mk inclusion
to after the checks, but left DEPENDFILE not-yet-set.  Move it to
bsd.own.mk to resolve this.

Pointyhat to: bdrewery
Reported by: antoine (ports failures)
Sponsored by: EMC / Isilon Storage Division

8 years agoImprove error handling for posix_fallocate(2) and posix_fadvise(2).
markj [Thu, 25 Feb 2016 19:58:23 +0000 (19:58 +0000)]
Improve error handling for posix_fallocate(2) and posix_fadvise(2).

- Set td_errno so that ktrace and dtrace can obtain the syscall error
  number in the usual way.
- Pass negative error numbers directly to the syscall layer, as they're
  not intended to be returned to userland.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5425

8 years agoAdd myself as src committer
sgalabov [Thu, 25 Feb 2016 19:29:55 +0000 (19:29 +0000)]
Add myself as src committer

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5438

M    committers-src.dot

8 years agopass -fPIC to the assembler, not linker
emaste [Thu, 25 Feb 2016 19:26:14 +0000 (19:26 +0000)]
pass -fPIC to the assembler, not linker

-fPIC has no effect on linking although it seems to be ignored by
GNU ld.bfd.  However, it causes ld.lld to terminate with an invalid
argument error.

Reviewed by: dchagin, kib
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5444

8 years agotalk(1): Replace select(2) with poll(2)
pfg [Thu, 25 Feb 2016 19:06:44 +0000 (19:06 +0000)]
talk(1): Replace select(2) with poll(2)

Hinted by: OpenBSD and NetBSD

8 years agoConvert casperd(8) daemon to the libcasper.
oshogbo [Thu, 25 Feb 2016 18:23:40 +0000 (18:23 +0000)]
Convert casperd(8) daemon to the libcasper.
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.

Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by: drysdale@google.com, bdrewery
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D4277

8 years agoAdd simple support for CloudABI processes to kdump(1).
jhb [Thu, 25 Feb 2016 17:43:32 +0000 (17:43 +0000)]
Add simple support for CloudABI processes to kdump(1).

This does not decode arguments to system calls but should properly
decode system call names and error return values.

Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D5412

8 years agoAdd support for the Allwinner A31 watchdog to the existing A10 watchdog
andrew [Thu, 25 Feb 2016 16:50:36 +0000 (16:50 +0000)]
Add support for the Allwinner A31 watchdog to the existing A10 watchdog
driver. This mostly involves selecting the register offsets to use at
runtime based on the hardware we are talking to.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision: https://reviews.freebsd.org/D5327

8 years agoIntroduce HW TSO support for VNIC
zbb [Thu, 25 Feb 2016 14:29:57 +0000 (14:29 +0000)]
Introduce HW TSO support for VNIC

This feature was added in Pass2.0.
Significantly improves VNIC's TCP performance on Tx.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5424

8 years agoEnable CQ count threshold interrupt on VNIC Pass2.0
zbb [Thu, 25 Feb 2016 14:28:10 +0000 (14:28 +0000)]
Enable CQ count threshold interrupt on VNIC Pass2.0

On Pass2.0 can trigger interrupt on both timer and CQ count.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5423

8 years agoFix VNIC support for Pass2.0 ThunderX chips
zbb [Thu, 25 Feb 2016 14:26:13 +0000 (14:26 +0000)]
Fix VNIC support for Pass2.0 ThunderX chips

- Check chip revision using pass1_silicon() routine.
- Configure CPI correctly for Pass2.0

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5422

8 years agoRemove soft reset from the VNIC's PF driver
zbb [Thu, 25 Feb 2016 14:24:32 +0000 (14:24 +0000)]
Remove soft reset from the VNIC's PF driver

This is not needed and causes revid register of the PCI
configuration space to clear on Pass2.0.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5421

8 years agoImprove VNIC performance on Tx path by immediate packet transmission
zbb [Thu, 25 Feb 2016 14:23:02 +0000 (14:23 +0000)]
Improve VNIC performance on Tx path by immediate packet transmission

Don't postpone Tx if the Tx lock can be acquired now.
This gives 3x better performance on egress.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5325

8 years agoClean-up network interface settings for VNIC
zbb [Thu, 25 Feb 2016 14:21:04 +0000 (14:21 +0000)]
Clean-up network interface settings for VNIC

- Remove unrelevant bits
- Remove redundant code
- Reset variables and then set given bits

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5324