FreeBSD/src f8167e0sys/amd64/amd64 cpu_switch.S efirt_support.S, sys/dev/mpr mpr_ioctl.h

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
DeltaFile
+0-4sys/dev/mpr/mpr_ioctl.h
+0-4sys/dev/mps/mps_ioctl.h
+0-2sys/amd64/amd64/cpu_switch.S
+0-2sys/amd64/amd64/efirt_support.S
+0-2sys/amd64/amd64/exception.S
+0-2sys/amd64/amd64/locore.S
+0-163,795 files not shown
+0-7,6063,801 files

FreeBSD/src 95ee289sys/dev/flash mx25lreg.h, sys/dev/fxp if_fxpreg.h if_fxpvar.h

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
DeltaFile
+0-4sys/dev/mpr/mpr_ioctl.h
+0-4sys/dev/mps/mps_ioctl.h
+0-2sys/dev/flash/mx25lreg.h
+0-2sys/dev/fxp/if_fxpreg.h
+0-2sys/dev/fxp/if_fxpvar.h
+0-2sys/dev/fxp/inphyreg.h
+0-163,592 files not shown
+0-7,2003,598 files

FreeBSD/src caa41f6include bitstring.h complex.h, sys/dev/qlxge qls_isr.c

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:         pfg
MFC After:              3 days
Sponsored by:           Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
DeltaFile
+2-2sys/dev/qlxge/qls_isr.c
+2-2sys/xen/xenbus/xenbusb.h
+1-1include/bitstring.h
+1-1include/complex.h
+1-1include/cpio.h
+1-1include/elf-hints.h
+8-85,432 files not shown
+5,440-5,4405,438 files

FreeBSD/src 4d846d2lib/libc/stdio wscanf.c xprintf_errno.c, sys/dev/qlxge qls_isr.c

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:         pfg
MFC After:              3 days
Sponsored by:           Netflix
DeltaFile
+2-2sys/dev/qlxge/qls_isr.c
+2-2sys/xen/xenbus/xenbusb.h
+1-1lib/libc/stdio/wscanf.c
+1-1lib/libc/stdio/xprintf_errno.c
+1-1lib/libc/stdio/xprintf_hexdump.c
+1-1lib/libc/stdio/xprintf_quote.c
+8-85,571 files not shown
+5,579-5,5795,577 files

FreeBSD/src f8e8a06 (r366622)lib/libc/gen arc4random.h arc4random.c, sys/dev/random/fenestrasX fx_brng.c

random(4) FenestrasX: Push root seed version to arc4random(3)

Push the root seed version to userspace through the VDSO page, if
the RANDOM_FENESTRASX algorithm is enabled.  Otherwise, there is no
functional change.  The mechanism can be disabled with
debug.fxrng_vdso_enable=0.

arc4random(3) obtains a pointer to the root seed version published by
the kernel in the shared page at allocation time.  Like arc4random(9),
it maintains its own per-process copy of the seed version corresponding
to the root seed version at the time it last rekeyed.  On read requests,
the process seed version is compared with the version published in the
shared page; if they do not match, arc4random(3) reseeds from the
kernel before providing generated output.

This change does not implement the FenestrasX concept of PCPU userspace
generators seeded from a per-process base generator.  That change is
left for future discussion/work.


    [3 lines not shown]
DeltaFile
+67-0lib/libc/gen/arc4random.h
+66-0sys/kern/kern_sharedpage.c
+38-0lib/libc/gen/arc4random.c
+20-0sys/dev/random/fenestrasX/fx_brng.c
+15-0sys/sys/vdso.h
+15-0lib/libc/gen/auxv.c
+221-015 files not shown
+246-1621 files

FreeBSD/src 9464e1e (r365428)sys/sys vdso.h

Fix vdso compat32 timekeeping on !=x86.

Since x86 is the only 32-bit arch that has a 32-bit time_t, adjust the
private bintime32 struct in vdso to only use a 32 bit sec on amd64.

This matches the existing behavior in the compat code.

Noticed while implementing vdso timekeeping on powerpc.

This should also theoretically fix vdso timekeeping for arm binaries on
aarch64.

See tools attached to https://reviews.freebsd.org/D26347 for testing.

Reviewed by:    kib (in irc)
Sponsored by:   Tag1 Consulting, Inc.
DeltaFile
+8-0sys/sys/vdso.h
+8-01 files

FreeBSD/src 4ab2e06 (r331722)sys/dev/altera/atse if_atse.c, sys/dev/altera/avgen altera_avgen.c

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
DeltaFile
+555-222sys/mips/beri/beri_pic.c
+26-212sys/dev/altera/avgen/altera_avgen.c
+68-129sys/dev/sound/pci/hdspe-pcm.c
+42-116sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c
+16-109sys/dev/cfe/cfe_ioctl.h
+47-56sys/dev/altera/atse/if_atse.c
+754-8446,810 files not shown
+1,982-15,6676,816 files

FreeBSD/src be5d0b9 (r330897)sys/arm/arm pl190.c, sys/arm/versatile versatile_sic.c

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:     pfg
DeltaFile
+238-571sys/mips/beri/beri_pic.c
+178-61sys/arm/arm/pl190.c
+212-26sys/dev/altera/avgen/altera_avgen.c
+209-24sys/arm/versatile/versatile_sic.c
+129-68sys/dev/sound/pci/hdspe-pcm.c
+116-42sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c
+1,082-7926,829 files not shown
+16,022-1,9906,835 files

FreeBSD/src c4e20ca (r326256)sys/sys pctrie.h _stack.h

sys/sys: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
DeltaFile
+3-1sys/sys/pctrie.h
+3-1sys/sys/_stack.h
+3-1sys/sys/_pthreadtypes.h
+3-1sys/sys/_pctrie.h
+2-0sys/sys/_mutex.h
+2-0sys/sys/fail.h
+16-4151 files not shown
+318-4157 files

FreeBSD/src 9119684 (r311376)include Makefile, lib/libc/x86/sys __vdso_gettc.c

MFC 310048,310101,310239

310048
    hyperv: Implement "enlightened" time counter, which is rdtsc based.

    Reviewed by:    kib
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8763

310101
    hyperv: Allow userland to ro-mmap reference TSC page

    This paves way to implement VDSO for the enlightened time counter.

    Reviewed by:    kib
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8768

310239

    [8 lines not shown]
DeltaFile
+176-0sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c
+73-0lib/libc/x86/sys/__vdso_gettc.c
+27-5sys/dev/hyperv/include/hyperv.h
+8-0include/Makefile
+5-0sys/dev/hyperv/vmbus/hyperv_reg.h
+2-0sys/sys/vdso.h
+291-51 files not shown
+292-57 files

FreeBSD/src fff5be0 (r310239)lib/libc/x86/sys __vdso_gettc.c, sys/dev/hyperv/vmbus/amd64 hyperv_machdep.c

hyperv: Implement userspace gettimeofday(2) with Hyper-V reference TSC

This 6 times gettimeofday performance, as measured by
tools/tools/syscall_timing

Reviewed by:    kib
MFC after:      1 week
Sponsored by:   Microsoft
Differential Revision:  https://reviews.freebsd.org/D8789
DeltaFile
+73-0lib/libc/x86/sys/__vdso_gettc.c
+18-3sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c
+2-0sys/sys/vdso.h
+1-0sys/x86/include/vdso.h
+94-34 files

FreeBSD/src 0abcae4 (r305866)lib/libc/amd64/sys __vdso_gettc.c, lib/libc/i386/sys __vdso_gettc.c

MFC r304285:
Implement userspace gettimeofday(2) with HPET timecounter.
DeltaFile
+179-0lib/libc/x86/sys/__vdso_gettc.c
+0-114lib/libc/i386/sys/__vdso_gettc.c
+0-70lib/libc/amd64/sys/__vdso_gettc.c
+25-12sys/x86/x86/tsc.c
+36-0sys/dev/acpica/acpi_hpet.c
+16-7lib/libc/sys/__vdso_gettimeofday.c
+256-20319 files not shown
+341-26625 files

FreeBSD/src ed04e0c (r304817)contrib/sqlite3 sqlite3.c, contrib/sqlite3/tea configure

MFhead @ r304815
DeltaFile
+149,126-148,694sys/dev/qlxgbe/ql_fw.c
+11,997-3,431contrib/sqlite3/sqlite3.c
+9,977-0contrib/sqlite3/tea/configure
+4,276-0contrib/sqlite3/tea/generic/tclsqlite3.c
+4,168-0contrib/sqlite3/tea/tclconfig/tcl.m4
+2,777-0secure/lib/libcrypto/arm/sha256-armv4.S
+182,321-152,125634 files not shown
+225,314-184,142640 files

FreeBSD/src 65e1b13 (r304538)sys/contrib/cloudabi cloudabi_vdso_aarch64.c cloudabi_vdso_x86_64.c, sys/dev/ie if_ie.c

Merge ^/head r304236 through r304536.
DeltaFile
+149,126-148,694sys/dev/qlxgbe/ql_fw.c
+0-2,664sys/dev/si/si3_t225.c
+0-2,620sys/dev/wl/if_wl.c
+916-1,468sys/contrib/cloudabi/cloudabi_vdso_aarch64.c
+808-1,234sys/contrib/cloudabi/cloudabi_vdso_x86_64.c
+0-1,700sys/dev/ie/if_ie.c
+150,850-158,380350 files not shown
+164,989-177,957356 files

FreeBSD/src 1680854 (r304285)lib/libc/amd64/sys __vdso_gettc.c, lib/libc/i386/sys __vdso_gettc.c

Implement userspace gettimeofday(2) with HPET timecounter.

Right now, userspace (fast) gettimeofday(2) on x86 only works for
RDTSC.  For older machines, like Core2, where RDTSC is not C2/C3
invariant, and which fall to HPET hardware, this means that the call
has both the penalty of the syscall and of the uncached hw behind the
QPI or PCIe connection to the sought bridge.  Nothing can me done
against the access latency, but the syscall overhead can be removed.
System already provides mappable /dev/hpetX devices, which gives
straight access to the HPET registers page.

Add yet another algorithm to the x86 'vdso' timehands. Libc is updated
to handle both RDTSC and HPET.  For HPET, the index of the hpet device
to mmap is passed from kernel to userspace, index might be changed and
libc invalidates its mapping as needed.

Remove cpu_fill_vdso_timehands() KPI, instead require that
timecounters which can be used from userspace, to provide
tc_fill_vdso_timehands{,32}() methods.  Merge i386 and amd64

    [13 lines not shown]
DeltaFile
+179-0lib/libc/x86/sys/__vdso_gettc.c
+0-114lib/libc/i386/sys/__vdso_gettc.c
+0-70lib/libc/amd64/sys/__vdso_gettc.c
+25-12sys/x86/x86/tsc.c
+36-0sys/dev/acpica/acpi_hpet.c
+16-7lib/libc/sys/__vdso_gettimeofday.c
+256-20319 files not shown
+341-26625 files

FreeBSD/src b626f5a (r293172)share/colldef zh_Hans_CN.UTF-8.src, sys/dev/ispfw asm_2400.h

MFH r289384-r293170

Sponsored by:   The FreeBSD Foundation
DeltaFile
+250,654-0tools/tools/locale/etc/final-maps/map.UTF-8
+71,629-0share/colldef/zh_Hans_CN.UTF-8.src
+63,490-0tools/tools/locale/etc/charmaps/GB18030.TXT
+59,905-0tools/tools/locale/etc/final-maps/map.GB18030
+42,878-0tools/tools/locale/etc/final-maps/widths.txt
+14,251-28,449sys/dev/ispfw/asm_2400.h
+502,807-28,4497,052 files not shown
+1,398,688-268,0007,058 files

FreeBSD/src 8d4f972 (r291354)sys/dev/ispfw asm_2322.h asm_2300.h

Catch up with head.
DeltaFile
+7,488-7,467sys/dev/ispfw/asm_2322.h
+7,626-6,903sys/dev/ispfw/asm_2300.h
+5,182-4,722sys/dev/ispfw/asm_2200.h
+0-2,554sys/dev/ispfw/asm_1080.h
+0-2,545sys/dev/ispfw/asm_12160.h
+0-2,072sys/dev/ispfw/asm_1040.h
+20,296-26,263702 files not shown
+29,171-32,753708 files

FreeBSD/src 5e27d79 (r291171)sys/amd64/amd64 elf_machdep.c, sys/compat/ia32 ia32_sysvec.c

Split kerne timekeep ABI structure vdso_sv_tk out of the struct
sysentvec.  This allows the timekeep data to be shared between similar
ABIs which cannot share sysentvec.

Make the timekeep_push_vdso() tick callback to the timekeep structures
instead of sysentvecs.  If several sysentvec share the vdso_sv_tk
structure, we would update the userspace data several times on each
tick, without the change.

Only allocate vdso_sv_tk in the exec_sysvec_init() sysinit when
sysentvec is marked with the new SV_TIMEKEEP flag.  This saves
allocation and update of unneeded vdso_sv_tk for ABIs which do not
provide userspace gettimeofday yet, which are PowerPCs arches right
now.

Make vdso_sv_tk allocator public, namely split out and export
alloc_sv_tk() and alloc_sv_tk_compat32().  ABIs which share timekeep
data now can allocate it manually and share as appropriate.


    [4 lines not shown]
DeltaFile
+79-46sys/kern/kern_sharedpage.c
+9-0sys/sys/vdso.h
+3-4sys/sys/sysent.h
+2-1sys/i386/i386/elf_machdep.c
+1-1sys/compat/ia32/ia32_sysvec.c
+1-1sys/amd64/amd64/elf_machdep.c
+95-536 files

FreeBSD/src 98e0ffa (r283595)contrib/ntp CommitLog configure, contrib/ntp/sntp configure

Merge sync of head
DeltaFile
+177,242-8,203contrib/ntp/CommitLog
+29,219-17,107contrib/ntp/configure
+27,253-11,174contrib/ntp/sntp/configure
+10,723-13,061sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu
+13,910-7,059contrib/sqlite3/sqlite3.c
+0-20,513contrib/texinfo/doc/texinfo.txi
+258,347-77,11719,075 files not shown
+2,720,252-1,303,07719,081 files

FreeBSD/src 9f3d45b (r278383)sys/contrib/vchiq/interface/vchiq_arm vchiq_core.c vchiq_arm.c, sys/dev/drm2/i915 intel_display.c intel_pm.c

Merge from HEAD
DeltaFile
+3,826-2,640sys/dev/wpi/if_wpi.c
+1,079-3,330sys/dev/drm2/i915/intel_display.c
+3,842-0sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
+3,788-0sys/dev/drm2/i915/intel_pm.c
+3,043-26tools/build/mk/OptionalObsoleteFiles.inc
+2,810-0sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c
+18,388-5,996881 files not shown
+54,647-20,646887 files

FreeBSD/src 4771295 (r277719)contrib/libxo/libxo libxo.c, sys/dev/drm2/i915 intel_display.c intel_pm.c

Merge ^/head r277327 through r277718.
DeltaFile
+1,079-3,330sys/dev/drm2/i915/intel_display.c
+3,788-0sys/dev/drm2/i915/intel_pm.c
+1,399-920sys/dev/drm2/i915/i915_gem.c
+1,106-707sys/dev/drm2/i915/i915_irq.c
+973-156contrib/libxo/libxo/libxo.c
+531-518sys/kern/kern_timeout.c
+8,876-5,631556 files not shown
+26,330-14,722562 files

FreeBSD/src 57de838 (r277556)sys/dev/drm2/i915 intel_display.c intel_pm.c, sys/kern kern_timeout.c

MFhead @ r277555
DeltaFile
+1,079-3,330sys/dev/drm2/i915/intel_display.c
+3,788-0sys/dev/drm2/i915/intel_pm.c
+1,399-920sys/dev/drm2/i915/i915_gem.c
+1,106-707sys/dev/drm2/i915/i915_irq.c
+531-518sys/kern/kern_timeout.c
+299-681sys/dev/drm2/i915/i915_dma.c
+8,202-6,156252 files not shown
+16,440-12,288258 files

FreeBSD/src d1b1b60 (r277406)sys/kern kern_tc.c subr_dummy_vdso_tc.c, sys/sys vdso.h

Update the vdso timehands only via tc_windup().

Prior to this change CLOCK_MONOTONIC could go backwards when the timecounter
hardware was changed via 'sysctl kern.timecounter.hardware'. This happened
because the vdso timehands update was missing the special treatment in
tc_windup() when changing timecounters.

Reviewed by:    kib
DeltaFile
+11-4sys/kern/kern_tc.c
+7-6sys/x86/x86/tsc.c
+6-2sys/sys/vdso.h
+3-2sys/kern/subr_dummy_vdso_tc.c
+27-144 files

FreeBSD/src cfe30d0 (r251991)contrib/apr configure, contrib/apr-util configure

Merge fresh head.
DeltaFile
+140,456-0contrib/sqlite3/sqlite3.c
+83,644-0sys/contrib/dev/ath/ath_hal/ar9300/osprey_reg_map_macro.h
+66,519-0sys/contrib/dev/ath/ath_hal/ar9300/scorpion_reg_map_macro.h
+65,039-0tools/tools/cxgbetool/reg_defs_t5.c
+37,786-0contrib/apr-util/configure
+30,720-0contrib/apr/configure
+424,164-014,987 files not shown
+2,853,377-989,56014,993 files

FreeBSD/src d241a0e (r247353)contrib/expat configure, contrib/ldns configure ltmain.sh

IFC @247348.
DeltaFile
+8,388-17,778contrib/openbsm/configure
+0-22,017contrib/expat/configure
+18,892-0contrib/ldns/configure
+6,303-4,236contrib/openbsm/aclocal.m4
+6,457-3,763contrib/openbsm/config/ltmain.sh
+9,661-0contrib/ldns/ltmain.sh
+49,701-47,7945,939 files not shown
+444,763-188,1955,945 files

FreeBSD/src da156df (r246775)lib/libc/arm/sys __vdso_gettc.c, lib/libc/ia64/sys __vdso_gettc.c

MFC r246117:
Rework the __vdso_* symbols attributes to only make the symbols weak,
but use normal references instead of weak. This makes the statically
linked binaries to use fast gettimeofday(2) by forcing the linker to
resolve references and providing the neccessary functions.
DeltaFile
+48-0lib/libc/powerpc64/sys/__vdso_gettc.c
+48-0lib/libc/arm/sys/__vdso_gettc.c
+48-0lib/libc/ia64/sys/__vdso_gettc.c
+48-0lib/libc/mips/sys/__vdso_gettc.c
+48-0lib/libc/powerpc/sys/__vdso_gettc.c
+48-0lib/libc/sparc64/sys/__vdso_gettc.c
+288-011 files not shown
+326-1017 files

FreeBSD/src d9a4475 (r246555)contrib/llvm/tools/clang/lib/Rewrite RewriteModernObjC.cpp, contrib/llvm/tools/clang/lib/Rewrite/Frontend RewriteModernObjC.cpp

Sync with HEAD.
DeltaFile
+8,388-17,778contrib/openbsm/configure
+6,303-4,236contrib/openbsm/aclocal.m4
+6,457-3,763contrib/openbsm/config/ltmain.sh
+7,982-0contrib/openbsm/m4/libtool.m4
+7,607-0contrib/llvm/tools/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp
+0-7,543contrib/llvm/tools/clang/lib/Rewrite/RewriteModernObjC.cpp
+36,737-33,3205,398 files not shown
+322,757-153,0445,404 files

FreeBSD/src 150facd (r246117)lib/libc/arm/sys __vdso_gettc.c, lib/libc/ia64/sys __vdso_gettc.c

Rework the __vdso_* symbols attributes to only make the symbols weak,
but use normal references instead of weak.  This makes the statically
linked binaries to use fast gettimeofday(2) by forcing the linker to
resolve references and providing the neccessary functions.

Reported by:    bde
Tested by:      marius (sparc64)
MFC after:      2 weeks
DeltaFile
+48-0lib/libc/powerpc/sys/__vdso_gettc.c
+48-0lib/libc/sparc64/sys/__vdso_gettc.c
+48-0lib/libc/arm/sys/__vdso_gettc.c
+48-0lib/libc/ia64/sys/__vdso_gettc.c
+48-0lib/libc/mips/sys/__vdso_gettc.c
+48-0lib/libc/powerpc64/sys/__vdso_gettc.c
+288-011 files not shown
+326-1017 files

FreeBSD/src 2309036 (r242545)contrib/atf configure, contrib/libpcap configure

Sync from head
DeltaFile
+23,433-23,159sys/dev/ispfw/asm_2400.h
+19,872-19,627sys/dev/ispfw/asm_2500.h
+19,965-0contrib/atf/configure
+6,523-6,086sys/dev/ispfw/asm_2300.h
+11,961-0sys/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu
+3,114-6,882contrib/libpcap/configure
+84,868-55,7549,206 files not shown
+1,041,974-374,1439,212 files

FreeBSD/src b6127d1 (r240815)sys/kern kern_exec.c kern_tc.c, sys/powerpc/include vdso.h

MFC r237433:
Implement mechanism to export some kernel timekeeping data to
usermode, using shared page.

MFC r237474:
Stop updating the struct vdso_timehands from even handler executed in
the scheduled task from tc_windup(). Do it directly from tc_windup in
interrupt context.
DeltaFile
+113-31sys/kern/kern_exec.c
+122-0sys/sys/vdso.h
+64-0sys/kern/kern_tc.c
+49-0sys/kern/subr_dummy_vdso_tc.c
+42-0sys/x86/include/vdso.h
+41-0sys/powerpc/include/vdso.h
+431-3115 files not shown
+636-3321 files