diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-08-16 12:19:40 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-01-08 12:32:57 +0000 |
commit | 89bd517231e0e23e2eb347868a43b7d9cfa959ad (patch) | |
tree | 4e212e9a65e2d064bb42f6c373fa010d1d2491e7 | |
parent | 8e9cb373d575562e31f98310961d4f71db56a98b (diff) |
arm64: make clean_dcache_range_nopatch() visible
When we hook into the kernel text patching code, we will need to call
clean_dcache_range_nopatch() to ensure that the patching of the
replicated kernel text is properly visible to other CPUs. Make this
function available to the replication code.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | arch/arm64/include/asm/cacheflush.h | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/alternative.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h index fefac75fa009..f94255db1c75 100644 --- a/arch/arm64/include/asm/cacheflush.h +++ b/arch/arm64/include/asm/cacheflush.h @@ -104,6 +104,8 @@ static inline void flush_icache_range(unsigned long start, unsigned long end) } #define flush_icache_range flush_icache_range +void clean_dcache_range_nopatch(u64 start, u64 end); + /* * Copy user data from/to a page which is mapped into a different * processes address space. Really, we want to allow our "user diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c index 8ff6610af496..ea3f4104771d 100644 --- a/arch/arm64/kernel/alternative.c +++ b/arch/arm64/kernel/alternative.c @@ -121,7 +121,7 @@ static noinstr void patch_alternative(struct alt_instr *alt, * accidentally call into the cache.S code, which is patched by us at * runtime. */ -static noinstr void clean_dcache_range_nopatch(u64 start, u64 end) +noinstr void clean_dcache_range_nopatch(u64 start, u64 end) { u64 cur, d_size, ctr_el0; |