diff options
author | Laura Abbott <labbott@redhat.com> | 2017-05-08 18:57:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-08 20:15:13 -0400 |
commit | 299878bac326c890699c696ebba26f56fe93fc75 (patch) | |
tree | e9f9ba4a5deef3486e0a4371edc6ecccbe6d63f5 /arch/arm/include/asm/cacheflush.h | |
parent | 8ac1ed791401790968fd00ca63ca4fa814677199 (diff) |
treewide: move set_memory_* functions away from cacheflush.h
Patch series "set_memory_* functions header refactor", v3.
The set_memory_* APIs came out of a desire to have a better way to
change memory attributes. Many of these attributes were linked to cache
functionality so the prototypes were put in cacheflush.h. These days,
the APIs have grown and have a much wider use than just cache APIs. To
support this growth, split off set_memory_* and friends into a separate
header file to avoid growing cacheflush.h for APIs that have nothing to
do with caches.
Link: http://lkml.kernel.org/r/1488920133-27229-2-git-send-email-labbott@redhat.com
Signed-off-by: Laura Abbott <labbott@redhat.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/include/asm/cacheflush.h')
-rw-r--r-- | arch/arm/include/asm/cacheflush.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 02454fa15d2c..1cb9d118bb16 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/shmparam.h> | 16 | #include <asm/shmparam.h> |
17 | #include <asm/cachetype.h> | 17 | #include <asm/cachetype.h> |
18 | #include <asm/outercache.h> | 18 | #include <asm/outercache.h> |
19 | #include <asm/set_memory.h> | ||
19 | 20 | ||
20 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | 21 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) |
21 | 22 | ||
@@ -478,26 +479,6 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size) | |||
478 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", \ | 479 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", \ |
479 | "r9","r10","lr","memory" ) | 480 | "r9","r10","lr","memory" ) |
480 | 481 | ||
481 | #ifdef CONFIG_MMU | ||
482 | int set_memory_ro(unsigned long addr, int numpages); | ||
483 | int set_memory_rw(unsigned long addr, int numpages); | ||
484 | int set_memory_x(unsigned long addr, int numpages); | ||
485 | int set_memory_nx(unsigned long addr, int numpages); | ||
486 | #else | ||
487 | static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; } | ||
488 | static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; } | ||
489 | static inline int set_memory_x(unsigned long addr, int numpages) { return 0; } | ||
490 | static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; } | ||
491 | #endif | ||
492 | |||
493 | #ifdef CONFIG_STRICT_KERNEL_RWX | ||
494 | void set_kernel_text_rw(void); | ||
495 | void set_kernel_text_ro(void); | ||
496 | #else | ||
497 | static inline void set_kernel_text_rw(void) { } | ||
498 | static inline void set_kernel_text_ro(void) { } | ||
499 | #endif | ||
500 | |||
501 | void flush_uprobe_xol_access(struct page *page, unsigned long uaddr, | 482 | void flush_uprobe_xol_access(struct page *page, unsigned long uaddr, |
502 | void *kaddr, unsigned long len); | 483 | void *kaddr, unsigned long len); |
503 | 484 | ||