mirror-linux/drivers
James Morse 9a697eff25 cacheinfo: Add arch hook to compress CPU h/w id into 32 bits for cache-id
Filesystems like resctrl use the cache-id exposed via sysfs to identify
groups of CPUs. The value is also used for PCIe cache steering tags. On
DT platforms cache-id is not something that is described in the
device-tree, but instead generated from the smallest CPU h/w id of the
CPUs associated with that cache.

CPU h/w ids may be larger than 32 bits.

Add a hook to allow architectures to compress the value from the devicetree
into 32 bits. Returning the same value is always safe as cache_of_set_id()
will stop if a value larger than 32 bits is seen.

For example, on arm64 the value is the MPIDR affinity register, which only
has 32 bits of affinity data, but spread accross the 64 bit field. An
arch-specific bit swizzle gives a 32 bit value.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Link: https://lore.kernel.org/r/20250711182743.30141-3-james.morse@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-16 15:04:27 +02:00
..
accel Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
accessibility
acpi Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
amba
android Char/Misc/IIO pull request for 6.16-rc1 2025-06-06 11:50:47 -07:00
ata ata: ahci: Disallow LPM for Asus B550-F motherboard 2025-06-17 11:11:39 +02:00
atm atm: atmtcp: Free invalid length skb in atmtcp_c_send(). 2025-06-17 18:42:44 -07:00
auxdisplay treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
base cacheinfo: Add arch hook to compress CPU h/w id into 32 bits for cache-id 2025-07-16 15:04:27 +02:00
bcma
block block-6.16-20250619 2025-06-19 23:29:35 -07:00
bluetooth Including fixes from bluetooth and wireless. 2025-06-12 09:50:36 -07:00
bus treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
cache
cdrom
cdx
char treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
clk I've recently moved computers (among other things) so I'm sending this from a 2025-05-30 09:15:40 -07:00
clocksource MFD for v6.16 2025-06-03 11:53:55 -07:00
comedi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
connector
counter Second set of Counter updates for 6.16 2025-05-24 08:29:32 +02:00
cpufreq Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
cpuidle Merge branch 'pm-cpuidle' 2025-05-30 20:21:36 +02:00
crypto treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
cxl sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
dax
dca
devfreq
dio
dma treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dma-buf udmabuf: use sgtable-based scatterlist wrappers 2025-06-11 13:18:07 +02:00
dpll
edac EDAC/igen6: Fix NULL pointer dereference 2025-06-18 20:19:45 +02:00
eisa
extcon
firewire treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
firmware sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
fpga
fsi sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
fwctl
gnss
gpio gpio: mlxbf3: only get IRQ for device instance 0 2025-06-18 12:19:39 +02:00
gpu zynqmp: don't bother with debugfs_file_{get,put}() in proxied fops 2025-07-09 13:30:28 +02:00
greybus treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hid sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
hsi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hte
hv hyperv-next for v6.16 2025-06-03 08:39:20 -07:00
hwmon hwmon: (ltc4282) avoid repeated register write 2025-06-16 06:30:58 -07:00
hwspinlock
hwtracing coresight: updates for Linux v6.16 2025-05-22 18:04:43 +02:00
i2c Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
i3c i3c: controllers do not need to depend on I3C 2025-05-24 22:49:07 +02:00
idle intel_idle: Update arguments of mwait_idle_with_hints() 2025-06-10 21:09:28 +02:00
iio sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
infiniband hfi1: get rid of redundant debugfs_file_{get,put}() 2025-07-09 13:30:28 +02:00
input sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
interconnect
iommu iommu/tegra: Fix incorrect size calculation 2025-06-13 17:02:31 +02:00
ipack
irqchip irqchip/ath79-misc: Fix missing prototypes warnings 2025-06-20 21:38:52 +02:00
isdn treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
leds sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
macintosh
mailbox treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mcb
md treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
media sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
memory treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
memstick treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
message
mfd MFD for v6.16 2025-06-03 11:53:55 -07:00
misc sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
mmc treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
most treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mtd Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
mux
net netronome: don't bother with debugfs_real_fops() 2025-07-09 13:30:28 +02:00
nfc treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ntb
nubus
nvdimm
nvme block-6.16-20250614 2025-06-14 09:25:22 -07:00
nvmem sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
of samples: rust: platform: Add property child and reference args examples 2025-06-25 17:48:41 +02:00
opp
parisc
parport treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
pci Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
pcmcia sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
peci
perf arm64 updates for 6.16 2025-05-28 14:55:35 -07:00
phy phy-for-6.16 2025-06-05 08:20:21 -07:00
pinctrl pinctrl: sunxi: dt: Consider pin base when calculating bank number from pin 2025-06-10 14:35:40 +02:00
platform Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
pmdomain
pnp
power sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
powercap
pps treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ps3
ptp Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
pwm pwm: axi-pwmgen: Fix handling of external clock 2025-06-06 13:16:50 -07:00
rapidio Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
ras
regulator regulator: fan53555: add enable_time support and soft-start times 2025-06-16 13:26:23 +01:00
remoteproc remoteproc updates for v6.16 2025-06-02 11:04:29 -07:00
reset
rpmsg
rtc treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
s390 Merge 6.16-rc3 into driver-core-next 2025-06-23 07:53:36 +02:00
sbus
scsi lpfc: don't use file->f_path.dentry for comparisons 2025-07-09 13:31:09 +02:00
sh
siox
slimbus
soc soc: drivers for 6.16 2025-05-31 07:53:30 -07:00
soundwire soundwire updates for 6.16 2025-06-05 08:07:24 -07:00
spi spi: tegra210-qspi: Remove cache operations 2025-06-13 17:30:56 +01:00
spmi
ssb
staging debugfs_get_aux(): allow storing non-const void * 2025-07-09 13:30:29 +02:00
target scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port() 2025-06-16 14:35:57 -04:00
tc
tee
thermal fix tt_command_write() 2025-07-09 13:30:29 +02:00
thunderbolt
tty treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ufs Merge branch '6.16/scsi-queue' into 6.16/scsi-fixes 2025-06-09 15:34:06 -04:00
uio Char/Misc/IIO pull request for 6.16-rc1 2025-06-06 11:50:47 -07:00
usb sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
vdpa vdpa/octeon_ep: Control PCI dev enabling manually 2025-05-27 10:27:53 -04:00
vfio pci-v6.16-changes 2025-06-04 11:26:17 -07:00
vhost virtio, vhost: features, fixes 2025-05-29 08:15:35 -07:00
video sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
virt sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
virtio virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
w1 sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
watchdog treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
xen xen/x86: fix initial memory balloon target 2025-05-23 07:09:00 +02:00
zorro sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
Kconfig
Makefile