ahci(4): Add another device ID for Marvell 9128 SATA controller: 0x91a3
This was encountered on a Gigabyte GA-P55A-UD4 motherboard identifying itself
as:
ahci0 at pci0:2:0:0: class=0x01018f rev=0x11 hdr=0x00 vendor=0x1b4b device=0x91a3 subvendor=0x1458 subdevice=0xb000
vendor = 'Marvell Technology Group Ltd.'
class = mass storage
subclass = ATA
The physical chip has "88SE9128-NAA2" printed on it.
Similar code has been in Linux for a long time:
https://github.com/torvalds/linux/commit/50be5e3657cd2851a297dc0b3fd459f25829d29b
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 288526
Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56464
[2 lines not shown]
ahci(4): Add another device ID for Marvell 9128 SATA controller: 0x91a3
This was encountered on a Gigabyte GA-P55A-UD4 motherboard identifying itself
as:
ahci0 at pci0:2:0:0: class=0x01018f rev=0x11 hdr=0x00 vendor=0x1b4b device=0x91a3 subvendor=0x1458 subdevice=0xb000
vendor = 'Marvell Technology Group Ltd.'
class = mass storage
subclass = ATA
The physical chip has "88SE9128-NAA2" printed on it.
Similar code has been in Linux for a long time:
https://github.com/torvalds/linux/commit/50be5e3657cd2851a297dc0b3fd459f25829d29b
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 288526
Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56464
[2 lines not shown]
ahci(4): Add another device ID for Marvell 9128 SATA controller: 0x91a3
This was encountered on a Gigabyte GA-P55A-UD4 motherboard identifying itself
as:
ahci0 at pci0:2:0:0: class=0x01018f rev=0x11 hdr=0x00 vendor=0x1b4b device=0x91a3 subvendor=0x1458 subdevice=0xb000
vendor = 'Marvell Technology Group Ltd.'
class = mass storage
subclass = ATA
The physical chip has "88SE9128-NAA2" printed on it.
Similar code has been in Linux for a long time:
https://github.com/torvalds/linux/commit/50be5e3657cd2851a297dc0b3fd459f25829d29b
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 288526
Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56464
[2 lines not shown]
linuxkpi: Define `DEFINE_XARRAY*()` macros
The `DEFINE_XARRAY*()` macros are used to declare a static xarray.
As the structure embeds a mutex(9), we also need to declare the static
mutex after the `struct xarray`. Thus the slightly awkward definition
of `DEFINE_XARRAY_FLAGS()`.
The DRM generic code started to use `DEFINE_XARRAY_ALLOC()` in Linux
6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56446
linuxkpi: Add `copy_from_user_inatomic_nontemporal()` function
In Linux 7.1, `__copy_from_user_inatomic_nocache()` was renamed to
`copy_from_user_inatomic_nontemporal()`. This change was backported to
several LTS branches.
This includes Linux 6.12.x and the i915 DRM driver started to use it in
that version.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56719
linuxkpi: Add `struct xa_limit` support to xarray
The `xa_alloc*()` functions family takes a `struct xa_limit` to describe
the range of IDs the caller wants to allocate. We were using a single
mask to qualify a maximum ID only.
This commit changes that to use the same `struct xa_limit`. The logic
did not change, except it now supports a minimum ID as well.
The definition of `XA_LIMIT()` macro is adapted, as well as the
definitions of `xa_limit_*` (only `xa_limit_32b` existed, the other two
are added with this commit).
The DRM generic code started to use this `struct xa_limit` in Linux
6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56445
preload: add "show preload" DDB command
This is the DDB equivalent of the debug.dump_modinfo sysctl which
outputs pretty-printed bootloader metadata.
Move sbuf_db_printf_drain to subr_prf.c and expose it for general use.
Reviewed By: jmg
Differential Revision: https://reviews.freebsd.org/D53763
geom_part: Restore the human readable format of size
Prior to the change 4f809ffec69c, the sizes are formated by
humanize_number(3) with the flag HN_DECIMAL, which displays the result
using one decimal place when it is less than 10. That is more accurate
and useful. Add equivalent field modifier hn-decimal to xo_emit() to
restore the previous behavior.
Reported by: Mark Millard
Reviewed by: js
Fixes: 4f809ffec69c gpart: add libxo support for "show" subcommand + man page updates
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56514
(cherry picked from commit 0d16792c6e983005581ed0176ed81e7302582196)
(cherry picked from commit d2bf940ec1447ca69ed605395455d07facf4d3ca)
geom_part: Restore the human readable format of size
Prior to the change 4f809ffec69c, the sizes are formated by
humanize_number(3) with the flag HN_DECIMAL, which displays the result
using one decimal place when it is less than 10. That is more accurate
and useful. Add equivalent field modifier hn-decimal to xo_emit() to
restore the previous behavior.
Reported by: Mark Millard
Reviewed by: js
Fixes: 4f809ffec69c gpart: add libxo support for "show" subcommand + man page updates
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56514
(cherry picked from commit 0d16792c6e983005581ed0176ed81e7302582196)
asmc: replace hardcoded model table with universal probing
Probe SMC keys at attach time to detect hardware capabilities,
supporting all Intel Apple machines without per-model entries.
Sensors are discovered by scanning sorted SMC key ranges for
known prefixes and types. Capabilities such as SMS, fan safe
speed, and ambient light are detected by key presence.
A global key description table provides human-readable names
for well-known temperature sensors.
Tested on:
- MacBook Pro (Early 2007, Mid 2014, Mid 2015)
- MacBook Air (Early 2015, Mid 2017)
- iMac (Mid 2011, Late 2013)
- Mac mini (Mid 2011)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D56405
powerpc/pic: Add a PIC_AP_INIT() to set up AP PIC info
pc_cpuid may not match the PIC's idea of a given CPU. Since openpic
has a WHOAMI register, we can use that to get the PIC's idea of the CPU.
This needs to be done on each AP, so add a PIC_AP_INIT device method so
the PIC can perform any AP-specific initialization at AP bootstrap time.
This fixes SMP on e6500, which is still lacking SMT support.
Differential Revision: https://reviews.freebsd.org/D56421
powerpc/openpic: Increase the maximum number of IRQs allowed
The Freescale MPIC supports up to 2048 IRQs, but since we only build an
array of 768 interrupts in intr_machdep, clamp the max at 512. The most
any Freescale PowerPC chip actually supports is 452 on the T4240, so 512
is sufficient.
As part of this, increase the vector mask to the full openpic vector
mask, and use this limit as the terminator for the dispatch loop,
instead of a hard-coded 255.
Differential Revision: https://reviews.freebsd.org/D56422
tcp: release nic ktls send tags when entering time wait
When under heavy load or churn, inline ktls offload NICs may run out
of hardware resources described by ktls send tags. Rather than
waiting for connections to pass through the time_wait state, reclaim
the ktls send tags early, at entry to time_wait. By preventing
potentially tens or hundreds of thousands of sessions from holding
send tags in time_wait, this allows more ktls sessions to be offloaded
to hardware.
Reviewed by: glebius, kib, nickbanks_netflix.com, rrs, tuexen
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D56610
linuxkpi: Implement __GFP_THISNODE in alloc_pages()
It indicates to `alloc_pages()` to allocate the pages from the current
NUMA domain. If it couldn't, it should not retry elsewhere and return
failure.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 06a51a510a60ca29193b2cdb8120b630ea9ef18c)
linuxkpi: Define `GFP_KERNEL_ACCOUNT` flag
This flag combines `GFP_KERNEL` and `__GFP_ACCOUNT`. The latter is also
defined in this commit. It is defined as a no-op flag as it is not
implemented.
The DRM generic code started to use it in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit af01ffbfb1c0a0104d3a4c7dd1342ed7c81c6c54)
linuxkpi: Move `GENMASK()` to <linux/bits.h>
... from <linux/bitops.h>.
This matches the location on Linux.
<linux/bits.h> is also included from <linux/bitops.h>. Therefore it will
not break anything.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 47e1ca7f3720c76fdc729e03034fa53c798b9318)
linuxkpi: Add `pci_dev_is_disconnected()`
For now, it is an empty stub that always return false. On Linux, it
looks at an internal error state of the device to determine if it is
disconnected.
The amdgpu DRM driver started this in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 43b47418e769df02f43f2b4636dd5c7516fa51f8)
linuxkpi: Define `min_array()` and `max_array()`
They are macros that return the minimum or maximum values of an array of
integers. They assume that the array contains elements.
The i915 DRM driver started to use `min_array()` in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 9a2de1d2042d1c2730dd3049c26d481813b5f2bd)
linuxkpi: Add `memdup_array_user()`
The amdgpu DRM driver started this in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 5dfbc6593cdacd5b4e4939e09d595b3a9c8e47da)
linuxkpi: Move `ARRAY_SIZE` to <linux/array_size.h>
The DRM generic code started to import this header directly in Linux
6.12.x. Let's move the definition of `ARRAY_SIZE()` (the only thing that
<linux/array_size.h> defines) to this header.
Also, include <linux/array_size.h> from the same headers as Linux. This
includes <linux/kernel.h>, so the change should not break anything.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 1c641d0436e377c57a767e37f56ce65253817d67)
linuxkpi: Add Linux 6.12 variant of `kvrealloc()`
In Linux 6.12, the API changed to be closer to `krealloc()`:
* The function does not take the old size anymore
* The function becomes a wrapper around `krealloc()` with a fallback
mechanism.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit d74fa49d0c0476353af137d22b5ef8711c67b854)
linuxkpi: Move {lower,upper}_32_bits macros to <linux/wordpart.h>
... from <linux/compiler.h>.
<linux/wordpart.h> is the header defining them on Linux 6.12 (I didn't
check older versions).
<linux/wordpart.h> is also included from <linux/kernel.h>.
The DRM generic code started to depend on <linux/wordpart.h> in Linux
6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 0a2f3b8ef16786a44fc88afd8862920df4527a3c)
linuxkpi: Add `rb_add()`
It is the same as `rb_add_cached()` but it works on `struct rb_root`, not
a `struc rb_root_cached`. It also does not return anything.
The DRM generic code started to use this in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit cff716c2854c167ef7ff3a4785f5faed9b0a4f98)