summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/setup.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-12-22 21:17:13 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-18 15:42:48 +1100
commit1af19331a3a18296a918802dbe032a13328e264d (patch)
tree5811f6ccdf8a7dff2e78d289b39eaf72e5ca73ff /arch/powerpc/kernel/setup.h
parentc610d65c0ad00f1b7bfe2f1eb8f867ca74741685 (diff)
powerpc/64s: Relax PACA address limitations
Book3S PACA memory allocation is restricted by the RMA limit and also must not take SLB faults when accessed in virtual mode. Currently a fixed 256MB limit is used for this, which is imprecise and sub-optimal. Update the paca allocation limits to use use the ppc64_rma_size for RMA limit, and share the safe_stack_limit() that is currently used for stack allocations that must not take virtual mode faults. The safe_stack_limit() name is changed to ppc64_bolted_size() to match ppc64_rma_size and some comments are updated. We also need to use early_mmu_has_feature() because we are now calling this function prior to the jump label patching that enables mmu_has_feature(). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Change mmu_has_feature() to early_mmu_has_feature()] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/setup.h')
-rw-r--r--arch/powerpc/kernel/setup.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup.h b/arch/powerpc/kernel/setup.h
index 21c18071d9d5..3fc11e30308f 100644
--- a/arch/powerpc/kernel/setup.h
+++ b/arch/powerpc/kernel/setup.h
@@ -51,6 +51,10 @@ void record_spr_defaults(void);
static inline void record_spr_defaults(void) { };
#endif
+#ifdef CONFIG_PPC64
+u64 ppc64_bolted_size(void);
+#endif
+
/*
* Having this in kvm_ppc.h makes include dependencies too
* tricky to solve for setup-common.c so have it here.