Merge tag 'v3.10.74' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mm / fault.h
CommitLineData
136848d4
CM
1#ifndef __ARCH_ARM_FAULT_H
2#define __ARCH_ARM_FAULT_H
3
4/*
5 * Fault status register encodings. We steal bit 31 for our own purposes.
6 */
7#define FSR_LNX_PF (1 << 31)
8#define FSR_WRITE (1 << 11)
9#define FSR_FS4 (1 << 10)
10#define FSR_FS3_0 (15)
f7b8156d 11#define FSR_FS5_0 (0x3f)
136848d4 12
f7b8156d
CM
13#ifdef CONFIG_ARM_LPAE
14static inline int fsr_fs(unsigned int fsr)
15{
16 return fsr & FSR_FS5_0;
17}
18#else
136848d4
CM
19static inline int fsr_fs(unsigned int fsr)
20{
21 return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;
22}
f7b8156d 23#endif
1da177e4 24
136848d4 25void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
1da177e4 26unsigned long search_exception_table(unsigned long addr);
136848d4
CM
27
28#endif /* __ARCH_ARM_FAULT_H */