diff mbox

[01/28] ARM: export __flush_dcache_area()

Message ID 20170130183153.28566-2-andre.przywara@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andre Przywara Jan. 30, 2017, 6:31 p.m. UTC
The ability to clean a cache line is not only useful for EFI, but will
be needed later for the ITS support.
Export the function to be usable from the whole Xen/ARM code.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 xen/arch/arm/efi/efi-boot.h | 1 -
 xen/include/asm-arm/cache.h | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Julien Grall Feb. 6, 2017, 11:23 a.m. UTC | #1
Hi Andre,

On 30/01/17 18:31, Andre Przywara wrote:
> The ability to clean a cache line is not only useful for EFI, but will
> be needed later for the ITS support.
> Export the function to be usable from the whole Xen/ARM code.

There is already a function to clean & invalidate. See 
clean_and_invalidate_dcache_va_range in include/asm-arm/page.h

So please use this function and leave __flush_dcache_area only exported 
to EFI.

Cheers,
diff mbox

Patch

diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h
index 045d6ce..dc64aec 100644
--- a/xen/arch/arm/efi/efi-boot.h
+++ b/xen/arch/arm/efi/efi-boot.h
@@ -10,7 +10,6 @@ 
 #include "efi-dom0.h"
 
 void noreturn efi_xen_start(void *fdt_ptr, uint32_t fdt_size);
-void __flush_dcache_area(const void *vaddr, unsigned long size);
 
 #define DEVICE_TREE_GUID \
 {0xb1b621d5, 0xf19c, 0x41a5, {0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0}}
diff --git a/xen/include/asm-arm/cache.h b/xen/include/asm-arm/cache.h
index 2de6564..af96eee 100644
--- a/xen/include/asm-arm/cache.h
+++ b/xen/include/asm-arm/cache.h
@@ -7,6 +7,10 @@ 
 #define L1_CACHE_SHIFT  (CONFIG_ARM_L1_CACHE_SHIFT)
 #define L1_CACHE_BYTES  (1 << L1_CACHE_SHIFT)
 
+#ifndef __ASSEMBLY__
+void __flush_dcache_area(const void *vaddr, unsigned long size);
+#endif
+
 #define __read_mostly __section(".data.read_mostly")
 
 #endif