Commit graph

289560 commits

Author SHA1 Message Date
Ed Maste
1755b9daa6 libcbor: vendor update to 0.11.0
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit abd872540f24cfc7dbd1ea29b6918c7082a22108)
2024-08-01 11:11:45 -04:00
Ed Maste
311f95ce3d mfc-candidates: move pretty printing into lua
d51c59002367 moved the MFC hash matching logic into a lua utility
script but left the output formatting in the shell script. Simplify this
slightly by just printing the formatted output from lua.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44836

(cherry picked from commit 793745fad866f65863ab3b16a17bdf18dc779efd)
2024-08-01 11:11:45 -04:00
Ed Maste
63cd0ebe4b mfc-candidates: fix output order with incorrect commit dates
Previously we obtained the list of MFC candidate hashes (i.e., those
commits only in the mfc-from branch), removed the already-merged
commits based on "cherry picked from" commit message entries, and then
printed the list sorted by commit time.  This is usually the correct
order, but it is not when commits have non-monotonically-increasing
commit times.  This is unfortunately the case for a number of commits in
our tree.  This made it difficult to merge some groups of dependent
commits in the correct order.

Instead, leave the from-list in git rev-parse order, and move the
matching logic to a new lua script.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44808

(cherry picked from commit d51c590023675ca20a7da74d75a3b5a5dcfdfddc)
2024-08-01 11:11:45 -04:00
Ed Maste
87f7f0389f etcupdate: temporarily comment out one tzsetup test
This test fails after tzsetup was changed to symlink rather than copy
the zoneinfo file (5e16809c953f).

(cherry picked from commit f72b4f7e149d82ef5b8ed7a3aa415fcd7603b350)
2024-08-01 11:11:45 -04:00
Ed Maste
fc43a1b684 tzsetup: symlink /etc/localtime instead of copying
Using a symlink means that new timezone data (installed by an errata
update, say) will be usable without having to be copied again.

Reviewed by:	bapt, kevans, philip
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37005

(cherry picked from commit 5e16809c953f4cd19fadb1767469dec319de0353)
2024-08-01 11:11:45 -04:00
Ed Maste
0673e7e370 tzsetup: Correct UTC description
UTC is Coordinated Universal Time, not Greenwich Mean Time.

Reviewed by:	imp, allanjude
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45573

(cherry picked from commit a16cb8709de7ddc6dd6ab71918af9fc5fd96f377)
2024-08-01 11:11:44 -04:00
Ed Maste
af20990e9d tzsetup: add detail for -s option
Skipping the UTC question via -s will not create or delete
/etc/wall_cmos_clock.

Reported by:	Tomoaki AOKI
Reviewed by:	imp, allanjude, jrm
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45576

(cherry picked from commit 70e3e1bde9bf0ddf7fc18b97487fe2d23d4fc5ed)
2024-08-01 11:11:44 -04:00
Ed Maste
7110def1b1 ktrace(1): add more xrefs
Following commit a87651e2ff18 add xrefs to intro(2) and sigaction(2),
and use a consistent form.

Suggested by:	kib, arrowd
Reviewed by:	kib (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45555

(cherry picked from commit 0277c0c6f72a964bf0439db1f4558551052e4f3b)
2024-08-01 10:57:48 -04:00
Ed Maste
ecd0ead063 ktrace(1): add xref to namei(9)
namei was mistaken for a typo (see GitHub pull request #1284).  Add an
xref to make it clear.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45546

(cherry picked from commit a87651e2ff189cec4c26cb220354f1bc93794f31)
2024-08-01 10:57:48 -04:00
Ed Maste
5dd58282db mptutil: correct man page date
PR:             279201
Fixes:          9a49a37929 ("mptutil: document that disabled/enab...")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit b128bedfb95c1fefe10e3375b07e200eff8c3664)
2024-08-01 10:55:29 -04:00
Ed Maste
4ad1f31430 splash(4): fix markup around cross-references
Fixes: 7504e0e3e517 ("splash(4): Document how to use splash screen ...")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 004d5af853bfef1eb66394a15ac9e94e6dcebc0a)
2024-08-01 10:53:03 -04:00
Warner Losh
59bfc69490 stand: Add "Loader needs updating" to the first menu item"
When the boot loader version is too old, add a warning to the boot menu
to maybe catch people's attention.

Use the correct loader code that adds an inactive highlighted menu item
indicating that an update is needed.

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D45890

(cherry picked from commit 0eac99f76ec31270f902cc2a0ff5ae4b5b606a65)
(cherry picked from commit 7cb65be96d47cbe0b740266bc633d272fc4c5e6b)
2024-08-01 08:49:54 -06:00
Warner Losh
53a4bf76c5 stand: Print a warning of the loader is too old
If the loader is < 3.0, print a warning that it's too old and needs to
be upgraded.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D45889

(cherry picked from commit a2fd7ae87991044ca283974ced8f6ed635d1cb0c)
2024-08-01 08:49:54 -06:00
Warner Losh
dd2cfed933 loader: Bump all versions to 3.0
Each incompatible change we make, we bump the major version. We've not
done the bump in a while, so sync everybody to 3.0. Anything older than
3.0 will be given a warning that their boot loader is too old. We check
only the major version, though, so minor versions can still be bumped
for individual loaders (though I honestly doubt we'll ever need to do
that again).

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D45888

(cherry picked from commit 9f7f90507528aaa9a2f54575c1d4f4010d01c2e5)
2024-08-01 08:49:54 -06:00
Warner Losh
7ffa3b0f69 Revert "loader/lua: Remove workaround for command_error"
This reverts commit 552f3072af54820cf1805f712e2567bc1b7f046d.

loader.command_error was added just after 11.2, but appears to not have
been back ported to 11.x. 11.0 was the first lua loader release, so keep
this compat shim until we sort out what to do.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D45883

(cherry picked from commit 809edb3636a5494ad7d3dfff910e0aab89d83442)
2024-08-01 08:49:54 -06:00
Warner Losh
598b9677b3 Revert "loader/lua: Remove compat shim for loader.lua_path"
This reverts commit ab97d42addae97a389c6f22d6bba62ed954bb8e7.

There's too many people in the field with FreeBSD 12.0 loader.efi that
stubbed their toe on upgrading to 14.1 since they'd not updated
loader.efi. While we sort out that mess, add back this workaround.  Can
revisit after 14.2 maybe.

MFC After: 		3 days
Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D45882

(cherry picked from commit 522a65a8d97a0d6b634266f1b4a89aa8f374279c)
2024-08-01 08:49:54 -06:00
Warner Losh
90ca43b5dc Revert "loader/lua: Remove pager shim"
This reverts commit 8b9178cd0d35ff2beafebdd51c8c44ba2b5aeb0f.

Really old loader.efi files persist in the field. Revert this to support
it. We need to support this through at least 14.2 now, alas.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D45881

(cherry picked from commit b38a82c77ab90eace53c56151b191efd1f4a8439)
2024-08-01 08:49:54 -06:00
Warner Losh
7a50c3f63f stand: Kill commented out line
This line is no longer needed as fallback, and should have been deleted
in 7870a52598 instead of commented out, but 26 years later, I have a
high degree of confidence that old change was right and we won't need
this line as a fallback.

Sponsored by:		Netflix
Reviewed by:		kevans, jhb
Differential Revision:	https://reviews.freebsd.org/D45880

(cherry picked from commit 65300ca729452f62c201baedcbb4a67f2afc5ed5)
2024-08-01 08:49:54 -06:00
Warner Losh
384215cb9a stand: Remove obsolete junk
We long ago changed newvers.sh to make these comments bogus.  Remove
them since every single one of them is broken after the $FreeBSD$
removal.

Sponsored by:		Netflix
Reviewed by:		kevans, jhb
Differential Revision:	https://reviews.freebsd.org/D45879

(cherry picked from commit 8165650389ba2d0a68cea6902ac3750055cad9da)
2024-08-01 08:49:53 -06:00
Warner Losh
b56cb540db stand: Stop building in fat, ext2fs, gzip and bzip to BIOS /boot/loader
This saves space to allow pxeboot to work again. Users desiring these
features can turn them on for their custom build. While these are useful
for some specialized applications, they aren't needed to boot the
typical system, and we're low on space.

          text    data     bss      dec       hex   filename
Before: 465866   20740   31612   518218   0x7e84a   loader_lua.bin
After:  441535   17484   31092   490111   0x77a7f   loader_lua.bin

Savings: 28,107 bytes

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D42416

(cherry picked from commit 195a96f0b303345818e09ad1d79dc80122804de8)
2024-08-01 08:49:53 -06:00
Jessica Clarke
9420f5d40d mitigations.7: Document riscv's SM[AE]P equivalents
Its base privileged architecture provides these. Read/write is
toggleable via the SUM bit, so use that as its feature name. Execute is
always-on so has no name.

(cherry picked from commit a5ae2d2ab409834c28e71b1dcde4ebcd0d9b3671)
2024-08-01 10:46:46 -04:00
Ed Maste
8b5df7e36a mitigations.7: move SSP documentation from security.7 to here
Stack Smashing Protection (SSP) is a software vulnerability mitigation,
and fits with this page.  Add a note to the beginning of security.7
providing a more explicit cross reference to mitigations.7.

Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45435

(cherry picked from commit 297bb39b6f0fcfc5d571dc77008eb7acf138d279)
2024-08-01 10:46:46 -04:00
Ed Maste
6f303355dc mitigations.7: uncomment reference to recently added section
A brief description of supervisor mode memory access protection was
added in 72ece341b427.  Uncomment the existing reference to this section
in the table of contents.

Fixes: 72ece341b427 ("mitigations.7: mention supervisor mode memory...")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 166ec3e86aa4a48bdf2a56ee065f0173bbb8f745)
2024-08-01 10:46:46 -04:00
Ed Maste
f8c73ba598 mitigations.7: mention supervisor mode memory access protections
Reviewed by:	imp (earlier), olce (earlier), kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45420

(cherry picked from commit 72ece341b42707af7837357dbb1f2c2fe17507fa)
2024-08-01 10:46:46 -04:00
Mark Johnston
72a1920e73 arm: Add evdev to the TEGRA124 config
This is required for the kernel to link after commit 13d00a43cba4.

Fixes:	13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs")
(cherry picked from commit d68d124817780db5f98f65ae02a7ce286cd426eb)
2024-08-01 10:06:08 +02:00
Michal Meloun
fb084dd01e Fix mismerge in lib/libthr/arch/riscv/include/pthread_md.h
Fixes:	bd774d7aa1
2024-07-31 20:27:05 +02:00
Michal Meloun
bd774d7aa1 libthr: Preresolve selected EABI symbols on arm.
Add the ability to pre-resolve architecture-specific EABI symbols and
use it on arm for selected EABI functions. These functions can be called
with rtld bind lock write-locked, so they should be resolved in forward.

Reported by:	Mark Millard <marklmi@yahoo.com>, John F Carr <jfc@mit.edu>
Reviewed by:	kib, imp
MFC after:	1 week
Differential Revision:  https://reviews.freebsd.org/D46104

(cherry picked from commit 5670b8cc3672d5a6bc2c41eb48d7d01343c43ad0)
2024-07-31 14:10:58 +02:00
Kristof Provost
3e1f815655 pf tests: ensure we don't confuse different ICMP types
When creating a state for ICMP (v4 or v6) packets we only used the ID, which
means that we could confuse different ICMP types. For example, if we allowed
neighbour discovery but not ICMPv6 echo requests an ND packet could create a
state that the echo request would match.

Test that this is now fixed.

Reported by:	Enrico Bassetti <e.bassetti@tudelft.nl>
MFC after:	1 day
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b9f0dbc3d006e0b904ee4275d54459f4edd65bb8)
2024-07-31 09:39:53 +02:00
Kristof Provost
3382c691dc pf: allow MLD LR to be sent without state
Change PF behavior to allow MLD Listener Report packets to be sent
without needing a previously created state by MLD Listener Query. It
wasn't working because: (1) you might not have a previous MLD Listener
Query and (2) the addresses of the Query and Report don't match.

ok mikeb@, sashan@

MFC after:	1 day
Obtained From:	OpenBSD, rzalamena <rzalamena@openbsd.org>, 5c526dbdb0f2
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2)
2024-07-31 09:39:53 +02:00
Kristof Provost
7f77305a5b pf: split ICMP/ICMPv6 number space in pf_icmp_mapping()
In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same
number space.  In fact they are independent and must be handled
separately.  Fix traceroute via pf by splitting pf_icmp_mapping()
into IPv4 and IPv6 sections.
ok henning@ mcbride@; tested mcbride@; sure deraadt@

MFC after:      1 day
Obtained From:  OpenBSD, bluhm <bluhm@openbsd.org> ef4bccd7509e
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 46755f52247bd34a7f013d6844ed0c673ac0defc)
2024-07-31 09:39:53 +02:00
Kristof Provost
c5081b8d39 pf: some ICMP types that also have icmp_id, pointed out by markus@
ok henning markus

MFC after:	1 day
Obtained From:	OpenBSD, mcbride <mcbride@openbsd.org> 8c0632cd274b
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2)
2024-07-31 09:39:53 +02:00
Kristof Provost
2f6b4611b5 pf: stricter state checking for ICMP and ICMPv6 packets
Include
the ICMP type in one port of the state key, using the type to determine which
side should be the id, and which should be the type.

Also:
- Handle ICMP6 messages which are typically sent to multicast addresses but
 recieve unicast replies, by doing fallthrough lookups against the correct
 multicast address.
- Clear up some mistaken assumptions in the PF code:
  - Not all ICMP packets have an icmp_id, so simulate one based on other
    data if we can, otherwise set it to 0.
 - Don't modify the icmp id field in NAT unless it's echo
 - Use the full range of possible id's when NATing icmp6 echoy

ok henning marco
testing matthieu todd

MFC after:	1 day
Obtained From:	OpenBSD, mcbride <mcbride@openbsd.org> 70bf7555ef4c
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 534ee17e61ee094ec175703bc50e88ff6587703e)
2024-07-31 09:39:53 +02:00
Dimitry Andric
96ff33484e Merge commit c80c09f3e380 from llvm-project (by Dimitry Andric):
[CalcSpillWeights] Avoid x87 excess precision influencing weight result

  Fixes #99396

  The result of `VirtRegAuxInfo::weightCalcHelper` can be influenced by
  x87 excess precision, which can result in slightly different register
  choices when the compiler is hosted on x86_64 or i386. This leads to
  different object file output when cross-compiling to i386, or native.

  Similar to 7af3432e22b0, we need to add a `volatile` qualifier to the
  local `Weight` variable to force it onto the stack, and avoid the excess
  precision. Define `stack_float_t` in `MathExtras.h` for this purpose,
  and use it.

This is the version of the fix for PR276961 that landed upstream.

PR:		276961
Reported by:	cperciva
MFC after:	3 days

(cherry picked from commit 1a4b8325f6e3a45c77188343da504fe04495cc46)
2024-07-31 09:29:47 +02:00
Dimitry Andric
5115838663 Revert "Fix llvm register allocator for native/cross build differences"
In preparation for applying the fix that landed upstream, this reverts
commit 397c2693fa66508cb5e6b173650a1f3bc6c4dd4f:

  Fix llvm register allocator for native/cross build differences

  Work around an issue in LLVM's register allocator, which can cause
  slightly different i386 object files, when produced by a native or cross
  build of clang.

  This adds another volatile qualifier to a float variable declaration in
  the weightCalcHelper() function, which otherwise produces slightly
  different float results on amd64 and i386 hosts. In turn, this can lead
  to different (but equivalent) register choices, and thus non-identical
  assembly code.

  See https://github.com/llvm/llvm-project/issues/99396 for more details.

  Note this is a temporary fix, meant to merge in time for 13.4. As soon
  as upstream has a permanent solution we will import that.

PR:		276961
Reported by:	cperciva
MFC after:	3 days

(cherry picked from commit 52552d7572a6d3d7d3ce0d6862de9a9d203c5d01)
2024-07-31 09:29:41 +02:00
Mark Johnston
bed96ef09d socket tests: Serialize sonewconn_overflow
It relies on being able inspect the dmesg buffer to see whether the
kernel logged certain messages.  If it's interleaved with tests that
generate large amounts of console output (e.g., GELI tests), then it can
fail spuriously.

MFC after:	2 weeks

(cherry picked from commit ab27e232b14c07317642a2e4c546c9b71bd9c00b)
2024-07-30 15:55:32 +00:00
Mark Johnston
fb8670d3f8 gnop tests: Serialize
Some of these tests make use of test disk devices, but then they can't
run in parallel.

MFC after:	2 weeks

(cherry picked from commit dc8357de606aa65fc1c35a43d4a5f1d706164ddb)
2024-07-30 15:55:32 +00:00
Mark Johnston
5437ef1dc1 libdtrace: Compute the relocation offset for all non-ET_REL objects
The use of an ifdef here most likely carries over from when the dtrace
port only worked on x86 platforms.

MFC after:	2 weeks
Sponsored by:	Innovate UK

(cherry picked from commit 7bbcbd43c53b49360969ca82b152fd6d971e9055)
2024-07-30 15:55:32 +00:00
Emmanuel Vadot
b0d27132b2 splash(4): Document how to use splash screen with vt(4)
Differential Revision:	https://reviews.freebsd.org/D45935
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 7504e0e3e517fe9f0c775b802f0eb30481b4c01d)
2024-07-29 18:37:44 +02:00
Emmanuel Vadot
619caaa1b5 loader: Load a splash screen if "splash" variable is defined
Load a splash screen that vt(4) can use if the "splash" env variable is defined.
For now only png is supported and decoding is done in loader and not in kernel
compared to splash screen support in sc(4).

For using this add:
boot_mute="YES"
splash="/boot/images/freebsd-logo-rev.png"
in loader.conf

Differential Revision:	https://reviews.freebsd.org/D45932
Reviewed by:		imp, tsoome
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 00460cc8c5ad02b628e81eec9e493a1df8393d36)
2024-07-29 18:37:44 +02:00
Emmanuel Vadot
82829e49e6 vt: splash: Use splash screen passed from loader
If loader(8) gives use a splash screen to use using the MODINFOMD_SPLASH
type, use it if RB_MUTE is set to "YES".
By design only argb data will be displayed.

Differential Revision:	https://reviews.freebsd.org/D45931
Reviewed by:		imp, tsoome
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit f6e8b0e85081681100bf9cd74423be02233204bc)
2024-07-29 18:37:44 +02:00
Emmanuel Vadot
014edaa360 linker: Add MODINFOMD_SPLASH type
This mod type and structure holds the splash screen data and metadata.

Differential Revision:	https://reviews.freebsd.org/D45930
Reviewed by:		tsoome
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 966e53a4e563da36d62edf57c2b0007921fec8dd)

splash: Add sys/types.h

To fix make test-includes

Fixes:		966e53a4e563 ("linker: Add MODINFOMD_SPLASH type")
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit e4fc2fd62a5e4afebfc466868eb3b17f9ba0ad57)
2024-07-29 18:37:42 +02:00
Emmanuel Vadot
01215ffec6 vt: Add vd_bitblt_argb
This blit an ARGB image on the dedicated vd.
This also adds vt_fb_bitblt_argb which will works for most of the vt backends

Differential Revision:	https://reviews.freebsd.org/D45929
Reviewed by:		tsoome
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit b93028d8cd3aafc883b5f0ecec65a8a2a30af7f3)
2024-07-29 18:37:12 +02:00
Emmanuel Vadot
ed956d5fcb stand: Fix logo alpha
The alpha wasn't done properly and some white stripes could be seen.

Differential Revision:	https://reviews.freebsd.org/D45933
Reviewed by:	imp. tsoome
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 887062c1da4a4c04a2b3987ec9a4e2a5902122d5)
2024-07-29 18:37:09 +02:00
Emmanuel Vadot
8e908fab6c conf: Add usbhid and hidbus to GENERIC* kernel configs
Include the new unified HID stack by default in generic.
This will allow us to migrate to the multi-stack hkbd and hms instead of
relying on the older ukbd and ums which only work with USB.
To test those drivers just add hw.usb.usbhid.enable=1 in loader.conf

Differential Revision:	https://reviews.freebsd.org/D45658
Reviewed by:	emaste, imp, wulf (all older version)
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 13d00a43cba4c35fcc9e0ab567baf530126a6348)

conf: hidmap is always needed for hms

So bring it in when hms is in the kernel config

Fixes:	13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs")
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 5ed91e788f0b97c9e6c544671ffef71fad7cad27)

conf: powerpc: Add evdev to some kernel configs

Fixes:	13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs")
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 43a62df0b464e60895084c7f9d9eddf70906fda3)
2024-07-29 18:36:42 +02:00
Li-Wen Hsu
2684490714 BSD.tests.dist: Add entry for mixer tests
Fixes:	94a86f3f6920 mixer(8): Add tests
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 21e98f6d195a5db63b17025f339684048834e1aa)
2024-07-29 18:34:55 +03:00
Christos Margiolis
695313daa3 sndstat.4: Fix typo
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46165

(cherry picked from commit f0eceecf5ab51a68d713f9a5a7f360964d0a49ce)
2024-07-29 18:34:55 +03:00
Christos Margiolis
a9e27006db sound: Simplify feeder_remove()
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D46100

(cherry picked from commit 00172d20070a544e0514cce9f94475c5525fd15e)
2024-07-29 18:34:55 +03:00
Christos Margiolis
9b5e6dfe18 sound: Remove unused defines from pcm/sound.h
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D45986

(cherry picked from commit f477d412530a8cb9d8e058d00189ce127584f6f6)
2024-07-29 18:34:55 +03:00
Christos Margiolis
a619d8c76c sound: Simplify chn_init()
- Remove unnecessary CHN_[UN]LOCKs.
- Improve device_printf() messages.
- Remove redundant checks.
- Remove 0 assignments, since the channel is allocated with M_ZERO.
- Re-organize sections in a more coherent way.
- Remove "out1" label, just return NULL directly.
- Rename "out2" to "fail" and simplify logic.
- Do not check the return value of dsp_unit2name(), as it is guaranteed
  not to fail (we pass a valid channel type).

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D45985

(cherry picked from commit 5b209e153b58515c0315f5902e18ecd7d75ecd2a)
2024-07-29 18:34:55 +03:00
Christos Margiolis
cbbc1f5db1 sound: Remove unused FEEDER_DEBUG
No functional change intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D45984

(cherry picked from commit c55f995502cbaa2d38b7a7003bc27805b28a6a29)
2024-07-29 18:34:55 +03:00