kern.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit bcd0d76d4882dd8d19a49c050411b5c58a0deb74)
bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit d577b4ed588c0f259d7298188233b17dc0435dd4)
Merge commit 1f332ae4f1b3 from llvm-project (by Alexander Kornienko):
Fix -Wformat diagnostic after #190965 (#193704)
Fixes libunwind compiler diagnostic when building with clang after
034d4dcad6396d1241e8262e69871b8d61da7e4f:
```
In file included from libunwind/src/libunwind.cpp:31:
In file included from libunwind/src/UnwindCursor.hpp:52:
libunwind/src/CompactUnwinder.hpp:339:46: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
338 | "function starting at 0x%llX",
| ~~~~
| %lX
339 | compactEncoding, functionStart);
| ^~~~~~~~~~~~~
libunwind/src/config.h:215:63: note: expanded from macro '_LIBUNWIND_DEBUG_LOG'
215 | #define _LIBUNWIND_DEBUG_LOG(msg, ...) _LIBUNWIND_LOG(msg, __VA_ARGS__)
| ~~~ ^~~~~~~~~~~
libunwind/src/config.h:181:45: note: expanded from macro '_LIBUNWIND_LOG'
[23 lines not shown]
kern.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit bcd0d76d4882dd8d19a49c050411b5c58a0deb74)
bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit d577b4ed588c0f259d7298188233b17dc0435dd4)
Merge commit 1f332ae4f1b3 from llvm-project (by Alexander Kornienko):
Fix -Wformat diagnostic after #190965 (#193704)
Fixes libunwind compiler diagnostic when building with clang after
034d4dcad6396d1241e8262e69871b8d61da7e4f:
```
In file included from libunwind/src/libunwind.cpp:31:
In file included from libunwind/src/UnwindCursor.hpp:52:
libunwind/src/CompactUnwinder.hpp:339:46: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
338 | "function starting at 0x%llX",
| ~~~~
| %lX
339 | compactEncoding, functionStart);
| ^~~~~~~~~~~~~
libunwind/src/config.h:215:63: note: expanded from macro '_LIBUNWIND_DEBUG_LOG'
215 | #define _LIBUNWIND_DEBUG_LOG(msg, ...) _LIBUNWIND_LOG(msg, __VA_ARGS__)
| ~~~ ^~~~~~~~~~~
libunwind/src/config.h:181:45: note: expanded from macro '_LIBUNWIND_LOG'
[23 lines not shown]
Fix statement with no effect in linuxkpi's xarray.h
When compiling the kernel with gcc 14, errors similar to the following
are emitted:
sys/dev/cxgbe/iw_cxgbe/ev.c: In function 'c4iw_ev_handler':
sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
132 | flags == 0; \
sys/dev/cxgbe/iw_cxgbe/ev.c:274:17: note: in expansion of macro 'xa_unlock_irqrestore'
274 | xa_unlock_irqrestore(&dev->cqs, flag);
| ^~~~~~~~~~~~~~~~~~~~
sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
132 | flags == 0; \
sys/dev/cxgbe/iw_cxgbe/ev.c:283:17: note: in expansion of macro 'xa_unlock_irqrestore'
283 | xa_unlock_irqrestore(&dev->cqs, flag);
| ^~~~~~~~~~~~~~~~~~~~
It looks like the intent of the "flags == 0" statement was to make the
'flags' macro argument not unused, but it still results in a warning.
[5 lines not shown]
ec2-desktop: Don't enable firstboot_pkgs
We don't have any packages to install by default when the instance
first boots, so (as with the "small" flavour) don't enable the
firstboot_pkgs script. If someone wants to launch a desktop with
packages autoinstalled at first boot, they can enable the script at
the same time as they provide the list of packages.
Sponsored by: Amazon
ec2-desktop: Fix shell expansion in ec2_setpass
Using a backtick inside a backtick-expansion isn't a good idea; switch
instead to using $( ... ).
Fixes: a9710349513f ("EC2: Add desktop flavour")
Sponsored by: Amazon
acpidump: Add decoding of the MSDM table
Add support for dumping the Microsoft Data Management (MSDM) table,
which contains the Windows product key embedded in firmware by the OEM.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D59662
bhyvectl: support querying VM pid
Extend bhyvectl(8) to support querying VM pid using the
`--get-vm-pid` flag.
This is useful in monitor mode when the VM pid differs
from the main bhyve(8) process run by the user. Knowing the VM pid
is necessary, for example, to query process resource usage or
trigger ACPI shutdown with SIGTERM.
Of course, it could be obtained by matching the monitor process
children by the process title, but it's a little more complex
and fragile than it could be.
Implement that by adding the "get_vm_pid" IPC command,
and using it to implement `bhyvectl --get-vm-pid`, which
prints the VM PID.
When the VM PID is not known, ESRCH is returned.
[4 lines not shown]
UPDATING: bump __FreeBSD_version to 1501503 for LinuxKPI changes
The size of multiple embedded structs have changed and may lead to
problems (pci_error_handlers in pci_driver, dev_pm_info in struct device).
Allow these changes to be detected by bumping __FreeBSD_version.
(cherry picked from commit e1ad124136deb4f270d4cef759bf9e9debdb17d3)
LinuxKPI: 802.11: Always lock around lkpi_80211_mo_{remove_interface,stop}()
Add the missing locking to another two MO driver downcalls, as drivers
always expect it (e.g. rtw89 by assertion).
Add the lock and might_sleep assertions to the respective lkpi_80211_mo_*
downcalls.
PR: 298417
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D59608
(cherry picked from commit 73166d21bd831db264509cbdce1ab3b63ab5b189)
LinuxKPI: add can_wakeup option and accessor functions
We can implement device_set_wakeup_capable() in the !CONFIG_PM_SLEEP
case; we do not have the infrastructure in place for the CONFIG_PM_SLEEP
case so leave a pr_debug TODO.
Needed by an upcoming wireless driver.
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D58883
(cherry picked from commit a424fb3519ebf8fb972e7ba45ba19df322992b00)
LinuxKPI: add PCI_IRQ_AFFINITY #define
Add the #define for PCI_IRQ_AFFINITY and leave a pr_debug note in
pci_alloc_irq_vectors() that it is unimplemented.
The flag is needed by an upcoming WiFi driver.
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D58881
(cherry picked from commit b589e403a2c3bd2a94fb2ab88cd23255c68a9f05)
LinuxKPI: pci: add pci_select_bars() and pci_msix_vec_count()
For pci_select_bars() we use the LinuxKPI internal information, while
for pci_select_bars() we fall back to the native PCI stack.
Needed by a wifi driver.
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D58878
(cherry picked from commit 55c07af60172b211116be47010fc0831aafc99e8)
LinuxKPI: implement dma_{alloc,free}_{noncoherent,attrs}
We use one to implement the other given direction stays unused.
This is needed by an upcoming wifi driver.
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D58880
(cherry picked from commit c3fa17a6a331db8aad03e9cb89ba97e1811ab381)
LinuxKPI: fix argument type to lkpi_pci_msi_desc_alloc()
lkpi_pci_msi_desc_alloc() takes an unsigned int, not an int.
While here make sure the prototype is visibile in interrupt.h as
well before use to avoid -Wimplicit-function-declaration errors.
Discovered while working on a wireless driver.
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D58879
(cherry picked from commit cfb23b01e269e8a0a84066637b82b746f01b46b4)
LinuxKPI: rcu: add optional condition to list_for_each_entry_rcu()
list_for_each_entry_rcu() can take an optional condition. Add the
macro argument so code remains compiling but do not do anything with
it just yet.
Leave comments as list_for_each_entry_rcu() likely should have a
different implementation.
Sponsored by: The FreeBSD Foundation
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D59292
(cherry picked from commit e975ce86ff11a330128f5b21c7cd11c28d3aff87)