diff options
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/hash.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/pgtable.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/radix.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/bug.h | 8 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pgtable.h | 7 |
5 files changed, 14 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h index 0ce513f2926f..36fc7bfe9e11 100644 --- a/arch/powerpc/include/asm/book3s/64/hash.h +++ b/arch/powerpc/include/asm/book3s/64/hash.h | |||
@@ -91,6 +91,7 @@ static inline int hash__pgd_bad(pgd_t pgd) | |||
91 | } | 91 | } |
92 | #ifdef CONFIG_STRICT_KERNEL_RWX | 92 | #ifdef CONFIG_STRICT_KERNEL_RWX |
93 | extern void hash__mark_rodata_ro(void); | 93 | extern void hash__mark_rodata_ro(void); |
94 | extern void hash__mark_initmem_nx(void); | ||
94 | #endif | 95 | #endif |
95 | 96 | ||
96 | extern void hpte_need_flush(struct mm_struct *mm, unsigned long addr, | 97 | extern void hpte_need_flush(struct mm_struct *mm, unsigned long addr, |
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index c0737c86a362..d1da415e283c 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h | |||
@@ -1192,5 +1192,6 @@ static inline const int pud_pfn(pud_t pud) | |||
1192 | BUILD_BUG(); | 1192 | BUILD_BUG(); |
1193 | return 0; | 1193 | return 0; |
1194 | } | 1194 | } |
1195 | |||
1195 | #endif /* __ASSEMBLY__ */ | 1196 | #endif /* __ASSEMBLY__ */ |
1196 | #endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */ | 1197 | #endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */ |
diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index 487709ff6875..544440b5aff3 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h | |||
@@ -118,6 +118,7 @@ | |||
118 | 118 | ||
119 | #ifdef CONFIG_STRICT_KERNEL_RWX | 119 | #ifdef CONFIG_STRICT_KERNEL_RWX |
120 | extern void radix__mark_rodata_ro(void); | 120 | extern void radix__mark_rodata_ro(void); |
121 | extern void radix__mark_initmem_nx(void); | ||
121 | #endif | 122 | #endif |
122 | 123 | ||
123 | static inline unsigned long __radix_pte_update(pte_t *ptep, unsigned long clr, | 124 | static inline unsigned long __radix_pte_update(pte_t *ptep, unsigned long clr, |
diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h index 0151af6c2a50..87fcc1948817 100644 --- a/arch/powerpc/include/asm/bug.h +++ b/arch/powerpc/include/asm/bug.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/asm-offsets.h> | 18 | #include <asm/asm-offsets.h> |
19 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 19 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
20 | .macro EMIT_BUG_ENTRY addr,file,line,flags | 20 | .macro EMIT_BUG_ENTRY addr,file,line,flags |
21 | .section __bug_table,"a" | 21 | .section __bug_table,"aw" |
22 | 5001: PPC_LONG \addr, 5002f | 22 | 5001: PPC_LONG \addr, 5002f |
23 | .short \line, \flags | 23 | .short \line, \flags |
24 | .org 5001b+BUG_ENTRY_SIZE | 24 | .org 5001b+BUG_ENTRY_SIZE |
@@ -29,7 +29,7 @@ | |||
29 | .endm | 29 | .endm |
30 | #else | 30 | #else |
31 | .macro EMIT_BUG_ENTRY addr,file,line,flags | 31 | .macro EMIT_BUG_ENTRY addr,file,line,flags |
32 | .section __bug_table,"a" | 32 | .section __bug_table,"aw" |
33 | 5001: PPC_LONG \addr | 33 | 5001: PPC_LONG \addr |
34 | .short \flags | 34 | .short \flags |
35 | .org 5001b+BUG_ENTRY_SIZE | 35 | .org 5001b+BUG_ENTRY_SIZE |
@@ -42,14 +42,14 @@ | |||
42 | sizeof(struct bug_entry), respectively */ | 42 | sizeof(struct bug_entry), respectively */ |
43 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 43 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
44 | #define _EMIT_BUG_ENTRY \ | 44 | #define _EMIT_BUG_ENTRY \ |
45 | ".section __bug_table,\"a\"\n" \ | 45 | ".section __bug_table,\"aw\"\n" \ |
46 | "2:\t" PPC_LONG "1b, %0\n" \ | 46 | "2:\t" PPC_LONG "1b, %0\n" \ |
47 | "\t.short %1, %2\n" \ | 47 | "\t.short %1, %2\n" \ |
48 | ".org 2b+%3\n" \ | 48 | ".org 2b+%3\n" \ |
49 | ".previous\n" | 49 | ".previous\n" |
50 | #else | 50 | #else |
51 | #define _EMIT_BUG_ENTRY \ | 51 | #define _EMIT_BUG_ENTRY \ |
52 | ".section __bug_table,\"a\"\n" \ | 52 | ".section __bug_table,\"aw\"\n" \ |
53 | "2:\t" PPC_LONG "1b\n" \ | 53 | "2:\t" PPC_LONG "1b\n" \ |
54 | "\t.short %2\n" \ | 54 | "\t.short %2\n" \ |
55 | ".org 2b+%3\n" \ | 55 | ".org 2b+%3\n" \ |
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index dd01212935ac..afae9a336136 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h | |||
@@ -80,6 +80,13 @@ unsigned long vmalloc_to_phys(void *vmalloc_addr); | |||
80 | 80 | ||
81 | void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); | 81 | void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); |
82 | void pgtable_cache_init(void); | 82 | void pgtable_cache_init(void); |
83 | |||
84 | #ifdef CONFIG_STRICT_KERNEL_RWX | ||
85 | void mark_initmem_nx(void); | ||
86 | #else | ||
87 | static inline void mark_initmem_nx(void) { } | ||
88 | #endif | ||
89 | |||
83 | #endif /* __ASSEMBLY__ */ | 90 | #endif /* __ASSEMBLY__ */ |
84 | 91 | ||
85 | #endif /* _ASM_POWERPC_PGTABLE_H */ | 92 | #endif /* _ASM_POWERPC_PGTABLE_H */ |