gjb [Tue, 2 Feb 2016 22:27:48 +0000 (22:27 +0000)]
MFH
Sponsored by: The FreeBSD Foundation
gjb [Tue, 2 Feb 2016 22:26:49 +0000 (22:26 +0000)]
First pass to fix the 'tests' packages.
Sponsored by: The FreeBSD Foundation
dteske [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.
dteske [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.
skra [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.
bdrewery [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
skra [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.
pfg [Tue, 2 Feb 2016 21:10:43 +0000 (21:10 +0000)]
MFV r295109:
Update openresolve to version 3.7.2
Relnotes: yes
gjb [Tue, 2 Feb 2016 21:06:09 +0000 (21:06 +0000)]
Include virecover in vi package.
Submitted by: lidl
Sponsored by: The FreeBSD Foundation
gjb [Tue, 2 Feb 2016 21:04:33 +0000 (21:04 +0000)]
Create ee(1) package.
Sponsored by: The FreeBSD Foundation
bdrewery [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
bdrewery [Tue, 2 Feb 2016 20:50:06 +0000 (20:50 +0000)]
Add order for installworld/distribution.
Sponsored by: EMC / Isilon Storage Division
sobomax [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
andrew [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
andrew [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
gjb [Tue, 2 Feb 2016 17:33:37 +0000 (17:33 +0000)]
Create a package for autofs(5)
Sponsored by: The FreeBSD Foundation
gjb [Tue, 2 Feb 2016 16:47:50 +0000 (16:47 +0000)]
Create a package for vi(1) and related files.
Sponsored by: The FreeBSD Foundation
andrew [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
andrew [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
adrian [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
adrian [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
adrian [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
mmel [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.
ume [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
hselasky [Tue, 2 Feb 2016 11:36:58 +0000 (11:36 +0000)]
Use LIBADD instead of LDADD.
Sponsored by: Mellanox Technologies
mmel [Tue, 2 Feb 2016 10:50:32 +0000 (10:50 +0000)]
ARM: Remove last unused function, cpu_flush_prefetchbuf(),
from cpu_functions table.
andrew [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
skra [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.
andrew [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
skra [Tue, 2 Feb 2016 10:17:51 +0000 (10:17 +0000)]
Fix setting of protection bits for page table entries in pmap_map(). This
function is only called from vm_page_startup() and vm_reserv_startup().
I.e. during vm subsystem initialization. As VM_PROT_WRITE is always
used in these calls, the typo did not have any effect. Likely, it's
the reason why it wasn't discovered so long.
andrew [Tue, 2 Feb 2016 10:11:56 +0000 (10:11 +0000)]
Correctly handle the case where copystr(9) is given a string longer than
the passed in length. In this case we need to return ENAMETOOLONG.
des [Tue, 2 Feb 2016 10:02:38 +0000 (10:02 +0000)]
Document our modified default value for PermitRootLogin.
adrian [Tue, 2 Feb 2016 07:47:38 +0000 (07:47 +0000)]
Rename some CPU_MIPSxxx options and add new CPU_MIPSxxx options
This revision does the following renames:
CPU_MIPS24KC -> CPU_MIPS24K
CPU_MIPS74KC -> CPU_MIPS74K
CPU_MIPS1004KC -> CPU_MIPS1004K
It also adds the following new CPU_MIPSxxx options:
CPU_MIPS24KE, CPU_MIPS34K, CPU_MIPS1074K, CPU_INTERAPTIV, CPU_PROAPTIV
CPU_MIPSxxxxKC is limiting and possibly misleading as it implies the
MIPSxxxxK CPU has no FPU.
It would be better if the CPUs are named after their standard functionalities
only and the presence or absence of FPU can then be controlled via the
CPU_HAVEFPU option.
I will send out another dependent revision that moves MIPS 32 r2 and r3
CPUs to use the EHB instruction for clearing hazards instead of NOP/SSNOP.
Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D5077
adrian [Tue, 2 Feb 2016 07:02:51 +0000 (07:02 +0000)]
Fix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specified
MD_ROOT_SIZE and embed_mfs.sh were basically retired as part of
https://reviews.freebsd.org/D2903 .
However, when building a kernel with 'options MD_ROOT_SIZE' specified, this
results in a non-working MFS, as within sys/dev/md/md.c we fall within the
wrong # ifdef.
This patch implements the following:
* Allow kernels to be built without the MD_ROOT_SIZE option, which results
in a kernel built as per D2903.
* Allow kernels to be built with the MD_ROOT_SIZE option, which results
in a kernel built similarly to the pre-D2903 way, with the following
differences:
* The MFS is now put in a separate section within the kernel (oldmfs,
so it differs from the mfs section introduced by D2903).
* embed_mfs.sh is changed, so it looks up the oldmfs section within the
kernel, gets its size and offset, sees if the MFS will fit within the
allocated oldmfs section and only if all is well does a dd of the MFS
image into the kernel.
Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: brooks, imp
Differential Revision: https://reviews.freebsd.org/D5093
alfred [Tue, 2 Feb 2016 05:57:59 +0000 (05:57 +0000)]
Increase max allowed backlog for listen sockets
from short to int.
PR: 203922
Submitted by: White Knight <white_knight@2ch.net>
MFC After: 4 weeks
cem [Tue, 2 Feb 2016 00:14:51 +0000 (00:14 +0000)]
kcrypto_aes: Use separate sessions for AES and SHA1
Some hardware supports AES acceleration but not SHA1, e.g., AES-NI
extensions. It is useful to have accelerated AES even if SHA1 must be
software.
Suggested by: asomers
Reviewed by: asomers, dfr
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5146
marius [Mon, 1 Feb 2016 23:51:30 +0000 (23:51 +0000)]
As it turns out, one of the more or less recent changes to em(4)
causes watchdog timeouts when using TSO4 at link speeds below
Gigabit, at least with 82573E. So disable the assist automatically
when at lower speeds.
Submitted by: jfv
Approved by: erj
Obtained from: D3162
MFC after: 3 days
jhb [Mon, 1 Feb 2016 23:12:04 +0000 (23:12 +0000)]
Restore the ABI of 'struct fpreg' on powerpc.
The PT_{GET,SET}FPREGS requests use 'struct fpreg' and the NT_FPREGSET
core note stores a copy of 'struct fpreg'. As with x86 and the floating
point state there compared to the extended state in XSAVE, struct fpreg
on powerpc now only holds the 'base' FP state, and setting it via
PT_SETFPREGS leaves the extended vector state in a thread unchanged.
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D5004
skra [Mon, 1 Feb 2016 19:43:04 +0000 (19:43 +0000)]
Remove all stuff related to __ARM_ARCH >= 6 from pmap.h header except
for <machine/pmap-v6.h> include. It was used by old pmap-v6 code.
skra [Mon, 1 Feb 2016 19:36:33 +0000 (19:36 +0000)]
Remove not needed <machine/pte.h> includes.
gjb [Mon, 1 Feb 2016 18:50:52 +0000 (18:50 +0000)]
Fix naming inconsistency with lib32 debug packages.
Sponsored by: The FreeBSD Foundation
glebius [Mon, 1 Feb 2016 17:41:21 +0000 (17:41 +0000)]
These files were getting sys/malloc.h and vm/uma.h with header pollution
via sys/mbuf.h
avg [Mon, 1 Feb 2016 15:40:40 +0000 (15:40 +0000)]
MFV r294821: 6529 Properly handle updates of variably-sized SA entries.
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Tim Chase <tim@chase2k.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Andriy Gapon <avg@icyb.net.ua>
illumos/illumos-gate@
e7e978b1f75353cb29673af9b35453c20c2827bf
During the update process in sa_modify_attrs(), the sizes of existing
variably-sized SA entries are obtained from sa_lengths[]. The case where
a variably-sized SA was being replaced neglected to increment the index
into sa_lengths[], so subsequent variable-length SAs would be rewritten
with the wrong length. This patch adds the missing increment operation
so all variably-sized SA entries are stored with their correct lengths.
Another problem was that index into attr_desc[] was increased even when
an attribute was removed. If that attribute was not the last attribute,
then the last attribute was lost.
mmel [Mon, 1 Feb 2016 14:28:58 +0000 (14:28 +0000)]
ARM: Rename remaining instances of cpufunc_id() to cpu_ident(),
forgotten in r295096.
Remove tlb_flushI/tlb_flushI_SE functions forgotten in r295122.
mmel [Mon, 1 Feb 2016 13:13:53 +0000 (13:13 +0000)]
ARM: Remove never used cpu_tlb_flushI and cpu_tlb_flushI_SE() functions
and their implementations.
ngie [Mon, 1 Feb 2016 08:06:17 +0000 (08:06 +0000)]
Delete argsize to fix a -Wunused-but-set-variable warning with gcc 4.9
The variable isn't actually checked -- just the end result which gets
returned from the function
Differential Revision: https://reviews.freebsd.org/D5156
Reviewed by: araujo, delphij
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 1 Feb 2016 07:15:31 +0000 (07:15 +0000)]
Remove `r_tmp` to fix a -Wunused-but-set-variable warning with gcc 4.9
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 1 Feb 2016 07:09:08 +0000 (07:09 +0000)]
Add #include <string.h> to mute warning from clang/gcc about implicitly
declaring strcmp(3)
MFC after: 1 month
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 1 Feb 2016 06:27:59 +0000 (06:27 +0000)]
Use the pidfile support added to ggated(8) in r294973 to ensure that the
ggated(8) daemon used by the tests is the instance specifically invoked by
the tests instead of one or more daemon instances running on the system
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 1 Feb 2016 06:25:16 +0000 (06:25 +0000)]
Add an additional 1 second sleep to after calling ggatec before calling
dd to defeat a race when writing out to the geom_gate(4) device
This will quell the Jenkins failure emails until I come up with a better
solution
MFC after: 1 month
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
araujo [Mon, 1 Feb 2016 02:33:58 +0000 (02:33 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.
Reviewed by: mav
Approved by: rodrigc (mentor)
MFC after: 2 weeks
Sponsored by: gandi.net
Differential Revision: https://reviews.freebsd.org/D5109
araujo [Mon, 1 Feb 2016 02:31:59 +0000 (02:31 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.
Reviewed by: mav, slm
Approved by: rodrigc (mentor)
MFC after: 2 weeks
Sponsored by: gandi.net
jhibbits [Mon, 1 Feb 2016 02:04:40 +0000 (02:04 +0000)]
Use the correct type to pmap_mapdev() in nexus_activate_resource().
pmap_mapdev() takes vm_paddr_t, which may be sized differently from vm_offset_t,
as it is in book-e.
Sponsored by: Alex Perez/Inertial Computing
dteske [Mon, 1 Feb 2016 00:54:26 +0000 (00:54 +0000)]
Utilize new `-v var_to_set' of f_snprintf()
dteske [Sun, 31 Jan 2016 21:34:25 +0000 (21:34 +0000)]
Move awk(1)-dependent recipes to the bottom
dteske [Sun, 31 Jan 2016 21:33:24 +0000 (21:33 +0000)]
Move f_isinteger() to the top
Grouping builtins-only algos together
dteske [Sun, 31 Jan 2016 21:31:24 +0000 (21:31 +0000)]
Move f_vsprintf() below f_sprintf()
Variable argument versions grouped with standard versions
dteske [Sun, 31 Jan 2016 21:30:02 +0000 (21:30 +0000)]
Move f_sprintf() above f_snprintf()
Ordering functions by appearance of use
dteske [Sun, 31 Jan 2016 21:28:41 +0000 (21:28 +0000)]
Optimize f_substr() to use built-ins only
Change f_snprintf() to use optimzed f_substr()
dteske [Sun, 31 Jan 2016 21:22:10 +0000 (21:22 +0000)]
Optimize f_sprintf() for bash
bash lacks the ksh93 optimization that makes sub-shells fast if they do
not alter io. bash 3.1-alpha1 introduced printf -v var_to_set which is not
as fast but is still significantly faster than var_to_set=$( printf ) when
using any version of bash. If we find our interpreter to somehow be bash
by invocation or inclusion, use the feature that provides fastest results.
dteske [Sun, 31 Jan 2016 21:14:31 +0000 (21:14 +0000)]
Reset OPTIND to 1 in f_device_find()
ian [Sun, 31 Jan 2016 17:32:58 +0000 (17:32 +0000)]
Add make universe targets "kernels" and "worlds".
"make kernels" is now shorthand for "make universe -DMAKE_JUST_KERNELS"
"make worlds" is now shorthand for "make universe -DMAKE_JUST_WORLDS"
The kernels target includes modules (unless you add -DNO_MODULES).
And of course you can still add all the other universe options, such as
"make kernels TARGETS=arm" to build kernels for all arm arches, or
TARGET_ARCH=armv6 to build all armv6 kernels, etc.
Reviewed by: imp
andrew [Sun, 31 Jan 2016 17:32:20 +0000 (17:32 +0000)]
Fix the logic in the ddb command 'show ktr /a'. Prior to r118269 it would
print until cncheckc returned a non -1, i.e. a character had been entered.
After this change it would print only if cncheckc returned a character.
As this was before each call to db_mach_vtrace the normal outcome was
nothing was printed.
With this change 'show ktr /a' will now keep printing until the user stops
the command with a key press, or there is no more entries to print.
mmel [Sun, 31 Jan 2016 16:55:52 +0000 (16:55 +0000)]
ARM: Fix END() symbol for cpu_ident function. I forgot to rename it
in r295096.
mmel [Sun, 31 Jan 2016 16:34:06 +0000 (16:34 +0000)]
ARM: cpufunc_domains, cpufunc_faultstatus and cpufunc_faultaddress
functions are equal for all ARM variants. Remove them from cpu_functions
table.
mmel [Sun, 31 Jan 2016 15:36:13 +0000 (15:36 +0000)]
ARM: Next round of cpufunc.* cleaning. Nobody uses flush_brnchtgt* functions,
delete them.
smh [Sun, 31 Jan 2016 15:18:03 +0000 (15:18 +0000)]
Fix ixgbe flow control autoneg reporting
Fix ixgbe reporting of flow control autoneg when running under DBG 1
Reviewed by: erj
MFC after: 2 days
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5089
smh [Sun, 31 Jan 2016 15:14:23 +0000 (15:14 +0000)]
Configure ixgbe phy & gbic power
Setup phy and gbic power as per Linux 4.3.13 driver.
This fixes link not detected on X540-AT2 after booting to Linux which turns
the phy power off on detach.
Reviewed by: sbruno
MFC after: 2 days
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5107
mmel [Sun, 31 Jan 2016 13:59:16 +0000 (13:59 +0000)]
ARM: First round of cpufunc.* cleaning. All abort_fixup functions are
not currently used or defined. Delete them.
mmel [Sun, 31 Jan 2016 09:16:20 +0000 (09:16 +0000)]
ARM: Rename ARM specific VM_MEMATTR_WT memory attribute to standard one.
mmel [Sun, 31 Jan 2016 08:53:53 +0000 (08:53 +0000)]
ARM: Convert spaces to tabs, fix formatting.
Not a functional change.
mmel [Sun, 31 Jan 2016 08:06:22 +0000 (08:06 +0000)]
ARM: Next round of cleanup in swtch-v*.S.
- remove now useless #if __ARM_ARCH conditional
- use macro for accessing CP15 registers
- remove unused PCPU_SIZE
Pointed by: kib
imp [Sat, 30 Jan 2016 22:48:06 +0000 (22:48 +0000)]
Implement power command to list all power modes, find out the power
mode we're in and to set the power mode.
ian [Sat, 30 Jan 2016 22:03:14 +0000 (22:03 +0000)]
Make pfctl(8) work on strict-alignment platforms, by copying a pair of
embedded structures out of a packed, unaligned struct into local copies
on the stack which are aligned.
The original patch to do this was submitted by Guy Yur <guyyur@gmail.com>,
and this is conceptually the same change, but restructured with the
#ifndef __NO_STRICT_ALIGNMENT wrapper, similar to how the same issue is
handled in the kernel pf code.
PR: 185617
PR: 206658
jilles [Sat, 30 Jan 2016 21:21:25 +0000 (21:21 +0000)]
sh: Don't allocate a redirtab if there are no redirections.
Builtins (including variable assignments without command word), function
calls and redirected compound commands need to restore file descriptors
to their original state after execution. This is handled by allocating a
redirtab structure. These mallocs and frees show up heavily in pmcstat.
Only allocate a redirtab if there are actually redirections and maintain a
count of how many levels of REDIR_PUSH there are without redirtabs.
A simple loop without external programs like
sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do
i=$((i+1)); done'
is over 25% faster on an amd64 bhyve VM.
jilles [Sat, 30 Jan 2016 20:10:20 +0000 (20:10 +0000)]
sh(1): Document 'cd -'.
This reflects the changes in r294649 and can therefore not be MFCed by
itself.
jilles [Sat, 30 Jan 2016 19:59:58 +0000 (19:59 +0000)]
test: Optimize operator lookup.
The linear search using strcmp() shows up in pmcstat for several percent.
Split the operators into lengths and whether they start with '-' and compare
bytes using == instead of strcmp().
A simple test
sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do
v=$(printf %sx%s "$w" "$w"); i=$((i+1)); done'
is over 4% faster on an amd64 bhyve VM.
ngie [Sat, 30 Jan 2016 18:33:23 +0000 (18:33 +0000)]
Use the correct type for i when iterating over `buf` to avoid unlikely
negative array indexing in iicrdwr(..)
Differential Revision: https://reviews.freebsd.org/D5132
Obtained from: HardenedBSD
PR: 206754
Reported by: CTurt <cturt@hardenedbsd.org>
Submitted by: Madhi Moktari <mokhi64@gmail.com>
Sponsored by: EMC / Isilon Storage Division
ngie [Sat, 30 Jan 2016 17:54:18 +0000 (17:54 +0000)]
Fix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on
64-bit architectures where sizeof(int) != sizeof(size_t).
MFC after: 1 week
PR: 206758
Reported by: Christoph Schönweiler <public2016@hauptsignal.at>
Submitted by: kib
Sponsored by: EMC / Isilon Storage Division
tuexen [Sat, 30 Jan 2016 17:32:46 +0000 (17:32 +0000)]
Add missing parentheses. This was reported by ccaughie via GitHub
for the userland stack.
MFC after: 3 days
ngie [Sat, 30 Jan 2016 17:10:14 +0000 (17:10 +0000)]
Revert r295062 to unbreak buildworld
Some of the structures referenced in power.c (in particular
struct nvme_power_state) are missing from sbin/nvmecontrol/
Pointyhat to: imp
Reported by: Jenkins [*], O. Hartmann <ohartman@zedat.fu-berlin.de>, Outback Dingo <outbackdingo@gmail.com>
tuexen [Sat, 30 Jan 2016 16:56:39 +0000 (16:56 +0000)]
Update the path mtu when turning on/off UDP encapsulation for SCTP.
MFC after: 3 days
allanjude [Sat, 30 Jan 2016 15:53:28 +0000 (15:53 +0000)]
The zfsboot automated part of bsdinstall now supports UEFI
MFC after: 3 days
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4960
mmel [Sat, 30 Jan 2016 13:11:13 +0000 (13:11 +0000)]
ARM: Remove TLB IPI.
We don't support SMP on ARMv6. All ARMv7 multicore cpus already uses
hardware broadcast for TLB and cache operations.
tuexen [Sat, 30 Jan 2016 12:58:38 +0000 (12:58 +0000)]
Don't allow a remote encapsulation port change during the
SCTP restart procedure.
MFC after: 3 days
mmel [Sat, 30 Jan 2016 12:23:28 +0000 (12:23 +0000)]
ARM: Cleanup mp_machdep.c. SMP is supported only on ARMv6 and later.
tuexen [Sat, 30 Jan 2016 11:10:22 +0000 (11:10 +0000)]
Don't change the remote UDP encapsulation port for SCTP packets
containing an INIT chunk.
MFC after: 3 days
tuexen [Sat, 30 Jan 2016 10:39:05 +0000 (10:39 +0000)]
Ignore peer addresses in a consistent way also when checking for
new addresses during restart. If this is not done, restart doesn't
work when the local socket is IPv4 only and the peer uses
IPv4 and IPv6 addresses.
MFC after: 3 days.
mmel [Sat, 30 Jan 2016 10:10:29 +0000 (10:10 +0000)]
ARM: Don't misuse ARM_TP_ADDRESS as ARMv4 / ARMv6 selector.
mmel [Sat, 30 Jan 2016 08:27:09 +0000 (08:27 +0000)]
EHCI: Correct address of EHCI_USBMODE_LPM register is 0xC8, not 0xA8.
mmel [Sat, 30 Jan 2016 08:02:12 +0000 (08:02 +0000)]
ARM: Split swtch.S into common, ARMv4 and ARMv6 parts. Cleanup them.
imp [Sat, 30 Jan 2016 07:00:36 +0000 (07:00 +0000)]
Preliminary EFI support. Based, in part, on patches from Andy Turner.
Add support for being able to boot off both UEFI and BIOS firmware,
ala the memstick trick.
Add support for writing to GPT volumes.
Move away from using bsd labels at all for these embedded stuff.
Minor tweaks to README.
imp [Sat, 30 Jan 2016 07:00:29 +0000 (07:00 +0000)]
Two new variables: NANO_ROOT and NANO_ALTROOT. These used to be
spelled ${NANO_SLICE_ROOT}a and ${NANO_SLICE_ALTROOT}a respectively,
and that's the default value. This will allow nanobsd on systems
without a bsd label. That's rarely needed these days, even in an MBR
world. The default will shift to this in the future, but remain an
option.
imp [Sat, 30 Jan 2016 07:00:28 +0000 (07:00 +0000)]
Two new config files. One that has UEFI booting, and the other that
can do both UEFI and BIOS/GPT booting. Support for nanobsd coming
soon.
Based in part in a patch from: andrew@
imp [Sat, 30 Jan 2016 06:18:37 +0000 (06:18 +0000)]
Implement power command to list all power modes, find out the power
mode we're in and to set the power mode.
sobomax [Sat, 30 Jan 2016 04:16:05 +0000 (04:16 +0000)]
This seems like a very trivial bug that should have been squashed a long
time ago, but for some reason it was not. Basically, without this change
dlopen(3)'ing an empty .so file would just cause application to dump core
with SIGSEGV.
Make sure the file has enough data for at least the ELF header before
mmap'ing it.
Add a test case to check that dlopen an empty file return an error.
There were a separate discussion as to whether it should be SIGBUS
instead when you try to access region mapped from an empty file,
but it's definitely SIGSEGV now, so if anyone want to check that please
be my guest.
Reviewed by: mjg, cem
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5112
gjb [Sat, 30 Jan 2016 01:52:18 +0000 (01:52 +0000)]
Fix periodic(8) and rc(8) script inclusion to rcmds package.
Sponsored by: The FreeBSD Foundation
jhb [Sat, 30 Jan 2016 01:00:54 +0000 (01:00 +0000)]
Add a SYSDECODE_ABI_ prefix to the ABI enums to avoid potential collisions.
Suggested by: jmallett
Reviewed by: bdrewery, jmallett
Differential Revision: https://reviews.freebsd.org/D5123
gjb [Fri, 29 Jan 2016 21:42:27 +0000 (21:42 +0000)]
Wrap long lines after recent commits.
Sponsored by: The FreeBSD Foundation
gjb [Fri, 29 Jan 2016 21:39:44 +0000 (21:39 +0000)]
Make sure 'pkg config ABI' uses ABI_FILE for the target.
Sponsored by: The FreeBSD Foundation