xen/arm: Constify address pointer for cache helpers
authorJulien Grall <julien.grall@linaro.org>
Tue, 22 Apr 2014 13:14:16 +0000 (14:14 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 2 May 2014 12:14:10 +0000 (13:14 +0100)
The memory pointed by this pointer is not modified in clean_xen_dcache_va_range
and clean_and_invalidate_xen_dcache_va_range.

Constify it. This will allow us to use theses helpers later in code which use
const.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/include/asm-arm/page.h

index 0c0fd3774dc75296559bb74dd0b7b41276565480..c38e9c9c1621c62273729516617e40bda057e6c3 100644 (file)
@@ -260,9 +260,9 @@ extern size_t cacheline_bytes;
 /* Functions for flushing medium-sized areas.
  * if 'range' is large enough we might want to use model-specific
  * full-cache flushes. */
-static inline void clean_xen_dcache_va_range(void *p, unsigned long size)
+static inline void clean_xen_dcache_va_range(const void *p, unsigned long size)
 {
-    void *end;
+    const void *end;
     dsb(sy);           /* So the CPU issues all writes to the range */
     for ( end = p + size; p < end; p += cacheline_bytes )
         asm volatile (__clean_xen_dcache_one(0) : : "r" (p));
@@ -270,9 +270,9 @@ static inline void clean_xen_dcache_va_range(void *p, unsigned long size)
 }
 
 static inline void clean_and_invalidate_xen_dcache_va_range
-    (void *p, unsigned long size)
+    (const void *p, unsigned long size)
 {
-    void *end;
+    const void *end;
     dsb(sy);         /* So the CPU issues all writes to the range */
     for ( end = p + size; p < end; p += cacheline_bytes )
         asm volatile (__clean_and_invalidate_xen_dcache_one(0) : : "r" (p));