Skip to content

Commit

Permalink
powerpc/64s/paca: EX_R3 can be merged with EX_DAR
Browse files Browse the repository at this point in the history
EX_R3 is used only for a small section of the bad stack handler.
Merge it with EX_DAR.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Jun 20, 2017
1 parent dbeea1d commit 635942a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions arch/powerpc/include/asm/exception-64s.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@
#define EX_DAR 40
#define EX_DSISR 48
#define EX_CCR 52
#define EX_R3 56
#define EX_CFAR 64
#define EX_PPR 72
#define EX_CTR 80
#define EX_CFAR 56
#define EX_PPR 64
#define EX_CTR 72

#define EX_SIZE 11 /* size in u64 units */
#define EX_SIZE 10 /* size in u64 units */

/*
* EX_LR is only used in EXSLB and where it does not overlap with EX_DAR
Expand All @@ -60,6 +59,13 @@
*/
#define EX_LR EX_DAR

/*
* EX_R3 is only used by the bad_stack handler. bad_stack reloads and
* saves DAR from SPRN_DAR, and EX_DAR is not used. So EX_R3 can overlap
* with EX_DAR.
*/
#define EX_R3 EX_DAR

#ifdef CONFIG_RELOCATABLE
#define __EXCEPTION_RELON_PROLOG_PSERIES_1(label, h) \
mfspr r11,SPRN_##h##SRR0; /* save SRR0 */ \
Expand Down

0 comments on commit 635942a

Please sign in to comment.