]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoelfcopy: enable PE and EFI support
Ed Maste [Fri, 12 Feb 2016 21:15:31 +0000 (21:15 +0000)]
elfcopy: enable PE and EFI support

Sponsored by: The FreeBSD Foundation

8 years agoAdd libpe for elfcopy(1) PE/COFF support
Ed Maste [Fri, 12 Feb 2016 21:12:47 +0000 (21:12 +0000)]
Add libpe for elfcopy(1) PE/COFF support

Sponsored by: The FreeBSD Foundation

8 years agoSimplify defrtrlist_update() slightly in preparation for future changes.
Mark Johnston [Fri, 12 Feb 2016 21:06:48 +0000 (21:06 +0000)]
Simplify defrtrlist_update() slightly in preparation for future changes.

No functional change intended.

MFC after: 1 week

8 years agoRemove a bogus comment from nd6_na_input().
Mark Johnston [Fri, 12 Feb 2016 21:01:53 +0000 (21:01 +0000)]
Remove a bogus comment from nd6_na_input().

The splnet() call that it refers to has been removed, and a lock for the
default router list is in fact needed.

MFC after: 1 week

8 years agoRemove superfluous return statements from the neighbour discovery code.
Mark Johnston [Fri, 12 Feb 2016 20:55:22 +0000 (20:55 +0000)]
Remove superfluous return statements from the neighbour discovery code.

MFC after: 1 week

8 years agoUpdate ELF Tool Chain to upstream rev 3400
Ed Maste [Fri, 12 Feb 2016 20:54:02 +0000 (20:54 +0000)]
Update ELF Tool Chain to upstream rev 3400

Some notable improvements include:

readelf:
- Add AArch64 relocation definitions.
- Report value of unknown relocation types.

elfcopy:
- Consider symbols with STB_GNU_UNIQUE binding as global symbols.
- Fixed support for VMA adjustment for loadable sections found
  in relocatable objects.
- Handle nameless global symbols.
- Improve wildcard matching for !-prefixed symbols.
- Add PE/COFF support.

elfdump:
- Improve section type reporting.
- Add MIPS-specific section types.

This update also includes a significant number of bug fixes.

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

8 years agoFix style around allocations from M_IP6NDP.
Mark Johnston [Fri, 12 Feb 2016 20:52:53 +0000 (20:52 +0000)]
Fix style around allocations from M_IP6NDP.

- Don't cast the return value of malloc(9).
- Use M_ZERO instead of explicitly calling bzero(9).

MFC after: 1 week

8 years agoRemove some unreferenced NDP debug variable definitions.
Mark Johnston [Fri, 12 Feb 2016 20:46:53 +0000 (20:46 +0000)]
Remove some unreferenced NDP debug variable definitions.

MFC after: 1 week

8 years agoClear the cookie pointer on error in tmpfs_readdir().
Mark Johnston [Fri, 12 Feb 2016 20:43:53 +0000 (20:43 +0000)]
Clear the cookie pointer on error in tmpfs_readdir().

It is otherwise left dangling, and callers that request cookies always free
the cookie buffer, even when VOP_READDIR(9) returns an error. This results
in a double free if tmpfs_readdir() returns an error to the NFS server or
the Linux getdents(2) emulation code.

Reported by: pho
MFC after: 1 week
Security: double free of malloc(9)-backed memory
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove duplicate definition (CPL_TRACE_PKT_T5).
Navdeep Parhar [Fri, 12 Feb 2016 20:14:03 +0000 (20:14 +0000)]
Remove duplicate definition (CPL_TRACE_PKT_T5).

8 years agoDocument the new jail_reverse_stop parameter
Mark Felder [Fri, 12 Feb 2016 17:55:06 +0000 (17:55 +0000)]
Document the new jail_reverse_stop parameter

While here clean up the documentation for jail_list

PR: 196152
Approved by: jamie, wblock
MFC after: 1 week, with r295471
Differential Revision: https://reviews.freebsd.org/D5243

8 years agoStop adding an extra null terminator to strings, OF_getprop already returns
Andrew Turner [Fri, 12 Feb 2016 17:04:03 +0000 (17:04 +0000)]
Stop adding an extra null terminator to strings, OF_getprop already returns
a null terminated string.

8 years agoUpdate .Dd for r295565
Benjamin Kaduk [Fri, 12 Feb 2016 17:03:24 +0000 (17:03 +0000)]
Update .Dd for r295565

8 years agoClarify the difference between 7- and 8-bit i2c addresses, used in FDT
Ian Lepore [Fri, 12 Feb 2016 16:59:42 +0000 (16:59 +0000)]
Clarify the difference between 7- and 8-bit i2c addresses, used in FDT
versus hints-based configuration, respectively.

Reported by: Jukka Ukkonen <jau789@gmail.com>

8 years agoUse __uint64_t type for floating point registers
Ruslan Bukin [Fri, 12 Feb 2016 14:29:14 +0000 (14:29 +0000)]
Use __uint64_t type for floating point registers
as compiler don't know about __uint128_t yet.

Discussed with: theraven, kib

8 years agoOnly update curthread and curpcb after we have finished using the old
Andrew Turner [Fri, 12 Feb 2016 12:38:04 +0000 (12:38 +0000)]
Only update curthread and curpcb after we have finished using the old
values.

If switching from a thread that used floating-point registers to a thread
that is still running, but holding the blocked_lock lock we would switch
the curthread to the new (running) thread, then call critical_enter. This
will non-atomically increment td_critnest, and later call critical_exit to
non-atomically decrement this value.

This can happen at the same time as the new thread is still running on the
old core, also calling these functions. In this case there will be a race
between these non-atomic operations. This can be an issue as we could loose
one of these operations leading to the value to not return to zero.

If, later on, we then hit a data abort we check if the td_critnest is zero.
If this check fails we will panic the kernel.

This has been observed when running pcmstat on a Cavium ThunderX. The pcm
thread will use the blocked_lock lock and there is a high chance userspace
will use the floating-point registers. When, later on, pmcstat triggers a
data abort we will hit this panic.

The fix is to update these values after storing the floating-point state.
This means we use the correct curthread while storing the state so it will
not be an issue that the changes to td_critnest are non-atomic.

Sponsored by: ABT Systems Ltd

8 years agoDon't check CmdSN for initial login request.
Alexander Motin [Fri, 12 Feb 2016 10:58:13 +0000 (10:58 +0000)]
Don't check CmdSN for initial login request.

This fixes connection errors for some initiators not starting CmdSN
from zero.

While there, fix wrong status details reported for couple errors.

MFC after: 3 days

8 years agoPOSIX states that #include <signal.h> shall make both mcontext_t and
Konstantin Belousov [Fri, 12 Feb 2016 07:38:19 +0000 (07:38 +0000)]
POSIX states that #include <signal.h> shall make both mcontext_t and
ucontext_t available.  Our code even has XXX comment about this.

Add a bit of compliance by moving struct __ucontext definition into
sys/_ucontext.h and including it into signal.h and sys/ucontext.h.

Several machine/ucontext.h headers were changed to use namespace-safe
types (like uint64_t->__uint64_t) to not depend on sys/types.h.
struct __stack_t from sys/signal.h is made always visible in private
namespace to satisfy sys/_ucontext.h requirements.

Apparently mips _types.h pollutes global namespace with f_register_t
type definition.  This commit does not try to fix the issue.

PR: 207079
Reported and tested by: Ting-Wei Lan <lantw44@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoIf full width writes to the performance monitoring counters are
Konstantin Belousov [Fri, 12 Feb 2016 07:27:24 +0000 (07:27 +0000)]
If full width writes to the performance monitoring counters are
supported, use full-width aliases MSRs for writes.  This fixes the
"[pmc,X] negative increment" assertion on the context switch when
clipped counter value is sign-extended.

Add definitions for the MSR IA32_PERF_CAPABILITIES needed to detect
the feature.

PR: 207068
Submitted by: joss.upton@yahoo.com
MFC after: 2 weeks

8 years agoAdjust the size of PMC_DEFAULT_DEBUG_FLAGS to match the size of the
Konstantin Belousov [Fri, 12 Feb 2016 07:20:27 +0000 (07:20 +0000)]
Adjust the size of PMC_DEFAULT_DEBUG_FLAGS to match the size of the
structure.

PR: 207068
Submitted by: joss.upton@yahoo.com
MFC after: 2 weeks

8 years agoRemove tautological cast.
Konstantin Belousov [Fri, 12 Feb 2016 07:19:59 +0000 (07:19 +0000)]
Remove tautological cast.

PR: 207068
Submitted by: joss.upton@yahoo.com
MFC after: 2 weeks

8 years agoUART: Fix spurious interrupts generated by ns8250 and lpc drivers:
Michal Meloun [Fri, 12 Feb 2016 05:14:58 +0000 (05:14 +0000)]
UART: Fix spurious interrupts generated by ns8250 and lpc drivers:
 - don't enable transmitter empty interrupt before filling TX FIFO.
 - add missing uart_barrier() call in interrupt service routine

8 years agoComments and fix small bug
Devin Teske [Fri, 12 Feb 2016 02:53:44 +0000 (02:53 +0000)]
Comments and fix small bug

Reduce differences between jib/jng and fix a bug that would prevent
additional interfaces from being created if the first of many already
existed (counter wasn't incremented before calling only continue).

8 years agoInterpret vnet_interface/vnet.interface as array
Devin Teske [Fri, 12 Feb 2016 02:50:36 +0000 (02:50 +0000)]
Interpret vnet_interface/vnet.interface as array

8 years agoAdd syntax to disable MAC allocation
Devin Teske [Fri, 12 Feb 2016 01:41:40 +0000 (01:41 +0000)]
Add syntax to disable MAC allocation

Adding `!' before an interface name will disable MAC allocation, falling
back to driver mechanics. Alternatively adding `=' before an interface name
causes the MAC address to be cloned (for ng_bridge(4) back-end only). While
here, disable the auto-detection of wlan* since this knocks the host off;
requiring the host that defines the jail to explicitly enable this feature
by preceding the interface with `='.

8 years agoRefactor conversion to hex
Devin Teske [Fri, 12 Feb 2016 01:12:44 +0000 (01:12 +0000)]
Refactor conversion to hex

8 years agoLoopback addresses are 127.0.0.0/8, not 127.0.0.1/32.
Michael Tuexen [Thu, 11 Feb 2016 22:29:39 +0000 (22:29 +0000)]
Loopback addresses are 127.0.0.0/8, not 127.0.0.1/32.

MFC after: 1 week

8 years agoAdd support for bridging iwn(4) based wlan(4)
Devin Teske [Thu, 11 Feb 2016 22:10:54 +0000 (22:10 +0000)]
Add support for bridging iwn(4) based wlan(4)

Documented in iwn(4), "Only one virtual interface may be configured at any
time." However, netgraph with a cloned MAC address is able to communicate
over an ng_eiface attached to an ng_bridge linked to the wlan(4) interface.
While here, introduce syntax to specify the MAC address is to be cloned if
the named interface begins with equals [=].

8 years agoo Gather all mbuf(9) allocation functions into kern_mbuf.c, and all
Gleb Smirnoff [Thu, 11 Feb 2016 21:32:23 +0000 (21:32 +0000)]
o Gather all mbuf(9) allocation functions into kern_mbuf.c, and all
  mbuf(9) manipulation functions into uipc_mbuf.c.  This looks like
  the initial intent, but had diffused in the last decade.

o Gather all declarations in mbuf.h in one place and sort them.

o Uninline m_clget() and m_cljget().

There are no functional changes in this patch.

The patch comes from a larger version, where all mbuf(9) allocation was
uninlined, which allowed to make mbuf(9) UMA zones private to kern_mbuf.c.
The performance impact of the total uninlining is still unclear, so we
are holding on now with larger version.

Together with: melifaro, olivier

8 years agoCentralize MAC derivation formula
Devin Teske [Thu, 11 Feb 2016 21:28:34 +0000 (21:28 +0000)]
Centralize MAC derivation formula

8 years agoAdd example VIMAGE config required by vnet jails
Devin Teske [Thu, 11 Feb 2016 18:37:02 +0000 (18:37 +0000)]
Add example VIMAGE config required by vnet jails

8 years agoUse 4 spaces instead of a tab.
Michael Tuexen [Thu, 11 Feb 2016 18:35:46 +0000 (18:35 +0000)]
Use 4 spaces instead of a tab.

8 years agoEnable ARM_INTRNG on all kernel configs where we use the Generic Interrupt
Andrew Turner [Thu, 11 Feb 2016 18:01:10 +0000 (18:01 +0000)]
Enable ARM_INTRNG on all kernel configs where we use the Generic Interrupt
Controller.

Sponsored by: ABT Systems Ltd

8 years agoFix double-free error: r289419 moved all error handling in http_connect()
Dag-Erling Smørgrav [Thu, 11 Feb 2016 17:48:15 +0000 (17:48 +0000)]
Fix double-free error: r289419 moved all error handling in http_connect()
to the end of the function, but did not remove a fetch_close() call which
was made redundant by the one in the shared error-handling code.

PR: 206774
Submitted by: Christian Heckendorf <heckendorfc@gmail.com>
MFC after: 3 days

8 years agoUse the new insecure-lan-zones option instead of listing each AS112 zone
Dag-Erling Smørgrav [Thu, 11 Feb 2016 17:37:02 +0000 (17:37 +0000)]
Use the new insecure-lan-zones option instead of listing each AS112 zone
separately.

MFC after: 3 days

8 years agoRemove unbound-contrl-setup since we use a local control socket which
Dag-Erling Smørgrav [Thu, 11 Feb 2016 17:33:55 +0000 (17:33 +0000)]
Remove unbound-contrl-setup since we use a local control socket which
does not require keys.

MFC after: 3 days
Relnotes: yes

8 years agonvme: avoid duplicate SET_NUM_QUEUES commands
Jim Harris [Thu, 11 Feb 2016 17:32:41 +0000 (17:32 +0000)]
nvme: avoid duplicate SET_NUM_QUEUES commands

nvme(4) issues a SET_NUM_QUEUES command during device
initialization to ensure enough I/O queues exists for each
of the MSI-X vectors we have allocated.  The SET_NUM_QUEUES
command is then issued again during nvme_ctrlr_start(), to
ensure that is properly set after any controller reset.

At least one NVMe drive exists which fails this second
SET_NUM_QUEUES command during device initialization.  So
change nvme_ctrlr_start() to only issue its SET_NUM_QUEUES
command when it is coming out of a reset - avoiding the
duplicate SET_NUM_QUEUES during device initialization.

Reported by: gallatin
MFC after: 3 days
Sponsored by: Intel

8 years agoApply upstream r3619, r3620, r3621: add insecure-lan-zone option
Dag-Erling Smørgrav [Thu, 11 Feb 2016 17:25:12 +0000 (17:25 +0000)]
Apply upstream r3619, r3620, r3621: add insecure-lan-zone option

8 years agoMerge SVN r295220 (bz) from projects/vnet/
Devin Teske [Thu, 11 Feb 2016 17:07:19 +0000 (17:07 +0000)]
Merge SVN r295220 (bz) from projects/vnet/

Fix a panic that occurs when a vnet interface is unavailable at the time the
vnet jail referencing said interface is stopped.

Sponsored by: FIS Global, Inc.

8 years agoInclude the correct header to get a phandle_t needed by ofw_bus_if.h. While
Andrew Turner [Thu, 11 Feb 2016 16:43:23 +0000 (16:43 +0000)]
Include the correct header to get a phandle_t needed by ofw_bus_if.h. While
here only include opt_platform.h once.

Sponsored by: ABT Systems Ltd

8 years agoExt4: Use boolean type instead of '0' and '1'
Pedro F. Giffuni [Thu, 11 Feb 2016 15:27:14 +0000 (15:27 +0000)]
Ext4: Use boolean type instead of '0' and '1'

There are precedents of uses of bool in the kernel and
it is incorrect style to use integers as replacement for
a boolean type.

8 years agoExplain that boot1.efi prefers ZFS over UFS
Ed Maste [Thu, 11 Feb 2016 14:45:18 +0000 (14:45 +0000)]
Explain that boot1.efi prefers ZFS over UFS

Reported by: smh

8 years agoo Move non-generic kernel configuration out from GENERIC.
Ruslan Bukin [Thu, 11 Feb 2016 13:28:52 +0000 (13:28 +0000)]
o Move non-generic kernel configuration out from GENERIC.
o Add kernel configuration for QEMU.

Both SPIKE and QEMU kernel configs are temporary (until
we will be able to obtain DTB from loader).

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoMigrate the PTE format for book-e to standardize on the 'indirect PTE' format
Justin Hibbits [Thu, 11 Feb 2016 13:15:37 +0000 (13:15 +0000)]
Migrate the PTE format for book-e to standardize on the 'indirect PTE' format

Summary:
The revised Book-E spec, adding the specification for the MMUv2 and e6500,
includes a hardware PTE layout for indirect page tables.  In order to support
this in the future, migrate the PTE format to match the MMUv2 hardware PTE
format.

Test Plan: Boot tested on a P5020 board.  Booted to multiuser mode.

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

8 years agoSupport interrupts binding in GICv3 and ITS
Zbigniew Bodek [Thu, 11 Feb 2016 12:04:58 +0000 (12:04 +0000)]
Support interrupts binding in GICv3 and ITS

- Add MOVI command and routine for the LPI migration
- Allow to search for the ITS device descriptor using
  not only devID but also LPI number.
- Bind SPIs in the Distributor
- Don't bind its_dev to collection. Keep track of the collection
  IDs for each LPI.

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

8 years agoImplement finer locking in ITS
Zbigniew Bodek [Thu, 11 Feb 2016 12:03:11 +0000 (12:03 +0000)]
Implement finer locking in ITS

- Change locks' names to be more suitable
- Don't use blocking mutex. Lock only basic operations such
  as lists or bitmaps modifications.

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

8 years agoInitially bind all interrupts to the boot CPU when using GICv3
Zbigniew Bodek [Thu, 11 Feb 2016 12:01:33 +0000 (12:01 +0000)]
Initially bind all interrupts to the boot CPU when using GICv3

This should be done by routing all interrupts to CPU0,
different assignment will be induced by either interrupts
shuffling or bus_bind_intr().

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

8 years agoCall pmc_hook() correctly in the ARM64 interrupt handler
Zbigniew Bodek [Thu, 11 Feb 2016 11:59:32 +0000 (11:59 +0000)]
Call pmc_hook() correctly in the ARM64 interrupt handler

pmc_hook() was called only in case of the stray interrupt but should
rather be called on each interrupt. Move in to the arm_cpu_intr()
handler, out of the critical section too.

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

8 years agoIntroduce bus_bind_intr method for ARM64
Zbigniew Bodek [Thu, 11 Feb 2016 11:58:27 +0000 (11:58 +0000)]
Introduce bus_bind_intr method for ARM64

It can be used to bind specific interrupt to a particular CPU.
Requires PIC support for interrupts binding.

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

8 years agoFix bugs in interrupts allocation on ARM64
Zbigniew Bodek [Thu, 11 Feb 2016 11:57:13 +0000 (11:57 +0000)]
Fix bugs in interrupts allocation on ARM64

Separate interrupt descriptors lookup from allocation. It was possible
to perform config on non-existing interrupt simply by allocating spurious
descriptor.
Must lock the interrupt descriptors table lookup to avoid mismatches.
This ought to prevent trouble while setting up new interrupt
and dispatching existing one.
Use spin mutex rather than sleep mutex. This is mainly due to lock in
arm_dispatch_intr.
This should be eventually changed to a lock-less solution without
walking through a linked list on each interrupt.

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

8 years agoxen-netfront: remove useless NULL check in netif_free
Roger Pau Monné [Thu, 11 Feb 2016 11:57:12 +0000 (11:57 +0000)]
xen-netfront: remove useless NULL check in netif_free

xn_ifp is allocated in create_netdev with if_alloc(IFT_ETHER).
According to the current arrangement it can't be NULL.

Coverity ID: 1349805
Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D5252

8 years agoMinor clean-ups for ARM64 GICv3 and GIC drivers
Zbigniew Bodek [Thu, 11 Feb 2016 11:55:37 +0000 (11:55 +0000)]
Minor clean-ups for ARM64 GICv3 and GIC drivers

GICv3:
- move ICC_SGI1R_EL1 definitions to armreg.h and use proper system
  register's names
GIC:
- remove unused functions

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

8 years agoxen-netfront: rearrange error paths in setup_txqs
Roger Pau Monné [Thu, 11 Feb 2016 11:53:32 +0000 (11:53 +0000)]
xen-netfront: rearrange error paths in setup_txqs

Coverity spotted double free errors in error path. Fix that by
removing the extraneous calls.

Coverity ID: 1349798
Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D5251

8 years agoxen-netfront: remove pointless assignment in xn_ioctl
Roger Pau Monné [Thu, 11 Feb 2016 11:50:31 +0000 (11:50 +0000)]
xen-netfront: remove pointless assignment in xn_ioctl

The variable error is assigned to 0 before entering the switch.
Assigning error to 0 before break pointless rewrites the real error
value that should be returned.

Coverity ID: 1304974
Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D5250

8 years agoStop defining fdt_pic_table when building for ARM_INTRNG.
Andrew Turner [Thu, 11 Feb 2016 11:49:27 +0000 (11:49 +0000)]
Stop defining fdt_pic_table when building for ARM_INTRNG.

8 years agoStop device enumeration when we see first empty slot.
Ruslan Bukin [Thu, 11 Feb 2016 11:21:45 +0000 (11:21 +0000)]
Stop device enumeration when we see first empty slot.
This fixes operation in QEMU and saves some booting time as well.

Pointed out by: Sagar Karandikar <skarandikar@berkeley.edu>
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoRemove unused Zedboard config files. files.zedboard was empty other than
Andrew Turner [Thu, 11 Feb 2016 10:48:15 +0000 (10:48 +0000)]
Remove unused Zedboard config files. files.zedboard was empty other than
comments, and std.zedboard just pointed to files.zedboard and std.xilinx.

8 years agoUse a pair of ifs when comparing the 32-bit flowid integers so that
Hans Petter Selasky [Thu, 11 Feb 2016 10:03:50 +0000 (10:03 +0000)]
Use a pair of ifs when comparing the 32-bit flowid integers so that
the sign bit doesn't cause an overflow. The overflow manifests itself
as a sorting index wrap around in the middle of the sorted array,
which is not a problem for the LRO code, but might be a problem for
the logic inside qsort().

Reviewed by: gnn @
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D5239

8 years agoARM64 disassembler: support for LDR instructions
Wojciech Macek [Thu, 11 Feb 2016 06:50:11 +0000 (06:50 +0000)]
ARM64 disassembler: support for LDR instructions

    Implemented disassembly for a whole bunch of
    various ldr instructions.

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

8 years agoMake bus_space_generic properly map/unmap memory (using pmap_mapdev and
Adrian Chadd [Thu, 11 Feb 2016 06:24:34 +0000 (06:24 +0000)]
Make bus_space_generic properly map/unmap memory (using pmap_mapdev and
pmap_unmapdev respectively) so that resources are properly managed.

This is work originally done by kan@.  Stanislav picked it up as part
of his Mediatek SoC work.

Tested:

* Carambola2, AR933x SoC

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: kan
Differential Revision: https://reviews.freebsd.org/D5184

8 years agoMigrate the other MIPS24K SoC cores to use the CPU_MIPS24K option.
Adrian Chadd [Thu, 11 Feb 2016 06:23:02 +0000 (06:23 +0000)]
Migrate the other MIPS24K SoC cores to use the CPU_MIPS24K option.

8 years agoMissing commit - remove MIPS fdt bus space.
Adrian Chadd [Thu, 11 Feb 2016 06:19:58 +0000 (06:19 +0000)]
Missing commit - remove MIPS fdt bus space.

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

8 years agoRemove bus space fdt for MIPS.
Adrian Chadd [Thu, 11 Feb 2016 06:19:32 +0000 (06:19 +0000)]
Remove bus space fdt for MIPS.

This was originall done by kan@.

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: kan
Differential Revision: https://reviews.freebsd.org/D5184

8 years agoConvert MIPS nexus and mips_pic to BUS_PASS
Adrian Chadd [Thu, 11 Feb 2016 06:15:43 +0000 (06:15 +0000)]
Convert MIPS nexus and mips_pic to BUS_PASS

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: kan
Differential Revision: https://reviews.freebsd.org/D5196

8 years agoTeach the MIPS ticker to attach itself properly when using INTRNG.
Adrian Chadd [Thu, 11 Feb 2016 06:13:53 +0000 (06:13 +0000)]
Teach the MIPS ticker to attach itself properly when using INTRNG.

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: kan
Differential Revision: https://reviews.freebsd.org/D5183

8 years agoBegin the MIPS_INTRNG support.
Adrian Chadd [Thu, 11 Feb 2016 06:09:27 +0000 (06:09 +0000)]
Begin the MIPS_INTRNG support.

This is a prelude to intr-ng support for MIPS boards that need it -
notably the CI20 port from kan@ that's upcoming, but also work that
Stanislav is doing for the Mediatek platforms.

This is the initial platform dependent bits in include/intr.h, some
#defines for the nexus code for the intrng initialisation/runtime
bits, some changed naming (which I'll fix later to be the same, much
like what I did for ARM intr-ng) in exception.S, and the first cut
at a PIC.

Stanislav and I refactored out the common code for intrng support,
so the mips intrng definitions are quite small (sys/mips/include/intr.h.)

This is all work done by kan@, which stanislav has been cherry picking
into common code for his mediatek chipset work.

Tested:

* Carambola2 - no regressions (not intr-ng though!)

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: kan (original author)
Differential Revision: https://reviews.freebsd.org/D5182

8 years agoUpdate uefi.8 for ZFS and multi device boot support
Ed Maste [Thu, 11 Feb 2016 02:02:01 +0000 (02:02 +0000)]
Update uefi.8 for ZFS and multi device boot support

As of r294068 boot1.efi can load loader.efi from ZFS.

As of r295320 boot1.efi prefers to load loader.efi from the same device
it was loaded from.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

8 years agoDocument boot1.efi's handling of /boot.config, added in r294768
Ed Maste [Thu, 11 Feb 2016 01:30:43 +0000 (01:30 +0000)]
Document boot1.efi's handling of /boot.config, added in r294768

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

8 years agoUpdate leapsecond file in non-chroot environments.
Cy Schubert [Thu, 11 Feb 2016 01:16:57 +0000 (01:16 +0000)]
Update leapsecond file in non-chroot environments.

PR: 207095
Submitted by: madpilot
MFC after: 3 days

8 years agoExt4: fix handling of files with sparse blocks before extent's index.
Pedro F. Giffuni [Thu, 11 Feb 2016 00:34:11 +0000 (00:34 +0000)]
Ext4: fix handling of files with sparse blocks before extent's index.

This is ongoing work from Damjan Jovanovic to improve ext4 read support
with sparse files:

Keep track of the first and last block in each extent as it descends down
the extent tree, thus being able to work out that some blocks are sparse
earlier. This solves an issue on r293680.

In ext4_bmapext() start supporting the runb parameter, which appears to be
the number of adjacent blocks prior to the block being converted in the
same way that runp is the number of blocks after, speding up random access
to mmaped files.

PR: 206652

8 years agoAdd WITH_GDB src.conf(5) description
Ed Maste [Thu, 11 Feb 2016 00:30:51 +0000 (00:30 +0000)]
Add WITH_GDB src.conf(5) description

8 years agoAdd missing src.conf(5) descriptions for tool chain components
Ed Maste [Thu, 11 Feb 2016 00:14:00 +0000 (00:14 +0000)]
Add missing src.conf(5) descriptions for tool chain components

Sponsored by: The FreeBSD Foundation

8 years agoUpdate list of binutils controlled by WITHOUT_BINUTILS_BOOTSTRAP
Ed Maste [Wed, 10 Feb 2016 23:57:09 +0000 (23:57 +0000)]
Update list of binutils controlled by WITHOUT_BINUTILS_BOOTSTRAP

Tools removed from the list are now provided by the ELF Tool Chain
project and are not controlled by the WITHOUT_BINUTILS_BOOTSTRAP knob.

Sponsored by: The FreeBSD Foundation

8 years agoRemove useless checks for NULL before calling free(9), in the kernel
Konstantin Belousov [Wed, 10 Feb 2016 21:35:00 +0000 (21:35 +0000)]
Remove useless checks for NULL before calling free(9), in the kernel
elf linkers.

Found by: Related PVS-Studio diagnostic
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoFinish r173600. There is no need to test a condition if both cases
Konstantin Belousov [Wed, 10 Feb 2016 21:16:37 +0000 (21:16 +0000)]
Finish r173600.  There is no need to test a condition if both cases
result in the same value.

Found by: PVS-Studio
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agontb_hw(4): Print correct PAT name for non-WC/WB types mapped at load
Conrad Meyer [Wed, 10 Feb 2016 20:49:22 +0000 (20:49 +0000)]
ntb_hw(4): Print correct PAT name for non-WC/WB types mapped at load

Sponsored by: EMC / Isilon Storage Division

8 years agontb_hw(4): Allow any x86 PAT caching flags for MW defaults
Conrad Meyer [Wed, 10 Feb 2016 20:28:28 +0000 (20:28 +0000)]
ntb_hw(4): Allow any x86 PAT caching flags for MW defaults

Replace the hw.ntb.enable_writecombine tunable with
hw.ntb.default_mw_pat.  It can be set with several specific numerical
values to select a caching type.  Any bogus value is treated as
Uncacheable (UC).

The ntb_mw_set_wc() KPI has removed the restriction that the selected
mode must be one of UC, WC, or WB.

Sponsored by: EMC / Isilon Storage Division

8 years agoImport ELF Tool Chain snapshot revision 3395
Ed Maste [Wed, 10 Feb 2016 19:39:36 +0000 (19:39 +0000)]
Import ELF Tool Chain snapshot revision 3395

This is close to the upcoming 0.7.1 release.

From http://svn.code.sf.net/p/elftoolchain/code

8 years agoAdd a kern.icl.drivers sysctl, to retrieve the list of registered
Edward Tomasz Napierala [Wed, 10 Feb 2016 19:01:26 +0000 (19:01 +0000)]
Add a kern.icl.drivers sysctl, to retrieve the list of registered
ICL drivers.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoGarbage collect unused arguments of m_init().
Gleb Smirnoff [Wed, 10 Feb 2016 18:54:18 +0000 (18:54 +0000)]
Garbage collect unused arguments of m_init().

8 years agoGarbage collect m_getclr().
Gleb Smirnoff [Wed, 10 Feb 2016 18:36:51 +0000 (18:36 +0000)]
Garbage collect m_getclr().

8 years agoSimilar to r295116, add an additional 1 second sleep after calling ggatel
Enji Cooper [Wed, 10 Feb 2016 17:57:24 +0000 (17:57 +0000)]
Similar to r295116, add an additional 1 second sleep after calling ggatel
before calling dd to defeat a race when writing out to the geom_gate(4)
device

MFC after: 1 month
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove stray semicolons from the iSCSI code.
Edward Tomasz Napierala [Wed, 10 Feb 2016 17:55:39 +0000 (17:55 +0000)]
Remove stray semicolons from the iSCSI code.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoExplicitly include <sys/systm.h>. Previously we were pulling it in due to
Andrew Turner [Wed, 10 Feb 2016 16:49:20 +0000 (16:49 +0000)]
Explicitly include <sys/systm.h>. Previously we were pulling it in due to
header pollution.

8 years agoFix a logic inversion when checking for ARM_INTRNG
Andrew Turner [Wed, 10 Feb 2016 16:44:20 +0000 (16:44 +0000)]
Fix a logic inversion when checking for ARM_INTRNG

Pointy hat to: andrew

8 years agoOnly use fdt_pic_table when not using ARM_INTRNG
Andrew Turner [Wed, 10 Feb 2016 16:39:02 +0000 (16:39 +0000)]
Only use fdt_pic_table when not using ARM_INTRNG

8 years agoAdd new rc.conf parameter "jail_reverse_stop"
Mark Felder [Wed, 10 Feb 2016 16:13:59 +0000 (16:13 +0000)]
Add new rc.conf parameter "jail_reverse_stop"

When a user defines "jail_list" in rc.conf the jails are started in the
order defined. Currently the jails are not are stopped in reverse order
which may break dependencies between jails/services and prevent a clean
shutdown. The new parameter "jail_reverse_stop" will shutdown jails in
"jail_list" in reverse order when set to "YES".

Please note that this does not affect manual invocation of the jail rc
script. If a user runs the command

  # service jail stop jail1 jail2 jail3

the jails will be stopped in exactly the order specified regardless of
jail_reverse_stop being defined in rc.conf.

PR: 196152
Approved by: jamie
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D5233

8 years agoUse OF_getencprop to read a property, it already handles the endian
Andrew Turner [Wed, 10 Feb 2016 15:56:52 +0000 (15:56 +0000)]
Use OF_getencprop to read a property, it already handles the endian
conversion so we don't need to pass the data through fdt32_to_cpu.

8 years agoRemove man page references to rndassociates.com, which has been taken over
Jamie Gritton [Wed, 10 Feb 2016 14:48:49 +0000 (14:48 +0000)]
Remove man page references to rndassociates.com, which has been taken over
by a domain squatter.

8 years agosfxge: implement SIOCGI2C to read information from phy modules
Andrew Rybchenko [Wed, 10 Feb 2016 12:14:56 +0000 (12:14 +0000)]
sfxge: implement SIOCGI2C to read information from phy modules

The IOCTL is used by 'ifconfig -v' to show SFP+/QSFP+ information
including inventory information and dianostics (temperature, light
levels, voltage etc).

Reviewed by:    gnn,melifaro
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D5240

8 years agoRevert an arm64 change that sneaked in with r295464.
Andrew Turner [Wed, 10 Feb 2016 10:28:33 +0000 (10:28 +0000)]
Revert an arm64 change that sneaked in with r295464.

8 years agoRemove O_SYNC from the options passed to dbmopen().
Stefan Eßer [Wed, 10 Feb 2016 09:40:45 +0000 (09:40 +0000)]
Remove O_SYNC from the options passed to dbmopen().

The services db is created as a temporary file that is moved over the
existing file after completion. Thus there is no need to immediately
flush all created db records to the temporary file.

This speeds up creation of the services db by a factor of 500 on my
ZFS based /var/db filesytem (from 110 seconds to 0.235 seconds).

MFC after: 1 week

8 years agoUpdate of the Allwinner drivers to:
Andrew Turner [Wed, 10 Feb 2016 09:19:29 +0000 (09:19 +0000)]
Update of the Allwinner drivers to:
 * Use the Linux compat string
 * Use EARLY_DRIVER_MODULE to attach at the right time
 * Add a generic A10 kernel config file
 * A20 now use generic_timer
 * Add two new dts files for Olimex boards
 * Update our custom DTS file for A10 and A20 to use the same compatible
   property names as the vendor ones.

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

8 years agoCorrect PCI device description.
Hans Petter Selasky [Wed, 10 Feb 2016 08:03:10 +0000 (08:03 +0000)]
Correct PCI device description.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

8 years agoAdd `stats' command to get ng_bridge(4) stats
Devin Teske [Wed, 10 Feb 2016 04:56:38 +0000 (04:56 +0000)]
Add `stats' command to get ng_bridge(4) stats

8 years agoBreak out the shared bits of the arm intrng definitions into sys/intr.h;
Adrian Chadd [Wed, 10 Feb 2016 04:43:08 +0000 (04:43 +0000)]
Break out the shared bits of the arm intrng definitions into sys/intr.h;
leave the machine dependent bits in sys/arm/.

This is in preparation for MIPS INTRNG work.

Submitted by: Stanislav Galabov <sgalabov@gmail.com>

8 years agoAdd vnet jail configuration examples
Devin Teske [Wed, 10 Feb 2016 04:04:31 +0000 (04:04 +0000)]
Add vnet jail configuration examples

8 years agoFix make universe when running with non POSIX/C locales using a locale sensitive
Baptiste Daroussin [Wed, 10 Feb 2016 00:26:01 +0000 (00:26 +0000)]
Fix make universe when running with non POSIX/C locales using a locale sensitive
pattern

Reported by: many
Submitted by: jilles

8 years agoZero pf rule counters so daily reports make sense
Kurt Lidl [Tue, 9 Feb 2016 21:00:38 +0000 (21:00 +0000)]
Zero pf rule counters so daily reports make sense

Zero pf rule counters so that each daily report lists an absolute
number of rejected packets, not the total since the last time the
machine rebooted (or the counters were manually cleared).

PR: 206467
Submitted by: Rick Adams
Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D5172

8 years agoInclude sys/_task.h into uma_int.h, so that taskqueue.h isn't a
Gleb Smirnoff [Tue, 9 Feb 2016 20:22:35 +0000 (20:22 +0000)]
Include sys/_task.h into uma_int.h, so that taskqueue.h isn't a
requirement for uma_int.h.

Suggested by: jhb