]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoMake _TO_CPUARCH macro for ARCH to CPUARCH conversions
imp [Sat, 12 Aug 2017 17:07:27 +0000 (17:07 +0000)]
Make _TO_CPUARCH macro for ARCH to CPUARCH conversions

Consolidate all the regular expressions to convert from MACHINE_ARCH
to MACHINE_CPUARCH into a variable and use that variable in preference
to the almost identical copies in the tree (which should have been
identical).

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

6 years agoSet usage() to show -d flag
sevan [Sat, 12 Aug 2017 15:51:46 +0000 (15:51 +0000)]
Set usage() to show -d flag
mkesdb supports the -d flag for enabling debug mode, as documented in the manual.

PR: 209865
Submitted by: Maya Rashish <coypu AT sdf DOT org>
Reviewed by: imp
Approved by: bcr (mentor)
Obtained from: NetBSD
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D11987

6 years agoImprove standard compliance for memset_s() and abort_handler_s().
kib [Sat, 12 Aug 2017 15:18:17 +0000 (15:18 +0000)]
Improve standard compliance for memset_s() and abort_handler_s().

abort_handler_s() currently simply calls abort(), though the standard
specifies more: "Writes an implementation-defined message to stderr
which must include the string pointed to by msg and calls abort()."

memset_s() is missing error condition "n > smax", and does not invoke
the constraint handler after filling the buffer: "following errors are
detected at runtime and call the currently installed constraint
handler function after storing ch in every location of the destination
range [dest, dest+destsz) if dest and destsz are themselves valid",
one of the errors is "n > smax" itself.

Submitted by: Yuri Pankov <yuripv@gmx.com>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D11991

6 years agoFix indent.
kib [Sat, 12 Aug 2017 14:58:09 +0000 (14:58 +0000)]
Fix indent.

Submitted by: Yuri Pankov <yuripv@gmx.com>
MFC after: 3 days

6 years agocxgbe(4): Save the last reported link parameters and compare them with
np [Sat, 12 Aug 2017 14:02:19 +0000 (14:02 +0000)]
cxgbe(4): Save the last reported link parameters and compare them with
the current state to determine whether to generate a link-state change
notification.  This fixes a bug introduced in r321063 that caused the
driver to sometimes skip these notifications.

Reported by: Jason Eggleston @ LLNW
MFC after: 3 days
Sponsored by: Chelsio Communications

6 years agoCorrect the -H longopt equivillant
sevan [Sat, 12 Aug 2017 12:17:38 +0000 (12:17 +0000)]
Correct the -H longopt equivillant

PR: 209876
Submitted by: <kdrakehp AT zoho DOT com>
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D11988

6 years agoFix a typo.
jhb [Fri, 11 Aug 2017 22:47:32 +0000 (22:47 +0000)]
Fix a typo.

6 years agolib/msun: avoid referring to broken LDBL_MAX
rlibby [Fri, 11 Aug 2017 22:41:24 +0000 (22:41 +0000)]
lib/msun: avoid referring to broken LDBL_MAX

LDBL_MAX is broken on i386:
https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html

Gcc has produced +Infinity for LDBL_MAX on i386 and amd64 with -m32
for some time, and newer versions of gcc are now warning that the
"floating constant exceeds range of 'long double'".  Avoid this by
referring to half the value of LDBL_MAX instead.

Reviewed by: bde
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon

6 years agoadd myself to calendar.freebsd
bhd [Fri, 11 Aug 2017 20:44:17 +0000 (20:44 +0000)]
add myself to calendar.freebsd

Requested by: mckusick

6 years agolldb: enable on i386
emaste [Fri, 11 Aug 2017 20:11:43 +0000 (20:11 +0000)]
lldb: enable on i386

It is functional on FreeBSD/i386 as of r322326.

Sponsored by: The FreeBSD Foundation

6 years agoarm: enable ARM_MANY_BOARD in NOTES for LINT build
emaste [Fri, 11 Aug 2017 19:49:29 +0000 (19:49 +0000)]
arm: enable ARM_MANY_BOARD in NOTES for LINT build

Added in r238189, ARM_MANY_BOARD adds support for multiple ARM boards in
a single kernel. Include it for LINT builds to avoid duplicate symbol
errors when linking with lld.

Sponsored by: The FreeBSD Foundation

6 years agoBump KERNELDUMP_BUFFER_SIZE to 4096.
markj [Fri, 11 Aug 2017 19:24:08 +0000 (19:24 +0000)]
Bump KERNELDUMP_BUFFER_SIZE to 4096.

The encrypted kernel dump code writes data in blocks of this size. A buffer
size of 4096 allows encrypted dumps to work with 4Kn drives.

Reviewed by: cem
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11870

6 years agoAdd SVNVERSION_CMD to bsd.own.mk, adding the capability to include
gjb [Fri, 11 Aug 2017 19:21:40 +0000 (19:21 +0000)]
Add SVNVERSION_CMD to bsd.own.mk, adding the capability to include
svnversion metadata to the runtime and kernel packages.

Instead of traversing src/sys, as is done by newvers.sh for uname(1),
a full tree walk is done to prevent userland and/or modifications
from not being reflected in a modified tree (M).

MFC after: 5 days
Sponsored by: The FreeBSD Foundation

6 years agoStop calling atrtc_set() from the xen timer clock_settime() method. That
ian [Fri, 11 Aug 2017 19:02:11 +0000 (19:02 +0000)]
Stop calling atrtc_set() from the xen timer clock_settime() method.  That
removes the only reference to atrtc_set() from outside of atrtc.c, so make
it static.

The xen timer driver registers as a realtime clock with 1us resolution.  In
the past that resulted in only the xen timer's clock_settime() getting
called, so it would call atrtc_set() to set the hardware clock as well.  As
of r32090, the clock_settime() method of all registered realtime clocks gets
called, so the xen driver no longer needs to chain-call the lower-resolution
driver.

Thanks to royger@ for talking me through the xen stuff, and for testing.

6 years agoAdd historical notes on QIC tape drives and fix a couple of issues in mt(1).
ken [Fri, 11 Aug 2017 18:43:52 +0000 (18:43 +0000)]
Add historical notes on QIC tape drives and fix a couple of issues in mt(1).

 o Density code 0x5 is also known as QIC-11, and should have a footnote
   reference.
 o Add notes on QIC tape drives from the bug report.  These may help anyone
   trying to use a QIC drive.
 o Take out a "more more" instance found by igor.
 o Bump the man page date.

The PR is 14 years old, so it's past time to retire it.

PR: doc/53596
Submitted by: tedm@toybox.placo.com
Reviewed by: bcr
Sponsored by: Spectra Logic

6 years agoRename at91_pmc's M_PMC malloc type to avoid duplicate definition
emaste [Fri, 11 Aug 2017 18:09:26 +0000 (18:09 +0000)]
Rename at91_pmc's M_PMC malloc type to avoid duplicate definition

M_PMC is defined in sys/dev/hwpmc/hwpmc_mod.c, and the LINT kernel build
fails when linking with lld due to a duplicate symbol error.

Sponsored by: The FreeBSD Foundation

6 years agoPerformance enhancements to reduce CPU utililization for large number of
davidcs [Fri, 11 Aug 2017 17:43:25 +0000 (17:43 +0000)]
Performance enhancements to reduce CPU utililization for large number of
TCP connections (order of tens of thousands), with predominantly Transmits.

Choice to perform receive operations either in IThread or Taskqueue Thread.

Submitted by:Vaishali.Kulkarni@cavium.com
MFC after:5 days

6 years agox86/crc32_sse42.c: quiet unused function warning
rlibby [Fri, 11 Aug 2017 17:05:31 +0000 (17:05 +0000)]
x86/crc32_sse42.c: quiet unused function warning

Reviewed by: cem
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11980

6 years agoHave sendfile_swapin() use vm_page_grab_pages().
markj [Fri, 11 Aug 2017 16:32:24 +0000 (16:32 +0000)]
Have sendfile_swapin() use vm_page_grab_pages().

Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11942

6 years agoModify vm_page_grab_pages() to handle VM_ALLOC_NOWAIT.
markj [Fri, 11 Aug 2017 16:29:22 +0000 (16:29 +0000)]
Modify vm_page_grab_pages() to handle VM_ALLOC_NOWAIT.

This will allow its use in sendfile_swapin().

Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11942

6 years agoAn invalid page can't be dirty.
alc [Fri, 11 Aug 2017 16:27:54 +0000 (16:27 +0000)]
An invalid page can't be dirty.

Reviewed by: kib
MFC after: 1 week

6 years agoacpi/srat: fix build without DMAP
royger [Fri, 11 Aug 2017 14:19:55 +0000 (14:19 +0000)]
acpi/srat: fix build without DMAP

Use pmap_mapbios to map memory used to store the cpus array.

Reported by: lwhsu
X-MFC-with: r322348

6 years agoFix indentation from r322401.
gjb [Fri, 11 Aug 2017 14:19:31 +0000 (14:19 +0000)]
Fix indentation from r322401.

MFC after: 3 days
MFC with: r322401
Sponsored by: The FreeBSD Foundation

6 years agoAvoid creating kernel-dbg.txz distribution sets and kernel-debug
gjb [Fri, 11 Aug 2017 14:18:11 +0000 (14:18 +0000)]
Avoid creating kernel-dbg.txz distribution sets and kernel-debug
packages when MK_DEBUG_FILES is 'no'.

MFC after: 5 days
Sponsored by: The FreeBSD Foundation

6 years agoOnly return the current cpu if it's in the cpumask. When we restrict the
andrew [Fri, 11 Aug 2017 12:45:58 +0000 (12:45 +0000)]
Only return the current cpu if it's in the cpumask. When we restrict the
cpumask it probably means we are unable to sent interrupts to CPUs outside
the map. As such only return the current CPU when it's within the mask
otherwise return the first valid CPU.

This is needed on ThunderX as, in a dual socket configuration, we are
unable to send MSI/MSI-X interrupts between sockets.

Reviewed by: mmel
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11957

6 years agoMake sure the "vm_flags" and "vm_page_prot" fields get set correctly
hselasky [Fri, 11 Aug 2017 10:44:40 +0000 (10:44 +0000)]
Make sure the "vm_flags" and "vm_page_prot" fields get set correctly
in the VM area structure in the LinuxKPI when doing mmap() and that
unsupported bits are masked away.

While at it fix some redundant use of parenthesing inside some related
macros.

Found by: KrishnamRaju ErapaRaju <Krishna2@chelsio.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoAdd a specialized function for DRM drivers to register themselves.
markj [Fri, 11 Aug 2017 03:59:48 +0000 (03:59 +0000)]
Add a specialized function for DRM drivers to register themselves.

Such drivers attach to a vgapci bus rather than directly to a pci bus. For
the rest of the LinuxKPI to work correctly in this case, we override the
vgapci bus' ivars with those of the grandparent.

Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11932

6 years agoMicro-optimize kmem_unback().
markj [Fri, 11 Aug 2017 03:09:11 +0000 (03:09 +0000)]
Micro-optimize kmem_unback().

We can remove some unnecessary object radix tree lookups by using the
object memq to iterate over pages in the specified range. This does not,
however, eliminate the lookup needed in vm_page_free_toq() to remove each
tree entry.

Reviewed by: alc, kib (previous revision)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11945

6 years agoUpdate from sqlite3-3.14.1 to sqlite3-3.20.0. This is a private lib.
peter [Fri, 11 Aug 2017 00:00:01 +0000 (00:00 +0000)]
Update from sqlite3-3.14.1 to sqlite3-3.20.0.  This is a private lib.
This fixes a possible client-side crash when parsing corrupt databases.

6 years agoMake vm_page_sunbusy() assert that the page is unlocked.
markj [Thu, 10 Aug 2017 22:43:38 +0000 (22:43 +0000)]
Make vm_page_sunbusy() assert that the page is unlocked.

Reviewed by: kib
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11946

6 years agoUpdate subversion 1.9.5 -> 1.9.7
peter [Thu, 10 Aug 2017 22:03:26 +0000 (22:03 +0000)]
Update subversion 1.9.5 -> 1.9.7

This includes a client-side fix for CVE-2017-9800.

6 years agobsdinstall: record DHCP config after obtaining lease
emaste [Thu, 10 Aug 2017 20:26:07 +0000 (20:26 +0000)]
bsdinstall: record DHCP config after obtaining lease

Previously we added an ifconfig_$INTERFACE line to rc.conf for each
unsuccessful DCHP attempt.

PR: 219515
Reviewed by: allanjude
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11967

6 years agoEnsure the clocks driver is attached before any drivers that need to enable
ian [Thu, 10 Aug 2017 19:42:30 +0000 (19:42 +0000)]
Ensure the clocks driver is attached before any drivers that need to enable
clocks in their attach().

6 years agomptable: fix i386 build failure
royger [Thu, 10 Aug 2017 17:46:57 +0000 (17:46 +0000)]
mptable: fix i386 build failure

Reported by: emaste
X-MFC-with: r322347

6 years agofnmatch(3): Update testcase for r322368.
pfg [Thu, 10 Aug 2017 17:03:46 +0000 (17:03 +0000)]
fnmatch(3): Update testcase for r322368.

6 years agoLimit descriptors stored in the pidfh structure.
oshogbo [Thu, 10 Aug 2017 16:50:13 +0000 (16:50 +0000)]
Limit descriptors stored in the pidfh structure.

Reviewed by: markj, cem
Differential Revision: https://reviews.freebsd.org/D11741

6 years agoStore directory descriptor in the pidfh structure and use unlinkat(2)
oshogbo [Thu, 10 Aug 2017 16:45:05 +0000 (16:45 +0000)]
Store directory descriptor in the pidfh structure and use unlinkat(2)
function instead of unlink(2).

Now when pidfile_remove() uses unlinkat(2) to remove the pidfile
it is safe to use this function in capability mode.

Style fix: sort headers.

PR: 220524
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D11692

6 years agofnmatch(3): improve POSIX conformance.
pfg [Thu, 10 Aug 2017 15:42:25 +0000 (15:42 +0000)]
fnmatch(3): improve POSIX conformance.

In a recent interpretation[1], "\\" shall return a non-zero value
(indicating either no match or an error).

The fix involves a change over r254091 and now the behavior matches the
Sun/IBM/HP closed source implementations and also likely musl libc.

Submitted by: Joerg Schilling <joerg at schily.net>
MFC after: 1 week

[1] http://austingroupbugs.net/view.php?id=806

6 years ago Add myself.
rcyu [Thu, 10 Aug 2017 15:31:45 +0000 (15:31 +0000)]
 Add myself.

Reported by: mckusick

6 years agoChanges to make mps(4) and mpr(4) handle reinit with reallocation.
ken [Thu, 10 Aug 2017 14:59:17 +0000 (14:59 +0000)]
Changes to make mps(4) and mpr(4) handle reinit with reallocation.

When the mps(4) and mpr(4) drivers need to reinitialize the
firmware, they sometimes need to reallocate all of the memory
allocated by the driver.  The reallocation happens whenever the IOC
Facts change.  That should only happen after a firmware upgrade.

If the reinitialization happens as a result of a timed out command
sent to the card, the command that timed out and triggered the
reinit may have been freed if iocfacts_allocate() reallocated all
memory.  If the caller attempts to access the command after that,
the kernel will panic because the caller will be dereferencing
freed memory.

The solution is to set a flag in the softc when we reallocate,
and avoid dereferencing the command strucure if we've reallocated.

The changes are largely the same in both drivers, since mpr(4) is a
derivative of mps(4).

 o In iocfacts_allocate(), if the IOC Facts have changed and we
   need to reallocate, set the REALLOCATED flag in the softc.

 o Change wait_command() to take a struct mps_command ** instead of
   a struct mps_command *.  This allows us to NULL out the caller's
   command pointer if we have to reinit the controller and the data
   structures get reallocated.  (The REALLOCATED flag will be set
   in the softc if that has happened.)

 o In every place that calls wait_command(), make sure we handle
   the case where the command is NULL after the call.

 o The mpr(4) driver has mpr_request_polled() which can also
   reinitialize the card.  Also check for reallocation there.

Reviewed by: scottl, slm
MFC after: 1 week
Sponsored by: Spectra Logic

6 years agoPurge deprecated locking macros.
sbruno [Thu, 10 Aug 2017 14:54:36 +0000 (14:54 +0000)]
Purge deprecated locking macros.

Submitted by: Matt Macy <matt@mattmacy.io>
Sponsored by: Limelight Networks

6 years agoIndent nested conditionals for readability.
gjb [Thu, 10 Aug 2017 14:18:58 +0000 (14:18 +0000)]
Indent nested conditionals for readability.

Sponsored by: The FreeBSD Foundation

6 years agoSupport for v1.10 (latest) of RISC-V privilege specification.
br [Thu, 10 Aug 2017 14:18:09 +0000 (14:18 +0000)]
Support for v1.10 (latest) of RISC-V privilege specification.

New version is not compatible on supervisor mode with v1.9.1
(previous version).

Highlights:
    o BBL (Berkeley Boot Loader) provides no initial page tables
      anymore allowing us to choose VM, to build page tables manually
      and enable MMU in S-mode.
    o SBI interface changed.
    o GENERIC kernel.
      FDT is now chosen standard for RISC-V hardware description.
      DTB is now provided by Spike (golden model simulator). This
      allows us to introduce GENERIC kernel. However, description
      for console and timer devices is not provided in DTB, so move
      these devices temporary to nexus bus.
    o Supervisor can't access userspace by default. Solution is to
      set SUM (permit Supervisor User Memory access) bit in sstatus
      register.
    o Compressed extension is now turned on by default.
    o External GCC 7.1 compiler used.
    o _gp renamed to __global_pointer$
    o Compiler -march= string is now in use allowing us to choose
      required extensions (compressed, FPU, atomic, etc).

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11800

6 years agolldb: Report inferior signals as signals, not exceptions, on FreeBSD
emaste [Thu, 10 Aug 2017 13:51:04 +0000 (13:51 +0000)]
lldb: Report inferior signals as signals, not exceptions, on FreeBSD

This is the FreeBSD equivalent of LLVM r238549.

This serves 2 purposes:

* LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/
  SIGFPE the way it is suppose to be handled. Prior to this fix these
  signals will neither create a coredump, nor exit from the debugger
  or work for signal handling scenario.
* eInvalidCrashReason need not report "unknown crash reason" if we have
  a valid si_signo

llvm.org/pr23699

Patch by Karnajit Wangkhem

Differential Revision:  https://reviews.llvm.org/D35223

Submitted by: Karnajit Wangkhem
Obtained from: LLVM r310591

6 years agoEnable OF_setprop API function to add property in FDT
mw [Thu, 10 Aug 2017 13:45:56 +0000 (13:45 +0000)]
Enable OF_setprop API function to add property in FDT

This patch modifies function ofw_fdt_setprop (called by OF_setprop),
so that it can add property, when replacing is not possible.
Adding property is needed to fixup FDT's that have missing
properties.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: nwhitehorn, cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11879

6 years agoFurther revise r322327 and r322352 in release/packages/kernel.ucl.
gjb [Thu, 10 Aug 2017 13:32:04 +0000 (13:32 +0000)]
Further revise r322327 and r322352 in release/packages/kernel.ucl.

Use PPID and PID to kill off the pre-install and parent pkg(8)
processes unless 'Y' or 'y' are entered at the prompt if the user
wants to proceed with upgrading the kernel and userland at the same
time.

This restores some of the logic and intent of r322327, with the
caveat of printing "child process terminated unexpectedly."

MFC after: 5 days
MFC with: r322327, r322352
Sponsored by: The FreeBSD Foundation

6 years agoUse integer type to pass around jiffies and/or ticks values in the
hselasky [Thu, 10 Aug 2017 13:05:40 +0000 (13:05 +0000)]
Use integer type to pass around jiffies and/or ticks values in the
LinuxKPI because in FreeBSD ticks are 32-bit.

MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoMark PROFILE option as broken when targetting mips64
emaste [Thu, 10 Aug 2017 13:01:19 +0000 (13:01 +0000)]
Mark PROFILE option as broken when targetting mips64

The assembly in sys/mips/include/profile.h will only work for o32 ABI.

Submitted by: Alexander Richardson
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11950

6 years agoFixes for wait event in the LinuxKPI. These are regression issues
hselasky [Thu, 10 Aug 2017 13:00:10 +0000 (13:00 +0000)]
Fixes for wait event in the LinuxKPI. These are regression issues
after r319757.

1) Correct the return value from __wait_event_common() from 1 to 0 in
case the timeout is specified as MAX_SCHEDULE_TIMEOUT. In the other
case __ret is zero and will be substituted in the last part of the
macro with the appropriate value before return.

2) Make sure the "timeout" argument is casted to "int" before
evaluating negativity. Else the signedness of a "long" might be
checked instead of the signedness of an integer.

3) The wait_event() function should not have a return value.

Found by: KrishnamRaju ErapaRaju <Krishna2@chelsio.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoMake sure the linux_wait_event_common() function in the LinuxKPI properly
hselasky [Thu, 10 Aug 2017 12:51:04 +0000 (12:51 +0000)]
Make sure the linux_wait_event_common() function in the LinuxKPI properly
handles a timeout value of MAX_SCHEDULE_TIMEOUT which basically means there
is no timeout. This is a regression issue after r319757.

While at it change the type of returned variable from "long" to "int" to
match the actual return type.

MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoAdd myself.
oleg [Thu, 10 Aug 2017 12:31:55 +0000 (12:31 +0000)]
Add myself.

Reported by: mckusick

6 years agoRevise part of r322327 in release/packages/kernel.ucl.
gjb [Thu, 10 Aug 2017 12:30:34 +0000 (12:30 +0000)]
Revise part of r322327 in release/packages/kernel.ucl.

It appears I misunderstand process forking and signal handling in
how the pre-/post-install scripts are executed internally by pkg(8).
In some cases (not all), ^C when prompted to cancel the kernel
package update will stop the pre-install script from executing, but
allow pkg(8) to continue extracting the package when it is not the
intent.

In order to keep somewhat of an anti-footshooting measure in place,
print the recommendation to install the kernel package first if
ASSUME_ALWAYS_YES is false and TERM is set, then sleep for 5 seconds
to allow the user to see the message.

MFC after: 5 days
MFC with: r322327
X-MFC-Note: Maybe not until I am happy with this..
Sponsored by: The FreeBSD Foundation

6 years agoAdd two NFIT fields missed in r321298.
mav [Thu, 10 Aug 2017 10:59:05 +0000 (10:59 +0000)]
Add two NFIT fields missed in r321298.

MFC after: 2 weeks

6 years agocalendars: add myself to the FreeBSD calendar
royger [Thu, 10 Aug 2017 09:17:16 +0000 (09:17 +0000)]
calendars: add myself to the FreeBSD calendar

Reported by: mckusick

6 years agox86: bump MAX_APIC_ID to 512
royger [Thu, 10 Aug 2017 09:16:40 +0000 (09:16 +0000)]
x86: bump MAX_APIC_ID to 512

Introduce a new define to take int account the xAPIC ID limit, for
systems where x2APIC is not available/reliable.

Also change some of the usages of the APIC ID to use an unsigned int
(which is the correct storage type to deal with x2APIC IDs as found in
x2APIC MADT entries).

This allows booting FreeBSD on a box with 256 CPUs and APIC IDs up to
295:

FreeBSD/SMP: Multiprocessor System Detected: 256 CPUs
FreeBSD/SMP: 1 package(s) x 64 core(s) x 4 hardware threads
Package HW ID = 0
Core HW ID = 0
CPU0 (BSP): APIC ID: 0
CPU1 (AP/HT): APIC ID: 1
CPU2 (AP/HT): APIC ID: 2
CPU3 (AP/HT): APIC ID: 3
[...]
Core HW ID = 73
CPU252 (AP): APIC ID: 292
CPU253 (AP/HT): APIC ID: 293
CPU254 (AP/HT): APIC ID: 294
CPU255 (AP/HT): APIC ID: 295

Submitted by: kib (previous version)
Relnotes: yes
MFC after: 1 month
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D11913

6 years agox86: make the arrays that depend on MAX_APIC_ID dynamic
royger [Thu, 10 Aug 2017 09:16:03 +0000 (09:16 +0000)]
x86: make the arrays that depend on MAX_APIC_ID dynamic

So that MAX_APIC_ID can be bumped without wasting memory.

Note that the usage of MAX_APIC_ID in the SRAT parsing forces the
parser to allocate memory directly from the phys_avail physical memory
array, which is not the best approach probably, but I haven't found
any other way to allocate memory so early in boot. This memory is not
returned to the system afterwards, but at least it's sized according
to the maximum APIC ID found in the MADT table.

Sponsored by: Citrix Systems R&D
MFC after: 1 month
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D11912

6 years agoapic_enumerator: only set mp_ncpus and mp_maxid at probe cpus phase
royger [Thu, 10 Aug 2017 09:15:18 +0000 (09:15 +0000)]
apic_enumerator: only set mp_ncpus and mp_maxid at probe cpus phase

Populate the lapics arrays and call cpu_add/lapic_create in the setup
phase instead. Also store the max APIC ID found in the newly
introduced max_apic_id global variable.

This is a requirement in order to make the static arrays currently
using MAX_LAPIC_ID dynamic.

Sponsored by: Citrix Systems R&D
MFC after: 1 month
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D11911

6 years agoDon't leak mbufs if clusers exceeds the number of segments. This would
sbruno [Thu, 10 Aug 2017 03:43:23 +0000 (03:43 +0000)]
Don't leak mbufs if clusers exceeds the number of segments.  This would
leak mbufs over time causing crashes.

PR: 221202
Submitted by: Matt Macy <matt@mattmacy.io>
Reported by: gergely.czuczy@harmless.hu
Sponsored by: Limelight Networks

6 years agoExport IFCAP_HWSTATS so that we don't experience double stats counting
sbruno [Thu, 10 Aug 2017 03:11:05 +0000 (03:11 +0000)]
Export IFCAP_HWSTATS so that we don't experience double stats counting
on iflib enabled devices.

PR: 220198
Submitted by: Matt Macy <matt@mattmacy.io>
Reported by: Ben Woods <woodsb02@freebsd.org>
Sponsored by: Limelight Networks

6 years agoAdd sbruno@ birthday information.
sbruno [Thu, 10 Aug 2017 02:55:22 +0000 (02:55 +0000)]
Add sbruno@ birthday information.

Reported by: mckusick

6 years agoAdd myself (rlibby) to calendar.freebsd
rlibby [Thu, 10 Aug 2017 02:15:40 +0000 (02:15 +0000)]
Add myself (rlibby) to calendar.freebsd

Reported by: mckusick
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D11947

6 years agoPick 'Remove external linkage for spin_adaptive' from upstream jemalloc
rlibby [Wed, 9 Aug 2017 22:58:42 +0000 (22:58 +0000)]
Pick 'Remove external linkage for spin_adaptive' from upstream jemalloc

Apply the changes from upstream jemalloc 048c6679.  This is actually not
quite a cherry pick due to makefile difference and because FreeBSD does
not carry the msvc project files which were also modified in that
commit.

Approved by: jasone (maintainer), markj (mentor)
Sponsored by: Dell EMC Isilon

6 years agoProvide compile to choose receive processing in either Ithread or Taskqueue Thread.
davidcs [Wed, 9 Aug 2017 22:18:49 +0000 (22:18 +0000)]
Provide compile to choose receive processing in either Ithread or Taskqueue Thread.

6 years agoAdd myself to calendar.freebsd
kevans [Wed, 9 Aug 2017 21:44:55 +0000 (21:44 +0000)]
Add myself to calendar.freebsd

Requested by: mckusick
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11936

6 years agoi386/boot2: -fno-asynchronous-unwind-tables for gcc
rlibby [Wed, 9 Aug 2017 20:13:49 +0000 (20:13 +0000)]
i386/boot2: -fno-asynchronous-unwind-tables for gcc

The amd64 build of boot2 was failing with gcc 6.3.0 due to being more
than 1 kB too large. It was apparently generating a .eh_frame section
which was not being removed by objcopy -S. The .eh_frame section seems
to be mandatory per the amd64 ABI, but boot2 is compiled for i386 (uses
-m32), and therefore should be optional in this context. Suppress
generation of .eh_frame with the -fno-asynchronous-unwind-tables flag to
gcc. This saves 1348 bytes (the limit is 7680 bytes).

Reviewed by: dim, imp
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11928

6 years agoMake user supplied data checks a bit stricter.
ae [Wed, 9 Aug 2017 19:58:38 +0000 (19:58 +0000)]
Make user supplied data checks a bit stricter.

key_msg2sp() is used for parsing data from setsockopt(IP[V6]_IPSEC_POLICY)
call. This socket option is usually used to configure IPsec bypass for
socket. Only privileged user can set this socket option.
The message syntax is described here
http://www.kame.net/newsletter/20021210/

and our libipsec is usually used to create the correct request.
Add additional checks:
* that sadb_x_ipsecrequest_len is not out of bounds of user supplied buffer
* that src/dst's sa_len is the same
* that 2*sa_len is not out of bounds of user supplied buffer
* that 2*sa_len fits into bounds of sadb_x_ipsecrequest

Reported by: Ilja van Sprundel
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11796

6 years agoAdd a dependency on the kernel package for the runtime package.
gjb [Wed, 9 Aug 2017 19:16:54 +0000 (19:16 +0000)]
Add a dependency on the kernel package for the runtime package.

The idea here is that, provided upstream pkg(8) maintainers accept
the proposed change, the kernel.ucl will contain a post-install
script causing pkg(8) to emit a message informing to reboot the
system after the kernel is upgraded using 'pkg upgrade', so the
new userland is installed on the running new kernel.  At present,
this functionality does not exist in pkg(8), but will help ensure
the upgrade path follows that from UPDATING.  To work around this
for now, evaluate ASSUME_ALWAYS_YES, and prompt the user if they
wish to proceed if not set to true.

Since there is a kernel dependency, and a non-GENERIC kernel may
be in use, update Makefile.inc1 to replace '%KERNCONF%' in the
runtime.ucl with the first-built kernel set either via command line
or in make.conf(5).

MFC after: 5 days
Sponsored by: The FreeBSD Foundation

6 years agolldb: Make i386-*-freebsd expression work on JIT path
emaste [Wed, 9 Aug 2017 19:09:23 +0000 (19:09 +0000)]
lldb: Make i386-*-freebsd expression work on JIT path

* Enable i386 ABI creation for freebsd
* Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap
  syscall
* Unlike linux, the last argument of mmap is actually 64-bit(off_t).
  This requires us to push an additional word for the higher order bits.
* Prior to this change, ktrace dump will show mmap failures due to
  invalid argument coming from the 6th mmap argument.

Submitted by: Karnajit Wangkhem
Differential Revision: https://reviews.llvm.org/D34776

6 years agocat: fix build with -DNO_UDOM_SUPPORT
emaste [Wed, 9 Aug 2017 18:23:46 +0000 (18:23 +0000)]
cat: fix build with -DNO_UDOM_SUPPORT

Sponsored by: The FreeBSD Foundation

6 years agocapsicum_helpers: Add FIODTYPE to default ioctls allowed
kevans [Wed, 9 Aug 2017 18:15:07 +0000 (18:15 +0000)]
capsicum_helpers: Add FIODTYPE to default ioctls allowed

FIODTYPE will be needed by hexdump(1) to speed up the -s flag on devices
that should be able to support fseek(3); specifically, in an attempt to
correct for the fact that most tape drives don't support seeking yet don't
indicate as such when fseeko(3) is invoked. Related: D10939

Reviewed by: cem, emaste, oshogbo
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D10937

6 years agoSplit identify_cpu() into two functions for amd64 as we do for i386. This
jkim [Wed, 9 Aug 2017 18:09:09 +0000 (18:09 +0000)]
Split identify_cpu() into two functions for amd64 as we do for i386.  This
reduces diff between amd64 and i386.  Also, it fixes a regression introduced
in r322076, i.e., identify_hypervisor() failed to identify some hypervisors.
This function assumes cpu_feature2 is already initialized.

Reported by: dexuan
Tested by: dexuan

6 years agolibusb(3): Expose device caps as libusb_bos_descriptor::dev_capability
kevans [Wed, 9 Aug 2017 18:06:27 +0000 (18:06 +0000)]
libusb(3): Expose device caps as libusb_bos_descriptor::dev_capability

Some libusb consumers in Linux-land (in this case, libusb4java) expect a
dev_capability member that they can use to enumerate the device
capabilities.

No particular layout is expected of this, just that it can be traversed
using the bLength member until bNumDeviceCapabilities are read and that the
consumer may then use one of the libusb_get_*_descriptor methods to extract
specific (usb 2.0 vs. ss) capability information.

In collaboration with: hselasky
Reviewed by: hselasky
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11494

6 years agoPlug uninitialized stack variable leak in sendfile(2).
glebius [Wed, 9 Aug 2017 17:48:38 +0000 (17:48 +0000)]
Plug uninitialized stack variable leak in sendfile(2).

Reported by: Ilja Van Sprundel <ivansprundel ioactive.com>
Submitted by: Domagoj Stolfa <domagoj.stolfa gmail.com>
MFC after: 1 week
Security: uninitialized stack variable leak

6 years agoUpgrade our copies of clang, llvm and libc++ to r310316 from the
dim [Wed, 9 Aug 2017 17:32:39 +0000 (17:32 +0000)]
Upgrade our copies of clang, llvm and libc++ to r310316 from the
upstream release_50 branch.

MFC after: 2 months
X-MFC-with: r321369

6 years agoAlso provide a warning for geom_fox.
imp [Wed, 9 Aug 2017 16:37:37 +0000 (16:37 +0000)]
Also provide a warning for geom_fox.

Differential Review: https://reviews.freebsd.org/D11935
Requested by: jhb@
MFC After: 3 days

6 years agoMark geom classes as deprecated.
imp [Wed, 9 Aug 2017 16:15:24 +0000 (16:15 +0000)]
Mark geom classes as deprecated.

geom_bsd, geom_mbr and geom_sunlabel have been obsolete since Marcel
Moolenaar's geom_part was in FreeBSD 7. They haven't been in GENERIC
since FreeBSD 8. Add warning when used.

geom_vol_ffs has been obsolete since ufs support to geom_label was
committed in FreeBSD 5. It hasn't been in GENERIC since FreeBSD 5.
Add warning when used.

geom_fox has been obsolete since gmultipath was committed in FreeBSD 7.
(no warning added, since this is a very obscure class).

These will all be removed in FreeBSD 12.

MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D11935

Note: Classes will be removed after MFC

6 years agoMissing remanant of 322309.
mav [Wed, 9 Aug 2017 13:46:16 +0000 (13:46 +0000)]
Missing remanant of 322309.

MFC after: 1 week

6 years agoAdd birthday information for jonathan@.
jonathan [Wed, 9 Aug 2017 13:25:27 +0000 (13:25 +0000)]
Add birthday information for jonathan@.

As requested by mckusick@...

6 years agoAdd to if_enc(4) ability to capture packets via BPF after pfil processing.
ae [Wed, 9 Aug 2017 12:24:07 +0000 (12:24 +0000)]
Add to if_enc(4) ability to capture packets via BPF after pfil processing.

New flag 0x4 can be configured in net.enc.[in|out].ipsec_bpf_mask.
When it is set, if_enc(4) additionally captures a packet via BPF after
invoking pfil hook. This may be useful for debugging.

MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D11804

6 years agoUse "Ibex Peak" codename for "5 Series/3400 Series" chipsets.
mav [Wed, 9 Aug 2017 12:21:17 +0000 (12:21 +0000)]
Use "Ibex Peak" codename for "5 Series/3400 Series" chipsets.

This is shorter and unifies naming with later chipsets.

MFC after: 1 week

6 years agoAdd new Intel Lewisburg and Union Point chipset PCI IDs.
mav [Wed, 9 Aug 2017 12:03:12 +0000 (12:03 +0000)]
Add new Intel Lewisburg and Union Point chipset PCI IDs.

While there, polish some old AHCI ones, since they are still reused.

MFC after: 1 week

6 years agoFix comment typo.
oleg [Wed, 9 Aug 2017 10:46:34 +0000 (10:46 +0000)]
Fix comment typo.

6 years agoPrint maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.
hselasky [Wed, 9 Aug 2017 10:32:51 +0000 (10:32 +0000)]
Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.
Useful for debugging.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agoIncrement queue drops in the network statistics when transmitted packets
hselasky [Wed, 9 Aug 2017 10:30:55 +0000 (10:30 +0000)]
Increment queue drops in the network statistics when transmitted packets
are dropped by the mlx4en(4) driver.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agoAdd support for RX and TX statistics when the mlx4en(4) PCI device
hselasky [Wed, 9 Aug 2017 10:27:21 +0000 (10:27 +0000)]
Add support for RX and TX statistics when the mlx4en(4) PCI device
is in VF or SRIOV mode typically in a virtual machine environment.

Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agoDo not loose CCB flags after r320493.
mav [Wed, 9 Aug 2017 09:13:15 +0000 (09:13 +0000)]
Do not loose CCB flags after r320493.

There is at least CAM_UNLOCKED that should be kept.

MFC after: 3 days

6 years agoCorrect sysctl names.
des [Wed, 9 Aug 2017 07:24:58 +0000 (07:24 +0000)]
Correct sysctl names.

6 years agohyperv/hn: Implement transparent mode network VF.
sephe [Wed, 9 Aug 2017 05:59:45 +0000 (05:59 +0000)]
hyperv/hn: Implement transparent mode network VF.

How network VF works with hn(4) on Hyper-V in transparent mode:

- Each network VF has a cooresponding hn(4).
- The network VF and the it's cooresponding hn(4) have the same hardware
  address.
- Once the network VF is attached, the cooresponding hn(4) waits several
  seconds to make sure that the network VF attach routing completes, then:
  o  Set the intersection of the network VF's if_capabilities and the
     cooresponding hn(4)'s if_capabilities to the cooresponding hn(4)'s
     if_capabilities.  And adjust the cooresponding hn(4) if_capable and
     if_hwassist accordingly. (*)
  o  Make sure that the cooresponding hn(4)'s TSO parameters meet the
     constraints posed by both the network VF and the cooresponding hn(4).
     (*)
  o  The network VF's if_input is overridden.  The overriding if_input
     changes the input packet's rcvif to the cooreponding hn(4).  The
     network layers are tricked into thinking that all packets are
     neceived by the cooresponding hn(4).
  o  If the cooresponding hn(4) was brought up, bring up the network VF.
     The transmission dispatched to the cooresponding hn(4) are
     redispatched to the network VF.
  o  Bringing down the cooresponding hn(4) also brings down the network
     VF.
  o  All IOCTLs issued to the cooresponding hn(4) are pass-through'ed to
     the network VF; the cooresponding hn(4) changes its internal state
     if necessary.
  o  The media status of the cooresponding hn(4) solely relies on the
     network VF.
  o  If there are multicast filters on the cooresponding hn(4), allmulti
     will be enabled on the network VF. (**)
- Once the network VF is detached.  Undo all damages did to the
  cooresponding hn(4) in the above item.

NOTE:
No operation should be issued directly to the network VF, if the
network VF transparent mode is enabled.  The network VF transparent mode
can be enabled by setting tunable hw.hn.vf_transparent to 1.  The network
VF transparent mode is _not_ enabled by default, as of this commit.

The benefit of the network VF transparent mode is that the network VF
attachment and detachment are transparent to all network layers; e.g. live
migration detaches and reattaches the network VF.

The major drawbacks of the network VF transparent mode:
- The netmap(4) support is lost, even if the VF supports it.
- ALTQ does not work, since if_start method cannot be properly supported.

(*)
These decisions were made so that things will not be messed up too much
during the transition period.

(**)
This does _not_ need to go through the fancy multicast filter management
stuffs like what vlan(4) has, at least currently:
- As of this write, multicast does not work in Azure.
- As of this write, multicast packets go through the cooresponding hn(4).

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11803

6 years agoAdd an entry to UPDATING for r322297 which restores the ability
mckusick [Wed, 9 Aug 2017 05:21:57 +0000 (05:21 +0000)]
Add an entry to UPDATING for r322297 which restores the ability
of fsck to automatically find alternate superblocks when the
standard one is trashed or unavailable.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11589

6 years agoSince the switch to GPT disk labels, fsck for UFS/FFS has been
mckusick [Wed, 9 Aug 2017 05:17:21 +0000 (05:17 +0000)]
Since the switch to GPT disk labels, fsck for UFS/FFS has been
unable to automatically find alternate superblocks. This checkin
places the information needed to find alternate superblocks to the
end of the area reserved for the boot block.

Filesystems created with a newfs of this vintage or later will
create the recovery information. If you have a filesystem created
prior to this change and wish to have a recovery block created for
your filesystem, you can do so by running fsck in forground mode
(i.e., do not use the -p or -y options). As it starts, fsck will
ask ``SAVE DATA TO FIND ALTERNATE SUPERBLOCKS'' to which you should
answer yes.

Discussed with: kib, imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11589

6 years agoIntroduce vm_page_grab_pages(), which is intended to replace loops calling
alc [Wed, 9 Aug 2017 04:23:04 +0000 (04:23 +0000)]
Introduce vm_page_grab_pages(), which is intended to replace loops calling
vm_page_grab() on consecutive page indices.  Besides simplifying the code
in the caller, vm_page_grab_pages() allows for batching optimizations.
For example, the current implementation replaces calls to vm_page_lookup()
on consecutive page indices by cheaper calls to vm_page_next().

Reviewed by: kib, markj
Tested by: pho (an earlier version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11926

6 years agoUpdate pl310 node in Armada 38x DTS to match the one used in Linux
mw [Wed, 9 Aug 2017 01:31:05 +0000 (01:31 +0000)]
Update pl310 node in Armada 38x DTS to match the one used in Linux

Since the cache controller nodes fixup is added to the platform code,
this patch aligns it to the Linux device tree representation.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11884

6 years agoEnable pl310 coherent operation in platform init for Armada 38x
mw [Wed, 9 Aug 2017 01:25:47 +0000 (01:25 +0000)]
Enable pl310 coherent operation in platform init for Armada 38x

Updating PL310 sotfware context sc_io_coherent field in
platform_pl310_init() routine for Armada 38x helps to avoid
using 'arm,io-coherent' property, which is by default not present
in the device tree node in Linux.

This way another step for DT unification between two operating
systems is done. The improvemnt will also work after enabling
PLATFORM for Marvell ARMv7 SoCs.

Reviewed by: andrew, cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11883

6 years agodf(1): Add --si as an alias for -H
kevans [Wed, 9 Aug 2017 01:24:52 +0000 (01:24 +0000)]
df(1): Add --si as an alias for -H

Reviewed by: cem (earlier version), emaste
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11749

6 years agoRemove clock-frequency properties from Armada 38x timer nodes
mw [Wed, 9 Aug 2017 01:20:53 +0000 (01:20 +0000)]
Remove clock-frequency properties from Armada 38x timer nodes

Since the timers' base frequency setting is added to the platform code,
this patch removes clock-frequency properties from global
and twd timers, aligning both to the Linux device tree.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11882

6 years agodu(1): Add --si option to display in terms of powers of 1000
kevans [Wed, 9 Aug 2017 01:19:19 +0000 (01:19 +0000)]
du(1): Add --si option to display in terms of powers of 1000

Reviewed by: cem (earlier version), emaste
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11748

6 years agoDynamically configure timers' base frequency for Armada 38x
mw [Wed, 9 Aug 2017 01:14:29 +0000 (01:14 +0000)]
Dynamically configure timers' base frequency for Armada 38x

Instead of using 'clock-frequency' device tree property for global/twd
mpcore timers of Armada 38x SoCs, set it in platform_late_init stage
with arm_tmr_change_frequency() function.

Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11881

6 years agoEnable using ofw_bus_find_compatible in early platform code
mw [Wed, 9 Aug 2017 01:06:40 +0000 (01:06 +0000)]
Enable using ofw_bus_find_compatible in early platform code

Before this patch function ofw_bus_find_compatible was using
memory allocations in order to find compatible node and the property's
length. This way there was always a suited buffer for property,
however this approach had also disadvantages - ofw_bus_find_compatible
couldn't be used when malloc is not available, e.g. during fdt fixup stage.

In order to remove the usage limitation of ofw_bus_find_compatible(),
this patch modifies the function to use ofw_bus_node_is_compatible()
(instead of the one without _int suffix), which uses a fixed
buffer on stack instead of dynamic allocations.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: nwhitehorn, cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11880

6 years agoregex(3): Refactor fast/slow stepping bits in the matching engine
kevans [Wed, 9 Aug 2017 01:04:36 +0000 (01:04 +0000)]
regex(3): Refactor fast/slow stepping bits in the matching engine

Adding features for matching is fairly straightforward, but this requires
some duplication because of this fast/slow setup. They can be fairly
trivially combined into a single walk(), so do it to make future additions
less error prone.

Reviewed by: cem (earlier version), emaste, pfg
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11233

6 years agoAdd support for "compatible" parameter in ofw_fdt_fixup
mw [Wed, 9 Aug 2017 00:56:29 +0000 (00:56 +0000)]
Add support for "compatible" parameter in ofw_fdt_fixup

Sometimes it's convenient to provide fixup to many boards
that use the same SoC family (eg. Marvell Armada 38x).
Instead of putting multiple entries in fdt_fixup_table,
use one entry which refers to all boards with given SoC.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: nwhitehorn, cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11878