linux-hardened/drivers
Sudeep Holla 246246cbde drivers: base: support cpu cache information interface to userspace via sysfs
This patch adds initial support for providing processor cache information
to userspace through sysfs interface. This is based on already existing
implementations(x86, ia64, s390 and powerpc) and hence the interface is
intended to be fully compatible.

The main purpose of this generic support is to avoid further code
duplication to support new architectures and also to unify all the existing
different implementations.

This implementation maintains the hierarchy of cache objects which reflects
the system's cache topology. Cache devices are instantiated as needed as
CPUs come online. The cache information is replicated per-cpu even if they are
shared. A per-cpu array of cache information maintained is used mainly for
sysfs-related book keeping.

It also implements the shared_cpu_map attribute, which is essential for
enabling both kernel and user-space to discover the system's overall cache
topology.

This patch also add the missing ABI documentation for the cacheinfo sysfs
interface already, which is well defined and widely used.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-api@vger.kernel.org
Cc: linux390@de.ibm.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-ia64@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-s390@vger.kernel.org
Cc: x86@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 11:45:00 -08:00
..
accessibility
acpi cpumask: factor out show_cpumap into separate helper function 2014-11-07 11:45:00 -08:00
amba amba: drop owner assignment from platform_drivers 2014-10-20 16:20:16 +02:00
ata ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
atm atm: drop owner assignment from platform_drivers 2014-10-20 16:20:18 +02:00
auxdisplay
base drivers: base: support cpu cache information interface to userspace via sysfs 2014-11-07 11:45:00 -08:00
bcma bcma: add another PCI ID of device with BCM43228 2014-10-23 14:02:06 -04:00
block Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
bluetooth bluetooth: drop owner assignment from platform_drivers 2014-10-20 16:20:19 +02:00
bus bus: drop owner assignment from platform_drivers 2014-10-20 16:20:19 +02:00
cdrom
char Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
clk clk: x86: drop owner assignment from platform_drivers 2014-10-20 16:20:23 +02:00
clocksource ARM/ARM64: arch-timer: fix arch_timer_probed logic 2014-10-26 20:50:00 +01:00
connector
cpufreq Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
cpuidle Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
crypto crypto: ux500: hash: drop owner assignment from platform_drivers 2014-10-20 16:20:27 +02:00
dca
devfreq devfreq: exynos: drop owner assignment from platform_drivers 2014-10-20 16:20:27 +02:00
dio
dma dma: sh: drop owner assignment from platform_drivers 2014-10-20 16:20:29 +02:00
dma-buf dma-buf: don't open-code atomic_long_read() 2014-10-09 02:39:07 -04:00
edac Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
eisa
extcon extcon: drop owner assignment from platform_drivers 2014-10-20 16:20:30 +02:00
firewire
firmware Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
fmc
gpio gpio: drop owner assignment from platform_drivers 2014-10-20 16:20:31 +02:00
gpu Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-10-29 11:52:35 -07:00
hsi hsi: controllers: drop owner assignment from platform_drivers 2014-10-20 16:20:35 +02:00
hv
hwmon Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
hwspinlock hwspinlock: drop owner assignment from platform_drivers 2014-10-20 16:20:37 +02:00
i2c i2c: muxes: drop owner assignment from platform_drivers 2014-10-20 16:20:38 +02:00
ide ide: drop owner assignment from platform_drivers 2014-10-20 16:20:38 +02:00
idle
iio Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-10-31 15:04:58 -07:00
input Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
iommu iommu: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
ipack
irqchip irqchip: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
isdn isdn/gigaset: fix usb_gigaset write_cmd result race 2014-10-14 15:05:35 -04:00
leds Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
lguest
macintosh macintosh: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
mailbox Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
mcb
md . fix DM's long-standing excessive use of memory by leveraging the new 2014-10-18 12:25:30 -07:00
media Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
memory memory: drop owner assignment from platform_drivers 2014-10-20 16:20:52 +02:00
memstick memstick: host: drop owner assignment from platform_drivers 2014-10-20 16:20:53 +02:00
message SCSI for-linus on 20141007 2014-10-07 21:29:18 -04:00
mfd mfd: drop owner assignment from platform_drivers 2014-10-20 16:20:53 +02:00
misc Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
mmc mmc: host: drop owner assignment from platform_drivers 2014-10-20 16:20:56 +02:00
mtd Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
net Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
nfc nfc: drop owner assignment from platform_drivers 2014-10-20 16:21:19 +02:00
ntb ntb: Adding split BAR support for Haswell platforms 2014-10-17 07:08:51 -04:00
nubus
of drivers: of: add return value to of_reserved_mem_device_init() 2014-10-29 16:33:14 -07:00
oprofile
parisc Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 16:23:15 +02:00
parport parport: drop owner assignment from platform_drivers 2014-10-20 16:21:20 +02:00
pci cpumask: factor out show_cpumap into separate helper function 2014-11-07 11:45:00 -08:00
pcmcia pcmcia: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
phy
pinctrl pinctrl: vt8500: drop owner assignment from platform_drivers 2014-10-20 16:21:26 +02:00
platform platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
pnp PNP: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
power Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
powercap
pps pps: clients: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
ps3
ptp
pwm Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
rapidio
ras
regulator Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
remoteproc remoteproc: drop owner assignment from platform_drivers 2014-10-20 16:21:29 +02:00
reset reset: sti: drop owner assignment from platform_drivers 2014-10-20 16:21:30 +02:00
rpmsg
rtc Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
s390 Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
sbus sbus: char: drop owner assignment from platform_drivers 2014-10-20 16:21:32 +02:00
scsi Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
sfi
sh
sn
soc soc: ti: drop owner assignment from platform_drivers 2014-10-20 16:21:35 +02:00
spi Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
spmi spmi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
ssb This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
staging Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-10-21 13:06:38 -07:00
tc
thermal Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
thunderbolt
tty tty: serial: cpm_uart: drop owner assignment from platform_drivers 2014-10-20 16:21:46 +02:00
uio Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
usb Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
uwb
vfio IOMMU Updates for Linux v3.18 2014-10-15 07:23:49 +02:00
vhost
video Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
virt
virtio virtio: drop owner assignment from platform_drivers 2014-10-20 16:21:55 +02:00
vlynq
vme
w1 w1: masters: drop owner assignment from platform_drivers 2014-10-20 16:21:56 +02:00
watchdog Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
xen xen/pci: Allocate memory for physdev_pci_device_add's optarr 2014-10-23 16:24:02 +01:00
zorro zorro: drop owner assignment from platform_drivers 2014-10-20 16:21:57 +02:00
Kconfig
Makefile