[PATCH RFC] Upstream A64FX cache driver
tan.shaopeng
tan.shaopeng at jp.fujitsu.com
Wed Mar 3 09:38:22 GMT 2021
From: "tan.shaopeng" <tan.shaopeng at jp.fujitsu.com>
Hello,
This driver enables Fujitsu A64FX's cache function.
[Driver Description]
A64FX CPU has several functions for HPC workload and this driver is
for cache functions.
Loading this cache driver, control registers will be set to enable
these functions, and advanced settings registers will be set by default
values. After loading this driver, you can use the default values of the
advanced settings registers or set custom values to the advanced
settings registers from EL0. Unloading this driver, control registers
will be clear to disable these functions.
These functions include sector cache function and hardware prefetch
assistance function.
- Sector cache function:
Cache partitioning function which can control virtual cache capacity for
each characteristics of data such as temporal locality.
- Hardware prefetch assistance function:
Software can provide the hint for hardware prefetch mechanism to reduce
the penalty of the memory access. By providing the access pattern
through that function in advance, hardware prefetch mechanism can access
the complex pattern.
These functions can be executed according to the default values of the
registers which are set by the driver. Or they can be executed
according to a tag which is the upper 8 bits of the load/store address
of application to customize hardware prefetch and sector cache.
For more details of these functions,
see A64FX HPC extension specification in
https://github.com/fujitsu/A64FX
The driver is based on v5.11-rc2 and tested on FX1000 environment.
[RFC]
This function only performs register initialization for A64FX. At first,
I wanted to insert it to kernel initialization code, but there is no
initialization code except errata, so I made this driver.
I'd like to know if this approach is OK? Would you give me some advice?
Best regards,
Tan Shaopeng
tan.shaopeng (1):
soc: fujitsu: Add cache driver code
MAINTAINERS | 6 ++
arch/arm64/Kconfig.platforms | 5 +
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/fujitsu/Kconfig | 26 +++++
drivers/soc/fujitsu/fujitsu_cache.c | 183 ++++++++++++++++++++++++++++++++++++
6 files changed, 222 insertions(+)
create mode 100644 drivers/soc/fujitsu/Kconfig
create mode 100644 drivers/soc/fujitsu/fujitsu_cache.c
--
1.8.3.1
More information about the linux-arm-kernel
mailing list