]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agohyperv/hn: Recover half of the chimney sending space
Sepherosa Ziehau [Fri, 5 Feb 2016 05:31:31 +0000 (05:31 +0000)]
hyperv/hn: Recover half of the chimney sending space

We lost half of the chimney sending space, because we mis-used
ffs() on a 64 bits mask, where ffsl() should be used.

While I'm here:
- Use system atomic operation instead.
- Stringent chimney sending index assertion.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5159

8 years agohyperv/hn: Factor out hn_encap() from hn_start_locked()
Sepherosa Ziehau [Fri, 5 Feb 2016 05:25:11 +0000 (05:25 +0000)]
hyperv/hn: Factor out hn_encap() from hn_start_locked()

It will be shared w/ upcoming ifnet.if_transmit implementaion.

No functional changes.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5158

8 years agohyperv/hn: Obey IFCAP_RXCSUM configure
Sepherosa Ziehau [Fri, 5 Feb 2016 05:17:48 +0000 (05:17 +0000)]
hyperv/hn: Obey IFCAP_RXCSUM configure

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5104

8 years agohyperv/hn: Add sysctls to trust host side UDP and IP csum verification
Sepherosa Ziehau [Fri, 5 Feb 2016 05:12:30 +0000 (05:12 +0000)]
hyperv/hn: Add sysctls to trust host side UDP and IP csum verification

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5103

8 years agohyperv/hn: Enable UDP RXCSUM
Sepherosa Ziehau [Fri, 5 Feb 2016 05:06:14 +0000 (05:06 +0000)]
hyperv/hn: Enable UDP RXCSUM

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5102

8 years agohyperv/hn: Enable IP header checksum offloading
Sepherosa Ziehau [Fri, 5 Feb 2016 05:01:02 +0000 (05:01 +0000)]
hyperv/hn: Enable IP header checksum offloading

So that:
- TCP/IP stack will not do unnecessary IP header checksum for TSO
  packets.
- Reduce guest load for non-TSO IP packets.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5099

8 years agohyperv/hn: Reorganize TX csum offloading
Sepherosa Ziehau [Fri, 5 Feb 2016 04:10:04 +0000 (04:10 +0000)]
hyperv/hn: Reorganize TX csum offloading

- For non-TSO offloading, we don't need to access mbuf to know
  which csum offloading is requested, we can just use the
  CSUM_{IP,TCP,UDP} in the csum_flags.
- For TSO offloading, we still can depend on CSUM_{TSO4,TSO6}
  in the csum_flags to tell whether the TSO packet is an IPv4
  TSO packet or an IPv6 TSO packet.

This streamlines csum offloading handling (remove the two goto)
and allows us the nuke the unnecessary get_transport_proto_type().

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5098

8 years agohyperv/hn: Avoid duplicate csum features settings
Sepherosa Ziehau [Fri, 5 Feb 2016 04:03:50 +0000 (04:03 +0000)]
hyperv/hn: Avoid duplicate csum features settings

- Record csum features in softc, so we don't need to duplicate the
  logic from attach path to ioctl path.
- Protect if_capenable and if_hwassist changes by main lock.
- Prefer turn on/off bits in if_hwassist explicitly instead of using
  XOR.

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5085

8 years agohyperv/stor: Fix the NULL pointer dereference
Sepherosa Ziehau [Fri, 5 Feb 2016 03:46:53 +0000 (03:46 +0000)]
hyperv/stor: Fix the NULL pointer dereference

Reported by: Netapp
Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: adrian, sephe, Dexuan Cui <decui microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5097

8 years agoAdd sysctls for dumping out the device mapping tables. I'm finding this
Scott Long [Thu, 4 Feb 2016 23:38:55 +0000 (23:38 +0000)]
Add sysctls for dumping out the device mapping tables.  I'm finding this
useful for debugging device-target translation bugs.

MFC after: 3 days
Sponsored by: Netflix

8 years agoProvide a workaround for setting the correct endianness when doing CFI on
Adrian Chadd [Thu, 4 Feb 2016 22:39:27 +0000 (22:39 +0000)]
Provide a workaround for setting the correct endianness when doing CFI on
a mips big-endian board.

This is (hopefully! ish!) a temporary change until a slightly better way
can be found to express this without a config option.

Tested:

* BUFFALO WZR-HP-G300NH 1stGen (by submitter)

Submitted by: Mori Hiroki <yamori813@yahoo.co.jp>

8 years agoSummary: Update the date
George V. Neville-Neil [Thu, 4 Feb 2016 21:46:37 +0000 (21:46 +0000)]
Summary: Update the date

8 years agoSummary: Remove discussion of fastforwarding.
George V. Neville-Neil [Thu, 4 Feb 2016 21:39:58 +0000 (21:39 +0000)]
Summary: Remove discussion of fastforwarding.

8 years agoWhen matching brand to the ELF binary by notes, try to find a brand
Konstantin Belousov [Thu, 4 Feb 2016 20:55:49 +0000 (20:55 +0000)]
When matching brand to the ELF binary by notes, try to find a brand
with interpreter name exactly matching one wanted by the binary.  If
no such brand exists, return first brand which accepted the binary by
note.

The change fixes a regression after r292749, where e.g. our two ia32
compat brands, ia32_brand_info and ia32_brand_oinfo, only differ by
the interpeter path and binary matches to a brand by linkage order.
Then old binaries which require /usr/libexec/ld-elf.so.1 but matched
against ia32_brand_info with interp_path /libexec/ld-elf.so.1, were
considered requiring non-standard interpreter name, and magic to force
ld-elf32.so.1 did not happen.

Note that it might make sense to apply the same selection of brands
for other matching criteria, SCO EI_OSABI and 3.x string.

Reported and tested by: dwmalone
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

8 years agoAdd defines for WRITE_UNCORRECTABLE ATA command, and improve command logging
Ravi Pokala [Thu, 4 Feb 2016 19:53:54 +0000 (19:53 +0000)]
Add defines for WRITE_UNCORRECTABLE ATA command, and improve command logging

Add #defines for ATA_WRITE_UNCORRECTABLE48 and its features. Update the
decoding in ATACAM to recognize the new values. Also improve command
decoding for a few other commands (SMART, NOP, SET_FEATURES). Bring the
decoding in ata(4) up to parity with ATACAM.

Reviewed by: mav, imp
MFC after: 1 month
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D5181

8 years agoIn FreeBSD 10 and higher the driver announces SCTP checksum offloading support
Michael Tuexen [Thu, 4 Feb 2016 18:08:50 +0000 (18:08 +0000)]
In FreeBSD 10 and higher the driver announces SCTP checksum offloading support
also for 82598, which doesn't support it.
The legacy code has a check for it, which was missed when the code for dealing with
CSUM_IP6_* was added. Add the same check for FreeBSD 10 and higher.

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

8 years ago- connect(2) Clarify namelen
Jason Helfman [Thu, 4 Feb 2016 18:03:06 +0000 (18:03 +0000)]
- connect(2) Clarify namelen

PR: 206838
Submitted by: t@tobik.me
Approved by: bcr (mentor)
MFH: after 1 week
Differential Revision: https://reviews.freebsd.org/D5194

8 years agoFix build of powerpc FPU emulator after changes in r295132 to restore the
John Baldwin [Thu, 4 Feb 2016 17:43:56 +0000 (17:43 +0000)]
Fix build of powerpc FPU emulator after changes in r295132 to restore the
ABI of struct fpreg.  The FPU emulator operates on the "raw" FPU state
stored in the pcb rather than the "cooked" fpreg state used for ptrace()
and cores.

Reported by: bz

8 years agoEnable checking of the stack alignment. The stack should be aligned to a
Andrew Turner [Thu, 4 Feb 2016 17:22:15 +0000 (17:22 +0000)]
Enable checking of the stack alignment. The stack should be aligned to a
16-byte value. With this the hardware will check if a memory access uses
an incorrectly aligned stack pointer as the base address.

Sponsored by: ABT Systems Ltd

8 years agoFix grammar in error statement
Devin Teske [Thu, 4 Feb 2016 17:09:43 +0000 (17:09 +0000)]
Fix grammar in error statement

s/consider to migrate to jail.conf/consider migrating to jail.conf/

8 years agoReplace broken implementation of fuswintr() and suswintr() by functions
Michal Meloun [Thu, 4 Feb 2016 17:01:38 +0000 (17:01 +0000)]
Replace broken implementation of fuswintr() and suswintr() by functions
which return -1 as well as on tier 1 archs. Remove block_userspace_access
used only in these implementations.

(1) These functions may be called in interrupt context and pcb_onfault
can be already set in this time. Thus, prior pcb_onfault must be saved
and restored afterwards.

(2) The check that an abort came either from nested interrupt or while
in critical section or holding not sleepable lock must be avoided for
this case.

These functions are called only for profiling reason, so there will be
only small gain by making the code more complex.

8 years agoDo not copy by field when converting struct oexport_args to struct
Konstantin Belousov [Thu, 4 Feb 2016 16:32:21 +0000 (16:32 +0000)]
Do not copy by field when converting struct oexport_args to struct
export_args on mount update, bzero() is consistent with
vfs_oexport_conv().
Make the code structure more explicit by using switch.
Return EINVAL if export option layout (deduced from size) is unknown.

Based on the submission by: bde
Sponsored by: The FreeBSD Foundation

8 years agoAdd 't' and 'p' postfixes to dd(1).
Edward Tomasz Napierala [Thu, 4 Feb 2016 15:21:01 +0000 (15:21 +0000)]
Add 't' and 'p' postfixes to dd(1).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoReduce code duplication.
Edward Tomasz Napierala [Thu, 4 Feb 2016 15:10:08 +0000 (15:10 +0000)]
Reduce code duplication.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoARM: For ARMv6/v7, code in locore.S initializes SCTLR and ACTRL registers.
Michal Meloun [Thu, 4 Feb 2016 14:32:48 +0000 (14:32 +0000)]
ARM: For ARMv6/v7, code in locore.S initializes SCTLR and ACTRL registers.
Don't duplicate this initialization in cpu_setup().

8 years agoAccess pcpup using gp register.
Ruslan Bukin [Thu, 4 Feb 2016 14:30:46 +0000 (14:30 +0000)]
Access pcpup using gp register.

8 years agoMake VM_MEMATTR_xxx definitions independent on pmap internals
Svatopluk Kraus [Thu, 4 Feb 2016 14:15:24 +0000 (14:15 +0000)]
Make VM_MEMATTR_xxx definitions independent on pmap internals
for __ARM_ARCH >= 6.

It's TEX class number now, so it still has some meaning.

8 years agoARM: Set UNAL_ENABLE bit in SCTLR CP15 register. This bit is RAO/SBOP
Michal Meloun [Thu, 4 Feb 2016 14:02:42 +0000 (14:02 +0000)]
ARM: Set UNAL_ENABLE bit in SCTLR CP15 register. This bit is RAO/SBOP
for ARMv7. For ARMv6, it controls ARMv5 compatible alignment support.
This bit have no effect until unaligned access is enabled.

8 years agoSmall rearrangement of abort_handler().
Svatopluk Kraus [Thu, 4 Feb 2016 13:35:40 +0000 (13:35 +0000)]
Small rearrangement of abort_handler().

(1) Move cnt.v_trap increment to the beginning. There is cnt.v_vm_faults
counter in vm_fault(), so a number of hardware emulation aborts may be
get roughly as difference.
(2) Move kdb_reenter() up to not be ignored if pmap_fault() has failed.
(3) Update comments.

8 years agoARM: RPI-B kernel was broken by r294740. Make it functional again.
Michal Meloun [Thu, 4 Feb 2016 13:32:29 +0000 (13:32 +0000)]
ARM: RPI-B kernel was broken by r294740. Make it functional again.

8 years agoReuse gp register for pcpu pointer.
Ruslan Bukin [Thu, 4 Feb 2016 12:49:28 +0000 (12:49 +0000)]
Reuse gp register for pcpu pointer.

gp (global pointer) is used by compiler in userland only,
so re-use it for pcpup in kernel, save it on stack on switching
out to userland and load back on return to kernel.

Discussed with: jhb, andrew, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5178

8 years agoARM: Don't use ugly (and hidden) global variable, control register is
Michal Meloun [Thu, 4 Feb 2016 12:11:18 +0000 (12:11 +0000)]
ARM: Don't use ugly (and hidden) global variable, control register is
readable at any time.

8 years agoFix build.
Ruslan Bukin [Thu, 4 Feb 2016 12:06:06 +0000 (12:06 +0000)]
Fix build.

8 years agoFix build.
Ruslan Bukin [Thu, 4 Feb 2016 11:52:53 +0000 (11:52 +0000)]
Fix build.

8 years agoGuard against runnable td2 exiting and than being reused for unrelated
Konstantin Belousov [Thu, 4 Feb 2016 10:49:34 +0000 (10:49 +0000)]
Guard against runnable td2 exiting and than being reused for unrelated
process when the parent sleeps waiting for the debugger attach on
fork.

Diagnosed and reviewed by: mjg
Sponsored by: The FreeBSD Foundation

8 years agoARM: Remove unused symbols from genassym.c.
Michal Meloun [Thu, 4 Feb 2016 06:39:20 +0000 (06:39 +0000)]
ARM: Remove unused symbols from genassym.c.

8 years agoMake sure to enable aliases for SHIFT_JIS.
Hajimu UMEMOTO [Thu, 4 Feb 2016 05:03:35 +0000 (05:03 +0000)]
Make sure to enable aliases for SHIFT_JIS.

MFC after: 3 days

8 years agofork: plug a use after free of the returned process
Mateusz Guzik [Thu, 4 Feb 2016 04:25:30 +0000 (04:25 +0000)]
fork: plug a use after free of the returned process

fork1 required its callers to pass a pointer to struct proc * which would
be set to the new process (if any). procdesc and racct manipulation also
used said pointer.

However, the process could have exited prior to do_fork return and be
automatically reaped, thus making this a use-after-free.

Fix the problem by letting callers indicate whether they want the pid or
the struct proc, return the process in stopped state for the latter case.

Reviewed by: kib

8 years agofork: pass arguments to fork1 in a dedicated structure
Mateusz Guzik [Thu, 4 Feb 2016 04:22:18 +0000 (04:22 +0000)]
fork: pass arguments to fork1 in a dedicated structure

Suggested by: kib

8 years agoFix build.
Gleb Smirnoff [Thu, 4 Feb 2016 03:55:41 +0000 (03:55 +0000)]
Fix build.

8 years agoFix style and remove excess / for installing SYMLINKS.
Bryan Drewery [Thu, 4 Feb 2016 01:08:51 +0000 (01:08 +0000)]
Fix style and remove excess / for installing SYMLINKS.

Sponsored by: EMC / Isilon Storage Division

8 years agoMLINKS: Deduplicate some of the logic, simplify, and unhide install commands.
Bryan Drewery [Thu, 4 Feb 2016 01:08:48 +0000 (01:08 +0000)]
MLINKS: Deduplicate some of the logic, simplify, and unhide install commands.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix cat files being installed to wrong place since r284685.
Bryan Drewery [Thu, 4 Feb 2016 01:08:45 +0000 (01:08 +0000)]
Fix cat files being installed to wrong place since r284685.

Sponsored by: EMC / Isilon Storage Division

8 years agoStop hiding link install commands.
Bryan Drewery [Thu, 4 Feb 2016 01:08:42 +0000 (01:08 +0000)]
Stop hiding link install commands.

This is no longer needed now that a .for loop is used rather
than inline shell script.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix build.
Gleb Smirnoff [Thu, 4 Feb 2016 00:23:21 +0000 (00:23 +0000)]
Fix build.

8 years agoDon't link /usr/share/nls/de_DE.UTF-8/tcsh.cat to itself.
Bryan Drewery [Wed, 3 Feb 2016 23:37:24 +0000 (23:37 +0000)]
Don't link /usr/share/nls/de_DE.UTF-8/tcsh.cat to itself.

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't let NLSLINKS contain itself.
Bryan Drewery [Wed, 3 Feb 2016 23:37:14 +0000 (23:37 +0000)]
Don't let NLSLINKS contain itself.

Sponsored by: EMC / Isilon Storage Division

8 years agoRedo r292484. Embed task(9) into zone, so that uz_maxaction is called
Gleb Smirnoff [Wed, 3 Feb 2016 23:30:17 +0000 (23:30 +0000)]
Redo r292484. Embed task(9) into zone, so that uz_maxaction is called
in a context that can sleep, allowing consumers of the KPI to run their
drain routines without any extra measures.

Discussed with: jtl

8 years agoMove uma_dbg_alloc() and uma_dbg_free() into uma_core.c, which allows
Gleb Smirnoff [Wed, 3 Feb 2016 22:02:36 +0000 (22:02 +0000)]
Move uma_dbg_alloc() and uma_dbg_free() into uma_core.c, which allows
to make uma_dbg.h not depend on uma_int.h, which allows to uninclude
uma_int.h from the mbuf(9) allocator.

8 years agoFix inverse logic. If this is zone_pack, then we shouldn't free the
Gleb Smirnoff [Wed, 3 Feb 2016 20:39:52 +0000 (20:39 +0000)]
Fix inverse logic. If this is zone_pack, then we shouldn't free the
cluster ourselves.

Found by review. Since this code is !386 and !amd64 and is executed
on error path, pretty sure no one ever executed it.

8 years agoDeduplicate distrib-dirs logic from r289086 in distribution.
Bryan Drewery [Wed, 3 Feb 2016 20:24:21 +0000 (20:24 +0000)]
Deduplicate distrib-dirs logic from r289086 in distribution.

This does it correctly this time, rather than the incorrect version in
r295167.

Sponsored by: EMC / Isilon Storage Division

8 years agoHandle a misaligned stack pointer exception from userspace. The exception
Andrew Turner [Wed, 3 Feb 2016 17:00:19 +0000 (17:00 +0000)]
Handle a misaligned stack pointer exception from userspace. The exception
still needs to be enabled, but this will help with testing.

Sponsored by: ABT Systems Ltd

8 years agoARM: Consistently use cpu_setttb() instead of setttb().
Michal Meloun [Wed, 3 Feb 2016 16:44:06 +0000 (16:44 +0000)]
ARM: Consistently use cpu_setttb() instead of setttb().
Remove unused #define for drain_writebuf.

8 years agoAdd an additional, libucl-based configuration file parser to ctld.
Jakub Wojciech Klama [Wed, 3 Feb 2016 15:45:13 +0000 (15:45 +0000)]
Add an additional, libucl-based configuration file parser to ctld.

Default ctld behavior remains unchanged - libucl parser can be selected
explicitly by adding -u switch to ctld command line.

Reviewed by: trasz
Approved by: trasz (mentor)
MFC after: 1 month
Relnotes: yes
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D4534

8 years agoStill open the network interface when EFI_OPEN_PROTOCOL_EXCLUSIVE failed.
Andrew Turner [Wed, 3 Feb 2016 14:34:25 +0000 (14:34 +0000)]
Still open the network interface when EFI_OPEN_PROTOCOL_EXCLUSIVE failed.
Not all UEFI implementations support this protocol.

8 years agoRevert r294695:
Pedro F. Giffuni [Wed, 3 Feb 2016 14:31:23 +0000 (14:31 +0000)]
Revert r294695:
ext2fs: passthrough any extra timestamps to the dinode struct.

While it passed the classic testing, the change appears to have
caused some regression and still requires some more precautions.

PR: 206820
MFC after: 3 days

8 years agoARM: Replace only once used cpu_icache_sync_all() by ranged equivalent.
Michal Meloun [Wed, 3 Feb 2016 13:47:50 +0000 (13:47 +0000)]
ARM: Replace only once used cpu_icache_sync_all() by ranged equivalent.
Remove it from cpu_functions table.

8 years agoPartly revert r295168 and define PTE_DEVICE in pmap-v6.h header again.
Svatopluk Kraus [Wed, 3 Feb 2016 12:11:07 +0000 (12:11 +0000)]
Partly revert r295168 and define PTE_DEVICE in pmap-v6.h header again.
It turned out that devmap.c is not only file in which PTE_DEVICE
is used and simultaneously, built for both armv4 and armv6 platforms.

When I tried to build all arm kernels before r295168 commit, it was
hid by some other local changes in my tree. I hope that this is just
temporary workaround before VM_MEMATTR_DEVICE could be used instead of
PTE_DEVICE outside of pmap code for __ARM_ARCH < 6.

8 years agoThe charset of NLS catalogs were converted to UTF-8
Hajimu UMEMOTO [Wed, 3 Feb 2016 11:44:43 +0000 (11:44 +0000)]
The charset of NLS catalogs were converted to UTF-8
since r231990.

8 years agoTry to fix a bug introduced in r228623. We started to copy the ifa_msghdr
Bjoern A. Zeeb [Wed, 3 Feb 2016 11:03:44 +0000 (11:03 +0000)]
Try to fix a bug introduced in r228623.  We started to copy the ifa_msghdr
as otherwise platforms with strict alignment would break.  It's unclear
to me if there's also a problem with access to the address list following
the structure.  However we never copied the address list after the structure
and thus are pointing at random memory.  For now just use a pointer to the
original memory for accessing the address list making it at least work on
platforms with weak memory access.

PR: 195445
Reported by: wolfgang lyxys.ka.sub.org
Tested by: wolfgang lyxys.ka.sub.org (x86)
MFC after: 3 days

8 years agoARM: Remove C++ comments erroneously committed in r295200.
Michal Meloun [Wed, 3 Feb 2016 10:39:29 +0000 (10:39 +0000)]
ARM: Remove C++ comments erroneously committed  in r295200.

8 years agoARM: Remove support for xscale i80219 and i80321 CPUs. We haven't single
Michal Meloun [Wed, 3 Feb 2016 09:15:44 +0000 (09:15 +0000)]
ARM: Remove support for xscale i80219 and i80321 CPUs. We haven't single
supported config/board with these CPUs.

8 years agoARM: The arm/xscale/i80321 directory is now orphaned, but two drivers
Michal Meloun [Wed, 3 Feb 2016 08:59:12 +0000 (08:59 +0000)]
ARM: The arm/xscale/i80321 directory is now orphaned, but two drivers
are shared with i8134x. In preparation for removal of i80321, copy these
drivers to i8134x.

8 years agoARM: acle-compat.h is arm specific header, don't include it for aarch64. This
Michal Meloun [Wed, 3 Feb 2016 08:12:21 +0000 (08:12 +0000)]
ARM: acle-compat.h is arm specific header, don't include it for aarch64. This
fixes aarch64 buildkernel.

8 years agof_substr(): Optimized recipe if running under bash
Devin Teske [Wed, 3 Feb 2016 04:02:50 +0000 (04:02 +0000)]
f_substr(): Optimized recipe if running under bash

This makes runnig f_substr() faster than it was when running under bash,
but both sh and dash are still faster when using the non-bash recipe which
features dynamically unrolled loops.

8 years agoRemove SIG prefix from trapped signals
Devin Teske [Wed, 3 Feb 2016 03:55:08 +0000 (03:55 +0000)]
Remove SIG prefix from trapped signals

Makes traps functional if running under shells/dash

8 years agof_substr: Write to stdout when no `-v var_to_set'
Devin Teske [Wed, 3 Feb 2016 03:03:04 +0000 (03:03 +0000)]
f_substr: Write to stdout when no `-v var_to_set'

Fixes ``setvar: : bad variable name''

8 years agoRemove trailing whitespace
Devin Teske [Wed, 3 Feb 2016 02:46:00 +0000 (02:46 +0000)]
Remove trailing whitespace

8 years agoAlign signal stack pointer to 16 bytes.
Justin Hibbits [Wed, 3 Feb 2016 01:50:27 +0000 (01:50 +0000)]
Align signal stack pointer to 16 bytes.

The stack must be aligned to 16 bytes at all times.  Clang 3.8 is especially
adamant about this, and causes strange behavior and segmentation faults if it is
not the case.

PR: kern/206810

8 years agoRevert r295167 at bdrewery's request
Conrad Meyer [Wed, 3 Feb 2016 01:40:07 +0000 (01:40 +0000)]
Revert r295167 at bdrewery's request

$ svn merge -c -295167 .

JHB reports Navdeep reports that it breaks distribution and etcupdate.

Approved by: bdrewery

8 years agoMake lbc(4) the same driver pass as simplebus.
Justin Hibbits [Wed, 3 Feb 2016 01:29:06 +0000 (01:29 +0000)]
Make lbc(4) the same driver pass as simplebus.

Device trees mark lbc as compatible with simplebus.  Since simplebus is passed
first, it attaches first.  When lbc's pass (default pass) comes, the bus is
already attached to simplebus, so is skipped.

Sponsored by: Alex Perez/Inertial Computing

8 years agoDefine f_sprintf() dynamically at inclusion time
Devin Teske [Wed, 3 Feb 2016 00:51:38 +0000 (00:51 +0000)]
Define f_sprintf() dynamically at inclusion time

No need to check/re-check capabilities that won't change at runtime.

8 years agoRevert r295169 and switch `\ ' to `" "'
Devin Teske [Tue, 2 Feb 2016 23:54:07 +0000 (23:54 +0000)]
Revert r295169 and switch `\ ' to `" "'

MFC after: 3 days
X-MFC-to: stable/10
X-MFC-with: r295169, r295170, r295173, r295177

8 years agoFix a typo in a comment
Devin Teske [Tue, 2 Feb 2016 23:51:39 +0000 (23:51 +0000)]
Fix a typo in a comment

8 years agoMove logic to destroy a struct catentry to its own function.
Bryan Drewery [Tue, 2 Feb 2016 23:33:58 +0000 (23:33 +0000)]
Move logic to destroy a struct catentry to its own function.

This will be used later for memory leak handling.

Obtained from: OneFS
Sponsored by: EMC / Isilon Storage Division

8 years ago- Note that devctl(8) will appear in 10.3 first.
John Baldwin [Tue, 2 Feb 2016 22:55:03 +0000 (22:55 +0000)]
- Note that devctl(8) will appear in 10.3 first.
- Add missing devctl_set_driver entry to namelist in devlist(3).
- Fix sorting of function prototypes in devlist(3).

MFC after: 3 days

8 years agoBump version to 7.1 for +=/-= fix
Devin Teske [Tue, 2 Feb 2016 22:34:48 +0000 (22:34 +0000)]
Bump version to 7.1 for +=/-= fix

MFC after: 3 days
X-MFC-to: stable/10
X-MFC-with: r295169, r295170

8 years agoFor +=/-=, add . and / to convenience characters
Devin Teske [Tue, 2 Feb 2016 22:18:43 +0000 (22:18 +0000)]
For +=/-=, add . and / to convenience characters

sysrc(8) supports key+=value and key-=value, but can be told what the
delimiter is by being passed as char1 (e.g., "sysrc key+=",value" to use a
comma as the delimiter instead of space). For convenience, if the first char
is alpha-numeric, it is assumed you wanted whitespace as the delimiter.

However, if you naively (as I just did) execute:
sysrc rc_conf_files+=/etc/rc.conf.other
the result is unexpected.

This commit makes `.' and `/' in-addition to alpha-numeric first-characters
to cause the default of whitespace to be used as the delimiter. This also
means that you can no longer use these as a delimiter.

8 years agoReplace (Qo \ Qc) with (Qo (space) Qc)
Devin Teske [Tue, 2 Feb 2016 21:58:17 +0000 (21:58 +0000)]
Replace (Qo \  Qc) with (Qo (space) Qc)

When using col(1) piped to vim(1) as pager for man(1), the former sequence
of (Qo \  Qc) renders as "" without the space. Replace with (Qo (space) Qc)
which renders properly in more (all?) pagers.

8 years agoUse pmap_preboot_map_attr() directly in arm_devmap_bootstrap()
Svatopluk Kraus [Tue, 2 Feb 2016 21:17:25 +0000 (21:17 +0000)]
Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap()
instead of hiding behind pmap_map_chunk(). It's not longer needed
after old pmap-v6 code was removed.

For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c
file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used
even for __ARM_ARCH < 6.

8 years agoDeduplicate distrib-dirs logic from r289086 in distribution.
Bryan Drewery [Tue, 2 Feb 2016 21:11:23 +0000 (21:11 +0000)]
Deduplicate distrib-dirs logic from r289086 in distribution.

Sponsored by: EMC / Isilon Storage Division

8 years agoMake pmap_preboot_map_attr() vm subsystem compliant, so its arguments
Svatopluk Kraus [Tue, 2 Feb 2016 21:10:55 +0000 (21:10 +0000)]
Make pmap_preboot_map_attr() vm subsystem compliant, so its arguments
do not depend on pmap internals. This is a preparation for hiding
internal pmap definitions as much as possible from the rest of system.

Simultaneously, the protection argument evaluation is fixed. Happily,
it did not effect the mappings. And it's the reason why it was not fixed
earlier.

8 years agoMFV r295109:
Pedro F. Giffuni [Tue, 2 Feb 2016 21:10:43 +0000 (21:10 +0000)]
MFV r295109:
Update openresolve to version 3.7.2

Relnotes: yes

8 years agoAdjust install .WAITs for lib/ and etc/ to allow parallelization more.
Bryan Drewery [Tue, 2 Feb 2016 20:50:09 +0000 (20:50 +0000)]
Adjust install .WAITs for lib/ and etc/ to allow parallelization more.

Only 'installworld' needs to be protected and only when not using
-DNO_ROOT, which implies not installing to / and not needing the
lib dependency protections.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd order for installworld/distribution.
Bryan Drewery [Tue, 2 Feb 2016 20:50:06 +0000 (20:50 +0000)]
Add order for installworld/distribution.

Sponsored by: EMC / Isilon Storage Division

8 years agoRoot out files that don't really belong here and could in fact screw
Maxim Sobolev [Tue, 2 Feb 2016 19:04:40 +0000 (19:04 +0000)]
Root out files that don't really belong here and could in fact screw
you over if you happen to use git for FreeBSD development, as it is
the case with the unbound/.gitignore, which lits files that are
actually required for the buildworld.

MFC after: 1 day

8 years agoIncrease the size of PHYS_AVAIL_SIZE to allow firmware to provide a large
Andrew Turner [Tue, 2 Feb 2016 17:59:43 +0000 (17:59 +0000)]
Increase the size of PHYS_AVAIL_SIZE to allow firmware to provide a large
number of physical memory locations we can access. This is the case on
some HiKey boards that may have UEFI reserved memory dispersed through the
physical space.

Sponsored by: ABT Systems Ltd

8 years agoEnsure we don't overflow the phys_avail array. Some firmware may provide
Andrew Turner [Tue, 2 Feb 2016 17:57:15 +0000 (17:57 +0000)]
Ensure we don't overflow the phys_avail array. Some firmware may provide
more memory locations than we have space to record.

Sponsored by: ABT Systems Ltd

8 years agoIncrease the space we use after the kernel to 8MiB. On 2GiB HiKey board we
Andrew Turner [Tue, 2 Feb 2016 16:35:37 +0000 (16:35 +0000)]
Increase the space we use after the kernel to 8MiB. On 2GiB HiKey board we
would try to access data past this point stopping the boot.

Sponsored by: ABT Systems Ltd

8 years agoOnly look for the ranges property when we have children. This fixes booting
Andrew Turner [Tue, 2 Feb 2016 16:32:44 +0000 (16:32 +0000)]
Only look for the ranges property when we have children. This fixes booting
on systems with a gicv2, but no PCIe so no gicv2m.

Sponsored by: ABT Systems Ltd

8 years agoUse MIPS24K now.
Adrian Chadd [Tue, 2 Feb 2016 16:25:53 +0000 (16:25 +0000)]
Use MIPS24K now.

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

8 years agoUse CPU_MIPS24K now in AR933x based boards.
Adrian Chadd [Tue, 2 Feb 2016 16:22:35 +0000 (16:22 +0000)]
Use CPU_MIPS24K now in AR933x based boards.

I'll flip on other boards as i test them.

Tested:

* AR9331, Carambola 2

8 years agoMove MIPS32 Release 2 and Release 3 CPUs to use the EHB instruction for
Adrian Chadd [Tue, 2 Feb 2016 16:00:42 +0000 (16:00 +0000)]
Move MIPS32 Release 2 and Release 3 CPUs to use the EHB instruction for
clearing hazards.

This revision makes currently known MIPS32 Release 2 and Release 3 CPUs use
the EHB instruction when clearing hazards. So far the MIPS 74K and MIPS1004K
 (somewhat) were already using the EHB. Now we add more r2 and r3 CPUs to
this list.

Also, for the cases of MIPS coherent processing systems (currently 1004K,
1074K, interAptiv and proAptiv) - define proper CCA attributes.

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

8 years agoARM: All remaining functions in cpufunc_asm_arm10.S are identical with
Michal Meloun [Tue, 2 Feb 2016 14:53:34 +0000 (14:53 +0000)]
ARM: All remaining functions in cpufunc_asm_arm10.S are identical with
functions in cpufunc_asm_arm9.S. Use arm9 variants and remove
cpufunc_asm_arm10.S completly.

8 years agoMake dynamic link of libiconv from ports work again.
Hajimu UMEMOTO [Tue, 2 Feb 2016 11:51:18 +0000 (11:51 +0000)]
Make dynamic link of libiconv from ports work again.
The symbols of libiconv from ports were changed to
have prefixed.
Since we have iconv in our libc these days, we don't
need it on 10.X and later.  However, 9.X still need
this.

Spotted by: Yoshihiko Sarumaru
MFC after: 1 days

8 years agoUse LIBADD instead of LDADD.
Hans Petter Selasky [Tue, 2 Feb 2016 11:36:58 +0000 (11:36 +0000)]
Use LIBADD instead of LDADD.

Sponsored by: Mellanox Technologies

8 years agoARM: Remove last unused function, cpu_flush_prefetchbuf(),
Michal Meloun [Tue, 2 Feb 2016 10:50:32 +0000 (10:50 +0000)]
ARM: Remove last unused function, cpu_flush_prefetchbuf(),
from cpu_functions table.

8 years agoAdd suppor to loader.efi to load files off hte network. For this we need
Andrew Turner [Tue, 2 Feb 2016 10:39:18 +0000 (10:39 +0000)]
Add suppor to loader.efi to load files off hte network. For this we need
to open the device in exclusive mode as, without this, the firmware may
also be reading packets off the interface leading to a race.

Reviewed by: emaste
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4132

8 years agoRemove all remaining references to old and not more used struct
Svatopluk Kraus [Tue, 2 Feb 2016 10:32:45 +0000 (10:32 +0000)]
Remove all remaining references to old and not more used struct
pmap_devmap, pmap_devmap_bootstrap() and pmap_devmap[]. It was
replaced in r257660.

8 years agoImplement single stepping on arm64. We need to set the single step bits in
Andrew Turner [Tue, 2 Feb 2016 10:28:56 +0000 (10:28 +0000)]
Implement single stepping on arm64. We need to set the single step bits in
the processor and debug state registers. A flag has been added to the pcb
to tell us when to enable single stepping for a given thread.

Reviewed by: kib
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4730