From 299878bac326c890699c696ebba26f56fe93fc75 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Mon, 8 May 2017 15:57:59 -0700 Subject: 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 Acked-by: Russell King Acked-by: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-generic/set_memory.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 include/asm-generic/set_memory.h (limited to 'include/asm-generic') diff --git a/include/asm-generic/set_memory.h b/include/asm-generic/set_memory.h new file mode 100644 index 000000000000..83e81f8996b2 --- /dev/null +++ b/include/asm-generic/set_memory.h @@ -0,0 +1,12 @@ +#ifndef __ASM_SET_MEMORY_H +#define __ASM_SET_MEMORY_H + +/* + * Functions to change memory attributes. + */ +int set_memory_ro(unsigned long addr, int numpages); +int set_memory_rw(unsigned long addr, int numpages); +int set_memory_x(unsigned long addr, int numpages); +int set_memory_nx(unsigned long addr, int numpages); + +#endif -- cgit v1.2.3