FreeBSD/src e495998 — sys/dev/clk clk_fixed.h clk_fixed.c

FDT, clk_fixed: add gated-fixed-clock support and deferred initialization

- Add CLK_TYPE_GATED_FIXED with GPIO-based gate control.
- Support optional vdd-supply regulator.
- Delay clknode registration until parent clock and other dependencies
  are present (via new_pass).

While I'm in, switch license header to the new SPDX format.

MFC after:      2 weeks
Reviewed by:    manu
Differential Revision:  https://reviews.freebsd.org/D58103
DeltaFile
+335-81sys/dev/clk/clk_fixed.c
+5-22sys/dev/clk/clk_fixed.h
+340-1032 files

FreeBSD/src 06e5b04 — tests/sys/sound sndstat.c mmap.c

sound tests: Check the return value of close(2)

While here, remove two munmap(2) calls on mappings the tests require to
have failed, since they are practically dead.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60800

(cherry picked from commit eb36c35ccf83ea94d46a3bcb282c01ceeaeb3bab)
DeltaFile
+5-5tests/sys/sound/polling.c
+2-6tests/sys/sound/mmap.c
+2-2tests/sys/sound/sndstat.c
+9-133 files

FreeBSD/src 1f94158 — sys/dev/sound/pcm sound.h dsp.c

sound: Let pcm_unregister() tear down a partially initialized device

Since 3107b952f534 ("sound: Merge PCM_ALIVE() with PCM_REGISTERED()"),
pcm_unregister() is gated on PCM_REGISTERED(), so it cannot run unless
pcm_register() has already succeeded, which means drivers will leak
resources if a failure happened prior to this.

Reintroduce PCM_ALIVE(), but test dev rather than the lock. pcm_init()
assigns dev before anything else, so it can tell us whether pcm_init()
has run or not. Make sure to clear it in pcm_unregister() so that a
second call to pcm_unregister() cannot double-free.

While here, publish to sndstat(4) only once pcm_register() has
succeeded.

Reported by:    jah
Fixes:          3107b952f534 ("sound: Merge PCM_ALIVE() with PCM_REGISTERED()")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

    [4 lines not shown]
DeltaFile
+6-4sys/dev/sound/pcm/sound.c
+8-1sys/dev/sound/pcm/dsp.c
+2-2sys/dev/sound/pcm/sound.h
+16-73 files

FreeBSD/src 9291bb1 — sys/dev/virtio/network if_vtnetvar.h if_vtnet.c

virtio_net: Use bus_dma for command/ack buffers

(cherry picked from commit ea130fa32099ea7e0c03702efdec28e745ea6ef1)
DeltaFile
+285-65sys/dev/virtio/network/if_vtnet.c
+6-0sys/dev/virtio/network/if_vtnetvar.h
+291-652 files

FreeBSD/src 87bba0a — sys/amd64/amd64 trap.c

amd64 FRED: enable interrupts after user EXTINTs and NMIs

(cherry picked from commit 91d9fbb6e1537009c35ec0c1c37ca09b28c0b31d)
DeltaFile
+3-3sys/amd64/amd64/trap.c
+3-31 files

FreeBSD/src 6695c6b — sys/dev/virtio/network if_vtnetvar.h if_vtnet.c

virtio_net: Use bus_dma for rxq/txq buffers

(cherry picked from commit 8193fa3b8e1a9425bd8ac8b707cab565816b8584)
DeltaFile
+281-17sys/dev/virtio/network/if_vtnet.c
+10-0sys/dev/virtio/network/if_vtnetvar.h
+291-172 files

FreeBSD/src d3040b1 — sys/amd64/amd64 genassym.c exception.S

amd64 FRED: use symbolic constant for the NMI unblocking bit for ERETS

(cherry picked from commit 614b6597e7025b5b1dd23f058e53e8c28dc28efe)
DeltaFile
+2-1sys/amd64/amd64/exception.S
+1-0sys/amd64/amd64/genassym.c
+3-12 files

FreeBSD/src 4604502 — sys/amd64/amd64 genassym.c exception.S, sys/cddl/dev/dtrace/amd64 dtrace_asm.S

amd64 FRED: fix dtrace fbt

(cherry picked from commit cf4ff7bd369e42fb0a1c6f5cf2dc4fa7a990158e)
DeltaFile
+12-6sys/cddl/dev/dtrace/amd64/dtrace_asm.S
+12-0sys/amd64/amd64/exception.S
+4-0sys/amd64/amd64/genassym.c
+28-63 files

FreeBSD/src eb91ae9 — sys/amd64/amd64 trap.c

amd64 FRED: get out of NMI blocking mode unconditionally

(cherry picked from commit 880d2991661de74e1f800db867dc9d0eda7b1bc9)
DeltaFile
+1-1sys/amd64/amd64/trap.c
+1-11 files

FreeBSD/src a9a3c58 — sys/amd64/amd64 trap.c

amd64 FRED: handle INT 3, INT 4, and INT 0x92 same as for IDT

(cherry picked from commit 32b9c967e07c7af2b6e421969d0e7ba1cc9b9425)
DeltaFile
+16-0sys/amd64/amd64/trap.c
+16-01 files

FreeBSD/src c393a13 — sys/amd64/amd64 trap.c

amd64 FRED: fix handling of ATPIC IRQ range when no atpic is configured

(cherry picked from commit bf074ee97407f24c200613470b3b7a24ce5a5242)
DeltaFile
+4-4sys/amd64/amd64/trap.c
+4-41 files

FreeBSD/src 94816f6 — sys/amd64/amd64 trap.c

amd64: add helpers to set up thread state on trap

(cherry picked from commit 7f49a62e3c5ff15d87afcce9ab7fe787319a3f7f)
DeltaFile
+17-8sys/amd64/amd64/trap.c
+17-81 files

FreeBSD/src 5a87d01 — sys/amd64/amd64 trap.c

amd64 FRED: re-wrap the comment

(cherry picked from commit 0213bd5e5639e855d4039212f0f3f6ad89c6d65a)
DeltaFile
+3-3sys/amd64/amd64/trap.c
+3-31 files

FreeBSD/src 0ecc788 — sys/amd64/amd64 exception.S

amd64 FRED: explain why %rax is saved early

(cherry picked from commit 6105e8589b2cd7f9001df045392c30fc86900633)
DeltaFile
+4-0sys/amd64/amd64/exception.S
+4-01 files

FreeBSD/src 2c85ff5 — sys/amd64/amd64 machdep.c

amd64 FRED: normalize the user-provided 'fred' knob value

(cherry picked from commit 78962f9b66d1f84b957ddac3f528f184ba1f4739)
DeltaFile
+2-0sys/amd64/amd64/machdep.c
+2-01 files

FreeBSD/src 7dc8a9b — sys/amd64/amd64 db_trace.c

amd64 db_nextframe(): classify user_fred_syscall frame as SYSCALL

(cherry picked from commit b2767c7b022a8d7c03af8ee1b0fcd20d855d5433)
DeltaFile
+2-2sys/amd64/amd64/db_trace.c
+2-21 files

FreeBSD/src ab2a454 — sys/amd64/amd64 trap.c

amd64 FRED: mark trap frame as initialized for KASAN/KMSAN

(cherry picked from commit 1c25a7f1cb2986901957cc1cdf7a0c0f99748a35)
DeltaFile
+6-0sys/amd64/amd64/trap.c
+6-01 files

FreeBSD/src 7effd5b — sys/amd64/amd64 trap.c

amd64 FRED: add missed newline in the diagnostic

(cherry picked from commit 0cfbb34a12e59851b0eba2c6671e39cb05095e29)
DeltaFile
+1-1sys/amd64/amd64/trap.c
+1-11 files

FreeBSD/src 06a534c — sys/amd64/amd64 trap.c

amd64 FRED: clear %dr6 on #DB from kernel

(cherry picked from commit 837bb27c93a58a2df2f5203393ffa245b93caf31)
DeltaFile
+8-0sys/amd64/amd64/trap.c
+8-01 files

FreeBSD/src a15c346 — sys/amd64/amd64 exception.S

amd64 FRED: no need to store fs/gsbase on user_fred_not_syscall path

(cherry picked from commit 6ca697360b53ce4f952d2b178c5d34f75f8c50ec)
DeltaFile
+0-6sys/amd64/amd64/exception.S
+0-61 files

FreeBSD/src 74e7965 — sys/amd64/amd64 trap.c

amd64: strictly enforce the caller's mode for FRED 64bit syscall handler in C

(cherry picked from commit dcc5adb27e3b00f003c2256a9e9aa2fcc20c4d32)
DeltaFile
+2-1sys/amd64/amd64/trap.c
+2-11 files

FreeBSD/src 2efebd0 — sys/amd64/amd64 trap.c

amd64 FRED: handle in-kernel faults same as IDT

(cherry picked from commit efb0c54c7694798214a2c130ec8461a34444e1c4)
DeltaFile
+11-2sys/amd64/amd64/trap.c
+11-21 files

FreeBSD/src d5d2aee — sys/amd64/amd64 cpu_switch.S

amd64 resumectx(): restore FRED state before loading %cr4

(cherry picked from commit 2fd12bf2dd9c1cf997ce2505bc2af10572ca70e2)
DeltaFile
+19-16sys/amd64/amd64/cpu_switch.S
+19-161 files

FreeBSD/src 06d35e7 — sys/amd64/amd64 exception.S

amd64: fixes for register handling of syscall entry for FRED

(cherry picked from commit 473cd1bba9b4e80b741769ff6185ba3846b1f050)
DeltaFile
+4-2sys/amd64/amd64/exception.S
+4-21 files

FreeBSD/src ae5ad9c — sys/amd64/amd64 io.c, sys/amd64/linux linux_machdep.c

amd64: do not allow to set IOPL to 3 when FRED is used

(cherry picked from commit 5bc997b6f5b1265ff28d11405eb980bf471c3db4)
DeltaFile
+12-4sys/amd64/amd64/io.c
+3-0sys/dev/vt/vt_core.c
+3-0sys/dev/syscons/syscons.c
+3-0sys/amd64/linux32/linux32_machdep.c
+3-0sys/amd64/linux/linux_machdep.c
+24-45 files

FreeBSD/src 4a52b96 — sys/amd64/amd64 trap.c

amd64: Make the SYSENTER and INTn action same as for IDT case.

(cherry picked from commit 73b3fb41e67a11f18b9b63a5265e174e4b688661)
DeltaFile
+23-7sys/amd64/amd64/trap.c
+23-71 files

FreeBSD/src 6aa36e5 — sys/amd64/amd64 genassym.c exception.S

amd64: do not pass SYSENTER frame to FRED fast syscall handler

(cherry picked from commit 8671e823b7678731cd1aaf8850ccde4a2c293527)
DeltaFile
+4-4sys/amd64/amd64/exception.S
+6-0sys/amd64/amd64/genassym.c
+10-42 files

FreeBSD/src d855bc6 — sys/amd64/amd64 trap.c

trap_fred_handle_k_exc(): handle #AC in kernel

(cherry picked from commit e86a612d77ab34ecd96cce5fd0732999ffdd7fc0)
DeltaFile
+4-0sys/amd64/amd64/trap.c
+4-01 files

FreeBSD/src 4d7f2bc — sys/kern kern_descrip.c

fdcopy(): properly update fd_freefile when skipping non-copyable fd

PR:     300234

(cherry picked from commit 99a58803f9a306253df36c82f11991bc1e36e5a5)
DeltaFile
+5-2sys/kern/kern_descrip.c
+5-21 files

FreeBSD/src b9fba0c — sys/amd64/amd64 initcpu.c

amd64_cpu_init_fred(): set stack level for NMI and not #NM

(cherry picked from commit 787e2e411d2a169fd28581f9bbf1e87c51757303)
DeltaFile
+3-3sys/amd64/amd64/initcpu.c
+3-31 files