Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c388514 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64s: Add EX_SIZE definition for paca exception save areas



Rather than open-coding it 4 times.

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
[mpe: Move __ASSEMBLY__ guards into head-64.h where they're really needed]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 4d7cd3b9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
 */
#include <asm/head-64.h>

/* PACA save area offsets (exgen, exmc, etc) */
#define EX_R9		0
#define EX_R10		8
#define EX_R11		16
@@ -51,6 +52,8 @@
#define EX_PPR		88	/* SMT thread status register (priority) */
#define EX_CTR		96

#define EX_SIZE		13	/* size in u64 units */

#ifdef CONFIG_RELOCATABLE
#define __EXCEPTION_RELON_PROLOG_PSERIES_1(label, h)			\
	mfspr	r11,SPRN_##h##SRR0;	/* save SRR0 */			\
+3 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@

#include <asm/cache.h>

#ifdef __ASSEMBLY__
/*
 * We can't do CPP stringification and concatination directly into the section
 * name for some reason, so these macros can do it for us.
@@ -415,4 +416,6 @@ end_##sname:
	EXC_COMMON_BEGIN(name);						\
	STD_EXCEPTION_COMMON(realvec + 0x2, name, hdlr);		\

#endif /* __ASSEMBLY__ */

#endif	/* _ASM_POWERPC_HEAD_64_H */
+8 −4
Original line number Diff line number Diff line
@@ -21,7 +21,11 @@
#include <asm/lppaca.h>
#include <asm/mmu.h>
#include <asm/page.h>
#ifdef CONFIG_PPC_BOOK3E
#include <asm/exception-64e.h>
#else
#include <asm/exception-64s.h>
#endif
#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
#include <asm/kvm_book3s_asm.h>
#endif
@@ -98,8 +102,8 @@ struct paca_struct {
	 * Now, starting in cacheline 2, the exception save areas
	 */
	/* used for most interrupts/exceptions */
	u64 exgen[13] __attribute__((aligned(0x80)));
	u64 exslb[13];		/* used for SLB/segment table misses
	u64 exgen[EX_SIZE] __attribute__((aligned(0x80)));
	u64 exslb[EX_SIZE];	/* used for SLB/segment table misses
 				 * on the linear mapping */
	/* SLB related definitions */
	u16 vmalloc_sllp;
@@ -183,8 +187,8 @@ struct paca_struct {

#ifdef CONFIG_PPC_STD_MMU_64
	/* Non-maskable exceptions that are not performance critical */
	u64 exnmi[13];		/* used for system reset (nmi) */
	u64 exmc[13];		/* used for machine checks */
	u64 exnmi[EX_SIZE];	/* used for system reset (nmi) */
	u64 exmc[EX_SIZE];	/* used for machine checks */
#endif
#ifdef CONFIG_PPC_BOOK3S_64
	/* Exclusive stacks for system reset and machine check exception. */