Skip to content

Commit 9b7ff0c

Browse files
npigginmpe
authored andcommitted
powerpc/64s: Add SCV FSCR bit for ISA v3.0
Add the bit definition and use it in facility_unavailable_exception() so we can intelligently report the cause if we take a fault for SCV. This doesn't actually enable SCV. Signed-off-by: Nicholas Piggin <[email protected]> [mpe: Drop whitespace changes to the existing entries, flush out change log] Signed-off-by: Michael Ellerman <[email protected]>
1 parent 794464f commit 9b7ff0c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/powerpc/include/asm/reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@
310310
#define SPRN_PMCR 0x374 /* Power Management Control Register */
311311

312312
/* HFSCR and FSCR bit numbers are the same */
313+
#define FSCR_SCV_LG 12 /* Enable System Call Vectored */
313314
#define FSCR_MSGP_LG 10 /* Enable MSGP */
314315
#define FSCR_TAR_LG 8 /* Enable Target Address Register */
315316
#define FSCR_EBB_LG 7 /* Enable Event Based Branching */
@@ -320,6 +321,7 @@
320321
#define FSCR_VECVSX_LG 1 /* Enable VMX/VSX */
321322
#define FSCR_FP_LG 0 /* Enable Floating Point */
322323
#define SPRN_FSCR 0x099 /* Facility Status & Control Register */
324+
#define FSCR_SCV __MASK(FSCR_SCV_LG)
323325
#define FSCR_TAR __MASK(FSCR_TAR_LG)
324326
#define FSCR_EBB __MASK(FSCR_EBB_LG)
325327
#define FSCR_DSCR __MASK(FSCR_DSCR_LG)

arch/powerpc/kernel/traps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,7 @@ void facility_unavailable_exception(struct pt_regs *regs)
14411441
[FSCR_EBB_LG] = "EBB",
14421442
[FSCR_TAR_LG] = "TAR",
14431443
[FSCR_MSGP_LG] = "MSGP",
1444+
[FSCR_SCV_LG] = "SCV",
14441445
};
14451446
char *facility = "unknown";
14461447
u64 value;

0 commit comments

Comments
 (0)