mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
powerpc/64: Fix flush_(d|i)cache_range() called from modules
commit8f5f525d5bupstream. When the kernel is compiled to use 64bit ABIv2 the _GLOBAL() macro does not include a global entry point. A function's global entry point is used when the function is called from a different TOC context and in the kernel this typically means a call from a module into the vmlinux (or vice-versa). There are a few exported asm functions declared with _GLOBAL() and calling them from a module will likely crash the kernel since any TOC relative load will yield garbage. flush_icache_range() and flush_dcache_range() are both exported to modules, and use the TOC, so must use _GLOBAL_TOC(). Fixes:721aeaa9fd("powerpc: Build little endian ppc64 kernel with ABIv2") Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
24d945d479
commit
fba7546bbe
@@ -67,7 +67,7 @@ PPC64_CACHES:
|
|||||||
* flush all bytes from start through stop-1 inclusive
|
* flush all bytes from start through stop-1 inclusive
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_GLOBAL(flush_icache_range)
|
_GLOBAL_TOC(flush_icache_range)
|
||||||
BEGIN_FTR_SECTION
|
BEGIN_FTR_SECTION
|
||||||
PURGE_PREFETCHED_INS
|
PURGE_PREFETCHED_INS
|
||||||
blr
|
blr
|
||||||
@@ -120,7 +120,7 @@ EXPORT_SYMBOL(flush_icache_range)
|
|||||||
*
|
*
|
||||||
* flush all bytes from start to stop-1 inclusive
|
* flush all bytes from start to stop-1 inclusive
|
||||||
*/
|
*/
|
||||||
_GLOBAL(flush_dcache_range)
|
_GLOBAL_TOC(flush_dcache_range)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flush the data cache to memory
|
* Flush the data cache to memory
|
||||||
|
|||||||
Reference in New Issue
Block a user