Skip to content

Commit a542de4

Browse files
author
Russell King (Oracle)
committed
ARM: move FSR fault status definitions before fsr_fs()
The FSR's fault status bits depend on whether LPAE is enabled. Rather than always exposing both LPAE and non-LPAE to all code, move them inside the ifdef blocks dependent on LPAE to restrict their visibility. No code other than fsr_fs() makes use of these. Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
1 parent 5548e8a commit a542de4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

arch/arm/mm/fault.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
#define FSR_LNX_PF BIT(31)
99
#define FSR_CM BIT(13)
1010
#define FSR_WRITE BIT(11)
11-
#define FSR_FS4 BIT(10)
12-
#define FSR_FS3_0 GENMASK(3, 0)
13-
#define FSR_FS5_0 GENMASK(5, 0)
1411

1512
#ifdef CONFIG_ARM_LPAE
1613
#define FSR_FS_AEA 17
1714
#define FS_TRANS_NOLL 0x4
1815
#define FS_PERM_NOLL 0xC
1916
#define FS_MMU_NOLL_MASK 0x3C
2017

18+
#define FSR_FS5_0 GENMASK(5, 0)
19+
2120
static inline int fsr_fs(unsigned int fsr)
2221
{
2322
return fsr & FSR_FS5_0;
@@ -29,6 +28,9 @@ static inline int fsr_fs(unsigned int fsr)
2928
#define FS_L1_PERM 0xD
3029
#define FS_L2_PERM 0xF
3130

31+
#define FSR_FS4 BIT(10)
32+
#define FSR_FS3_0 GENMASK(3, 0)
33+
3234
static inline int fsr_fs(unsigned int fsr)
3335
{
3436
return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;

0 commit comments

Comments
 (0)