{
return fsr & FSR_FS5_0;
}
+
+static inline bool is_translation_fault(unsigned int fsr)
+{
+ int fs = fsr_fs(fsr);
+
+ return (fs & FS_MMU_NOLL_MASK) == FS_TRANS_NOLL;
+}
+
+static inline bool is_permission_fault(unsigned int fsr)
+{
+ int fs = fsr_fs(fsr);
+
+ return (fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL;
+}
#else
#define FSR_FS_AEA 22
#define FS_L1_TRANS 0x5
{
return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;
}
-#endif
static inline bool is_translation_fault(unsigned int fsr)
{
int fs = fsr_fs(fsr);
-#ifdef CONFIG_ARM_LPAE
- if ((fs & FS_MMU_NOLL_MASK) == FS_TRANS_NOLL)
- return true;
-#else
- if (fs == FS_L1_TRANS || fs == FS_L2_TRANS)
- return true;
-#endif
- return false;
+
+ return fs == FS_L1_TRANS || fs == FS_L2_TRANS;
}
static inline bool is_permission_fault(unsigned int fsr)
{
int fs = fsr_fs(fsr);
-#ifdef CONFIG_ARM_LPAE
- if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL)
- return true;
-#else
- if (fs == FS_L1_PERM || fs == FS_L2_PERM)
- return true;
-#endif
- return false;
+
+ return fs == FS_L1_PERM || fs == FS_L2_PERM;
}
+#endif
void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
void early_abt_enable(void);