Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ARM: group is_permission_fault() with is_translation_fault()

Group is_permission_fault() with is_translation_fault(), which is
needed to use is_permission_fault() in __do_kernel_fault(). As
this is static inline, there is no need for this to be under
CONFIG_MMU.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

+13 -13
+13 -13
arch/arm/mm/fault.c
··· 128 128 return false; 129 129 } 130 130 131 + static inline bool is_permission_fault(unsigned int fsr) 132 + { 133 + int fs = fsr_fs(fsr); 134 + #ifdef CONFIG_ARM_LPAE 135 + if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL) 136 + return true; 137 + #else 138 + if (fs == FS_L1_PERM || fs == FS_L2_PERM) 139 + return true; 140 + #endif 141 + return false; 142 + } 143 + 131 144 static void die_kernel_fault(const char *msg, struct mm_struct *mm, 132 145 unsigned long addr, unsigned int fsr, 133 146 struct pt_regs *regs) ··· 238 225 } 239 226 240 227 #ifdef CONFIG_MMU 241 - static inline bool is_permission_fault(unsigned int fsr) 242 - { 243 - int fs = fsr_fs(fsr); 244 - #ifdef CONFIG_ARM_LPAE 245 - if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL) 246 - return true; 247 - #else 248 - if (fs == FS_L1_PERM || fs == FS_L2_PERM) 249 - return true; 250 - #endif 251 - return false; 252 - } 253 - 254 228 #ifdef CONFIG_CPU_TTBR0_PAN 255 229 static inline bool ttbr0_usermode_access_allowed(struct pt_regs *regs) 256 230 {