Commit 4e003747 authored by Michael Ellerman's avatar Michael Ellerman

powerpc/64s: Replace CONFIG_PPC_STD_MMU_64 with CONFIG_PPC_BOOK3S_64

CONFIG_PPC_STD_MMU_64 indicates support for the "standard" powerpc MMU
on 64-bit CPUs. The "standard" MMU refers to the hash page table MMU
found in "server" processors, from IBM mainly.

Currently CONFIG_PPC_STD_MMU_64 is == CONFIG_PPC_BOOK3S_64. While it's
annoying to have two symbols that always have the same value, it's not
quite annoying enough to bother removing one.

However with the arrival of Power9, we now have the situation where
CONFIG_PPC_STD_MMU_64 is enabled, but the kernel is running using the
Radix MMU - *not* the "standard" MMU. So it is now actively confusing
to use it, because it implies that code is disabled or inactive when
the Radix MMU is in use, however that is not necessarily true.

So s/CONFIG_PPC_STD_MMU_64/CONFIG_PPC_BOOK3S_64/, and do some minor
formatting updates of some of the affected lines.

This will be a pain for backports, but c'est la vie.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent c1807e3f
...@@ -334,7 +334,7 @@ config PPC_OF_PLATFORM_PCI ...@@ -334,7 +334,7 @@ config PPC_OF_PLATFORM_PCI
default n default n
config ARCH_SUPPORTS_DEBUG_PAGEALLOC config ARCH_SUPPORTS_DEBUG_PAGEALLOC
depends on PPC32 || PPC_STD_MMU_64 depends on PPC32 || PPC_BOOK3S_64
def_bool y def_bool y
config ARCH_SUPPORTS_UPROBES config ARCH_SUPPORTS_UPROBES
...@@ -721,7 +721,7 @@ config PPC_16K_PAGES ...@@ -721,7 +721,7 @@ config PPC_16K_PAGES
config PPC_64K_PAGES config PPC_64K_PAGES
bool "64k page size" bool "64k page size"
depends on !PPC_FSL_BOOK3E && (44x || PPC_STD_MMU_64 || PPC_BOOK3E_64) depends on !PPC_FSL_BOOK3E && (44x || PPC_BOOK3S_64 || PPC_BOOK3E_64)
select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64 select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
config PPC_256K_PAGES config PPC_256K_PAGES
...@@ -780,7 +780,7 @@ config FORCE_MAX_ZONEORDER ...@@ -780,7 +780,7 @@ config FORCE_MAX_ZONEORDER
config PPC_SUBPAGE_PROT config PPC_SUBPAGE_PROT
bool "Support setting protections for 4k subpages" bool "Support setting protections for 4k subpages"
depends on PPC_STD_MMU_64 && PPC_64K_PAGES depends on PPC_BOOK3S_64 && PPC_64K_PAGES
help help
This option adds support for a system call to allow user programs This option adds support for a system call to allow user programs
to set access permissions (read/write, readonly, or no access) to set access permissions (read/write, readonly, or no access)
......
...@@ -203,7 +203,7 @@ static inline unsigned long pte_update(struct mm_struct *mm, ...@@ -203,7 +203,7 @@ static inline unsigned long pte_update(struct mm_struct *mm,
if (!huge) if (!huge)
assert_pte_locked(mm, addr); assert_pte_locked(mm, addr);
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
if (old & _PAGE_HASHPTE) if (old & _PAGE_HASHPTE)
hpte_need_flush(mm, addr, ptep, old, huge); hpte_need_flush(mm, addr, ptep, old, huge);
#endif #endif
......
...@@ -91,14 +91,14 @@ struct paca_struct { ...@@ -91,14 +91,14 @@ struct paca_struct {
u8 cpu_start; /* At startup, processor spins until */ u8 cpu_start; /* At startup, processor spins until */
/* this becomes non-zero. */ /* this becomes non-zero. */
u8 kexec_state; /* set when kexec down has irqs off */ u8 kexec_state; /* set when kexec down has irqs off */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
struct slb_shadow *slb_shadow_ptr; struct slb_shadow *slb_shadow_ptr;
struct dtl_entry *dispatch_log; struct dtl_entry *dispatch_log;
struct dtl_entry *dispatch_log_end; struct dtl_entry *dispatch_log_end;
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif
u64 dscr_default; /* per-CPU default DSCR */ u64 dscr_default; /* per-CPU default DSCR */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
/* /*
* Now, starting in cacheline 2, the exception save areas * Now, starting in cacheline 2, the exception save areas
*/ */
...@@ -110,7 +110,7 @@ struct paca_struct { ...@@ -110,7 +110,7 @@ struct paca_struct {
u16 vmalloc_sllp; u16 vmalloc_sllp;
u16 slb_cache_ptr; u16 slb_cache_ptr;
u32 slb_cache[SLB_CACHE_ENTRIES]; u32 slb_cache[SLB_CACHE_ENTRIES];
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
#ifdef CONFIG_PPC_BOOK3E #ifdef CONFIG_PPC_BOOK3E
u64 exgen[8] __aligned(0x40); u64 exgen[8] __aligned(0x40);
...@@ -192,7 +192,7 @@ struct paca_struct { ...@@ -192,7 +192,7 @@ struct paca_struct {
struct stop_sprs stop_sprs; struct stop_sprs stop_sprs;
#endif #endif
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
/* Non-maskable exceptions that are not performance critical */ /* Non-maskable exceptions that are not performance critical */
u64 exnmi[EX_SIZE]; /* used for system reset (nmi) */ u64 exnmi[EX_SIZE]; /* used for system reset (nmi) */
u64 exmc[EX_SIZE]; /* used for machine checks */ u64 exmc[EX_SIZE]; /* used for machine checks */
......
...@@ -117,21 +117,21 @@ extern void slice_set_range_psize(struct mm_struct *mm, unsigned long start, ...@@ -117,21 +117,21 @@ extern void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#else #else
#define slice_init() #define slice_init()
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
#define get_slice_psize(mm, addr) ((mm)->context.user_psize) #define get_slice_psize(mm, addr) ((mm)->context.user_psize)
#define slice_set_user_psize(mm, psize) \ #define slice_set_user_psize(mm, psize) \
do { \ do { \
(mm)->context.user_psize = (psize); \ (mm)->context.user_psize = (psize); \
(mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \ (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \
} while (0) } while (0)
#else /* CONFIG_PPC_STD_MMU_64 */ #else /* !CONFIG_PPC_BOOK3S_64 */
#ifdef CONFIG_PPC_64K_PAGES #ifdef CONFIG_PPC_64K_PAGES
#define get_slice_psize(mm, addr) MMU_PAGE_64K #define get_slice_psize(mm, addr) MMU_PAGE_64K
#else /* CONFIG_PPC_64K_PAGES */ #else /* CONFIG_PPC_64K_PAGES */
#define get_slice_psize(mm, addr) MMU_PAGE_4K #define get_slice_psize(mm, addr) MMU_PAGE_4K
#endif /* !CONFIG_PPC_64K_PAGES */ #endif /* !CONFIG_PPC_64K_PAGES */
#define slice_set_user_psize(mm, psize) do { BUG(); } while(0) #define slice_set_user_psize(mm, psize) do { BUG(); } while(0)
#endif /* !CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
#define slice_set_range_psize(mm, start, len, psize) \ #define slice_set_range_psize(mm, start, len, psize) \
slice_set_user_psize((mm), (psize)) slice_set_user_psize((mm), (psize))
......
...@@ -76,7 +76,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; ...@@ -76,7 +76,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
* With hash config 64k pages additionally define a bigger "real PTE" type that * With hash config 64k pages additionally define a bigger "real PTE" type that
* gathers the "second half" part of the PTE for pseudo 64k pages * gathers the "second half" part of the PTE for pseudo 64k pages
*/ */
#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_STD_MMU_64) #if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_BOOK3S_64)
typedef struct { pte_t pte; unsigned long hidx; } real_pte_t; typedef struct { pte_t pte; unsigned long hidx; } real_pte_t;
#else #else
typedef struct { pte_t pte; } real_pte_t; typedef struct { pte_t pte; } real_pte_t;
......
...@@ -49,13 +49,13 @@ typedef struct { unsigned long pgprot; } pgprot_t; ...@@ -49,13 +49,13 @@ typedef struct { unsigned long pgprot; } pgprot_t;
* With hash config 64k pages additionally define a bigger "real PTE" type that * With hash config 64k pages additionally define a bigger "real PTE" type that
* gathers the "second half" part of the PTE for pseudo 64k pages * gathers the "second half" part of the PTE for pseudo 64k pages
*/ */
#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_STD_MMU_64) #if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_BOOK3S_64)
typedef struct { pte_t pte; unsigned long hidx; } real_pte_t; typedef struct { pte_t pte; unsigned long hidx; } real_pte_t;
#else #else
typedef struct { pte_t pte; } real_pte_t; typedef struct { pte_t pte; } real_pte_t;
#endif #endif
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
#include <asm/cmpxchg.h> #include <asm/cmpxchg.h>
static inline bool pte_xchg(pte_t *ptep, pte_t old, pte_t new) static inline bool pte_xchg(pte_t *ptep, pte_t old, pte_t new)
......
...@@ -77,7 +77,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) ...@@ -77,7 +77,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm)
flush_tlb_mm(mm); flush_tlb_mm(mm);
} }
#elif defined(CONFIG_PPC_STD_MMU_64) #elif defined(CONFIG_PPC_BOOK3S_64)
#include <asm/book3s/64/tlbflush.h> #include <asm/book3s/64/tlbflush.h>
#else #else
#error Unsupported MMU type #error Unsupported MMU type
......
...@@ -208,7 +208,7 @@ int main(void) ...@@ -208,7 +208,7 @@ int main(void)
OFFSET(TCD_ESEL_FIRST, tlb_core_data, esel_first); OFFSET(TCD_ESEL_FIRST, tlb_core_data, esel_first);
#endif /* CONFIG_PPC_BOOK3E */ #endif /* CONFIG_PPC_BOOK3E */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
OFFSET(PACASLBCACHE, paca_struct, slb_cache); OFFSET(PACASLBCACHE, paca_struct, slb_cache);
OFFSET(PACASLBCACHEPTR, paca_struct, slb_cache_ptr); OFFSET(PACASLBCACHEPTR, paca_struct, slb_cache_ptr);
OFFSET(PACAVMALLOCSLLP, paca_struct, vmalloc_sllp); OFFSET(PACAVMALLOCSLLP, paca_struct, vmalloc_sllp);
...@@ -230,7 +230,7 @@ int main(void) ...@@ -230,7 +230,7 @@ int main(void)
OFFSET(LPPACA_DTLIDX, lppaca, dtl_idx); OFFSET(LPPACA_DTLIDX, lppaca, dtl_idx);
OFFSET(LPPACA_YIELDCOUNT, lppaca, yield_count); OFFSET(LPPACA_YIELDCOUNT, lppaca, yield_count);
OFFSET(PACA_DTL_RIDX, paca_struct, dtl_ridx); OFFSET(PACA_DTL_RIDX, paca_struct, dtl_ridx);
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
OFFSET(PACAEMERGSP, paca_struct, emergency_sp); OFFSET(PACAEMERGSP, paca_struct, emergency_sp);
#ifdef CONFIG_PPC_BOOK3S_64 #ifdef CONFIG_PPC_BOOK3S_64
OFFSET(PACAMCEMERGSP, paca_struct, mc_emergency_sp); OFFSET(PACAMCEMERGSP, paca_struct, mc_emergency_sp);
......
...@@ -539,7 +539,7 @@ _GLOBAL(_switch) ...@@ -539,7 +539,7 @@ _GLOBAL(_switch)
std r6,PACACURRENT(r13) /* Set new 'current' */ std r6,PACACURRENT(r13) /* Set new 'current' */
ld r8,KSP(r4) /* new stack pointer */ ld r8,KSP(r4) /* new stack pointer */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
BEGIN_MMU_FTR_SECTION BEGIN_MMU_FTR_SECTION
b 2f b 2f
END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX) END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX)
...@@ -588,7 +588,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) ...@@ -588,7 +588,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
slbmte r7,r0 slbmte r7,r0
isync isync
2: 2:
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
CURRENT_THREAD_INFO(r7, r8) /* base of new stack */ CURRENT_THREAD_INFO(r7, r8) /* base of new stack */
/* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE
......
...@@ -607,7 +607,7 @@ EXC_COMMON_BEGIN(slb_miss_common) ...@@ -607,7 +607,7 @@ EXC_COMMON_BEGIN(slb_miss_common)
cmpdi cr5,r11,MSR_RI cmpdi cr5,r11,MSR_RI
crset 4*cr0+eq crset 4*cr0+eq
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
BEGIN_MMU_FTR_SECTION BEGIN_MMU_FTR_SECTION
bl slb_allocate bl slb_allocate
END_MMU_FTR_SECTION_IFCLR(MMU_FTR_TYPE_RADIX) END_MMU_FTR_SECTION_IFCLR(MMU_FTR_TYPE_RADIX)
...@@ -1497,7 +1497,7 @@ USE_TEXT_SECTION() ...@@ -1497,7 +1497,7 @@ USE_TEXT_SECTION()
*/ */
.balign IFETCH_ALIGN_BYTES .balign IFETCH_ALIGN_BYTES
do_hash_page: do_hash_page:
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
lis r0,DSISR_BAD_FAULT_64S@h lis r0,DSISR_BAD_FAULT_64S@h
ori r0,r0,DSISR_BAD_FAULT_64S@l ori r0,r0,DSISR_BAD_FAULT_64S@l
and. r0,r4,r0 /* weird error? */ and. r0,r4,r0 /* weird error? */
...@@ -1528,7 +1528,7 @@ do_hash_page: ...@@ -1528,7 +1528,7 @@ do_hash_page:
/* Reload DSISR into r4 for the DABR check below */ /* Reload DSISR into r4 for the DABR check below */
ld r4,_DSISR(r1) ld r4,_DSISR(r1)
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
/* Here we have a page fault that hash_page can't handle. */ /* Here we have a page fault that hash_page can't handle. */
handle_page_fault: handle_page_fault:
...@@ -1557,7 +1557,7 @@ handle_dabr_fault: ...@@ -1557,7 +1557,7 @@ handle_dabr_fault:
12: b ret_from_except_lite 12: b ret_from_except_lite
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
/* We have a page fault that hash_page could handle but HV refused /* We have a page fault that hash_page could handle but HV refused
* the PTE insertion * the PTE insertion
*/ */
......
...@@ -360,7 +360,7 @@ void default_machine_kexec(struct kimage *image) ...@@ -360,7 +360,7 @@ void default_machine_kexec(struct kimage *image)
/* NOTREACHED */ /* NOTREACHED */
} }
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
/* Values we need to export to the second kernel via the device tree. */ /* Values we need to export to the second kernel via the device tree. */
static unsigned long htab_base; static unsigned long htab_base;
static unsigned long htab_size; static unsigned long htab_size;
...@@ -402,4 +402,4 @@ static int __init export_htab_values(void) ...@@ -402,4 +402,4 @@ static int __init export_htab_values(void)
return 0; return 0;
} }
late_initcall(export_htab_values); late_initcall(export_htab_values);
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
...@@ -168,7 +168,7 @@ void __flush_tlb_power9(unsigned int action) ...@@ -168,7 +168,7 @@ void __flush_tlb_power9(unsigned int action)
/* flush SLBs and reload */ /* flush SLBs and reload */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
static void flush_and_reload_slb(void) static void flush_and_reload_slb(void)
{ {
struct slb_shadow *slb; struct slb_shadow *slb;
...@@ -215,7 +215,7 @@ static void flush_erat(void) ...@@ -215,7 +215,7 @@ static void flush_erat(void)
static int mce_flush(int what) static int mce_flush(int what)
{ {
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
if (what == MCE_FLUSH_SLB) { if (what == MCE_FLUSH_SLB) {
flush_and_reload_slb(); flush_and_reload_slb();
return 1; return 1;
......
...@@ -90,7 +90,7 @@ static inline void free_lppacas(void) { } ...@@ -90,7 +90,7 @@ static inline void free_lppacas(void) { }
#endif /* CONFIG_PPC_BOOK3S */ #endif /* CONFIG_PPC_BOOK3S */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
/* /*
* 3 persistent SLBs are registered here. The buffer will be zero * 3 persistent SLBs are registered here. The buffer will be zero
...@@ -135,11 +135,11 @@ static struct slb_shadow * __init init_slb_shadow(int cpu) ...@@ -135,11 +135,11 @@ static struct slb_shadow * __init init_slb_shadow(int cpu)
return s; return s;
} }
#else /* CONFIG_PPC_STD_MMU_64 */ #else /* !CONFIG_PPC_BOOK3S_64 */
static void __init allocate_slb_shadows(int nr_cpus, int limit) { } static void __init allocate_slb_shadows(int nr_cpus, int limit) { }
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
/* The Paca is an array with one entry per processor. Each contains an /* The Paca is an array with one entry per processor. Each contains an
* lppaca, which contains the information shared between the * lppaca, which contains the information shared between the
...@@ -170,9 +170,9 @@ void __init initialise_paca(struct paca_struct *new_paca, int cpu) ...@@ -170,9 +170,9 @@ void __init initialise_paca(struct paca_struct *new_paca, int cpu)
new_paca->kexec_state = KEXEC_STATE_NONE; new_paca->kexec_state = KEXEC_STATE_NONE;
new_paca->__current = &init_task; new_paca->__current = &init_task;
new_paca->data_offset = 0xfeeeeeeeeeeeeeeeULL; new_paca->data_offset = 0xfeeeeeeeeeeeeeeeULL;
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
new_paca->slb_shadow_ptr = init_slb_shadow(cpu); new_paca->slb_shadow_ptr = init_slb_shadow(cpu);
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif
#ifdef CONFIG_PPC_BOOK3E #ifdef CONFIG_PPC_BOOK3E
/* For now -- if we have threads this will be adjusted later */ /* For now -- if we have threads this will be adjusted later */
...@@ -271,7 +271,7 @@ void copy_mm_to_paca(struct mm_struct *mm) ...@@ -271,7 +271,7 @@ void copy_mm_to_paca(struct mm_struct *mm)
get_paca()->mm_ctx_user_psize = context->user_psize; get_paca()->mm_ctx_user_psize = context->user_psize;
get_paca()->mm_ctx_sllp = context->sllp; get_paca()->mm_ctx_sllp = context->sllp;
#endif #endif
#else /* CONFIG_PPC_BOOK3S */ #else /* !CONFIG_PPC_BOOK3S */
return; return;
#endif #endif
} }
...@@ -90,14 +90,14 @@ int pcibios_unmap_io_space(struct pci_bus *bus) ...@@ -90,14 +90,14 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
* to do an appropriate TLB flush here too * to do an appropriate TLB flush here too
*/ */
if (bus->self) { if (bus->self) {
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
struct resource *res = bus->resource[0]; struct resource *res = bus->resource[0];
#endif #endif
pr_debug("IO unmapping for PCI-PCI bridge %s\n", pr_debug("IO unmapping for PCI-PCI bridge %s\n",
pci_name(bus->self)); pci_name(bus->self));
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
__flush_hash_table_range(&init_mm, res->start + _IO_BASE, __flush_hash_table_range(&init_mm, res->start + _IO_BASE,
res->end + _IO_BASE + 1); res->end + _IO_BASE + 1);
#endif #endif
......
...@@ -1164,7 +1164,7 @@ struct task_struct *__switch_to(struct task_struct *prev, ...@@ -1164,7 +1164,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
} }
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
batch = this_cpu_ptr(&ppc64_tlb_batch); batch = this_cpu_ptr(&ppc64_tlb_batch);
if (batch->active) { if (batch->active) {
current_thread_info()->local_flags |= _TLF_LAZY_MMU; current_thread_info()->local_flags |= _TLF_LAZY_MMU;
...@@ -1172,7 +1172,7 @@ struct task_struct *__switch_to(struct task_struct *prev, ...@@ -1172,7 +1172,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
__flush_tlb_pending(batch); __flush_tlb_pending(batch);
batch->active = 0; batch->active = 0;
} }
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
#ifdef CONFIG_PPC_ADV_DEBUG_REGS #ifdef CONFIG_PPC_ADV_DEBUG_REGS
switch_booke_debug_regs(&new->thread.debug); switch_booke_debug_regs(&new->thread.debug);
...@@ -1218,7 +1218,7 @@ struct task_struct *__switch_to(struct task_struct *prev, ...@@ -1218,7 +1218,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
last = _switch(old_thread, new_thread); last = _switch(old_thread, new_thread);
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
if (current_thread_info()->local_flags & _TLF_LAZY_MMU) { if (current_thread_info()->local_flags & _TLF_LAZY_MMU) {
current_thread_info()->local_flags &= ~_TLF_LAZY_MMU; current_thread_info()->local_flags &= ~_TLF_LAZY_MMU;
batch = this_cpu_ptr(&ppc64_tlb_batch); batch = this_cpu_ptr(&ppc64_tlb_batch);
...@@ -1247,7 +1247,7 @@ struct task_struct *__switch_to(struct task_struct *prev, ...@@ -1247,7 +1247,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
: : "r"(dummy_copy_buffer), "r"(0)); : : "r"(dummy_copy_buffer), "r"(0));
} }
} }
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
return last; return last;
} }
...@@ -1476,7 +1476,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) ...@@ -1476,7 +1476,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
static void setup_ksp_vsid(struct task_struct *p, unsigned long sp) static void setup_ksp_vsid(struct task_struct *p, unsigned long sp)
{ {
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
unsigned long sp_vsid; unsigned long sp_vsid;
unsigned long llp = mmu_psize_defs[mmu_linear_psize].sllp; unsigned long llp = mmu_psize_defs[mmu_linear_psize].sllp;
...@@ -2056,7 +2056,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) ...@@ -2056,7 +2056,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
unsigned long base = mm->brk; unsigned long base = mm->brk;
unsigned long ret; unsigned long ret;
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
/* /*
* If we are using 1TB segments and we are allowed to randomise * If we are using 1TB segments and we are allowed to randomise
* the heap, we can put it above 1TB so it is backed by a 1TB * the heap, we can put it above 1TB so it is backed by a 1TB
......
...@@ -229,7 +229,7 @@ static void __init check_cpu_pa_features(unsigned long node) ...@@ -229,7 +229,7 @@ static void __init check_cpu_pa_features(unsigned long node)
ibm_pa_features, ARRAY_SIZE(ibm_pa_features)); ibm_pa_features, ARRAY_SIZE(ibm_pa_features));
} }
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
static void __init init_mmu_slb_size(unsigned long node) static void __init init_mmu_slb_size(unsigned long node)
{ {
const __be32 *slb_size_ptr; const __be32 *slb_size_ptr;
......
...@@ -773,7 +773,7 @@ void arch_setup_pdev_archdata(struct platform_device *pdev) ...@@ -773,7 +773,7 @@ void arch_setup_pdev_archdata(struct platform_device *pdev)
static __init void print_system_info(void) static __init void print_system_info(void)
{ {
pr_info("-----------------------------------------------------\n"); pr_info("-----------------------------------------------------\n");
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
pr_info("ppc64_pft_size = 0x%llx\n", ppc64_pft_size); pr_info("ppc64_pft_size = 0x%llx\n", ppc64_pft_size);
#endif #endif
#ifdef CONFIG_PPC_STD_MMU_32 #ifdef CONFIG_PPC_STD_MMU_32
...@@ -800,7 +800,7 @@ static __init void print_system_info(void) ...@@ -800,7 +800,7 @@ static __init void print_system_info(void)
pr_info("firmware_features = 0x%016lx\n", powerpc_firmware_features); pr_info("firmware_features = 0x%016lx\n", powerpc_firmware_features);
#endif #endif
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
if (htab_address) if (htab_address)
pr_info("htab_address = 0x%p\n", htab_address); pr_info("htab_address = 0x%p\n", htab_address);
if (htab_hash_mask) if (htab_hash_mask)
......
...@@ -14,11 +14,11 @@ obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \ ...@@ -14,11 +14,11 @@ obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \
obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(BITS)e.o obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(BITS)e.o
hash64-$(CONFIG_PPC_NATIVE) := hash_native_64.o hash64-$(CONFIG_PPC_NATIVE) := hash_native_64.o
obj-$(CONFIG_PPC_BOOK3E_64) += pgtable-book3e.o obj-$(CONFIG_PPC_BOOK3E_64) += pgtable-book3e.o
obj-$(CONFIG_PPC_STD_MMU_64) += pgtable-hash64.o hash_utils_64.o slb_low.o slb.o $(hash64-y) mmu_context_book3s64.o pgtable-book3s64.o obj-$(CONFIG_PPC_BOOK3S_64) += pgtable-hash64.o hash_utils_64.o slb_low.o slb.o $(hash64-y) mmu_context_book3s64.o pgtable-book3s64.o
obj-$(CONFIG_PPC_RADIX_MMU) += pgtable-radix.o tlb-radix.o obj-$(CONFIG_PPC_RADIX_MMU) += pgtable-radix.o tlb-radix.o
obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o mmu_context_hash32.o obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o mmu_context_hash32.o
obj-$(CONFIG_PPC_STD_MMU) += tlb_hash$(BITS).o obj-$(CONFIG_PPC_STD_MMU) += tlb_hash$(BITS).o
ifeq ($(CONFIG_PPC_STD_MMU_64),y) ifeq ($(CONFIG_PPC_BOOK3S_64),y)
obj-$(CONFIG_PPC_4K_PAGES) += hash64_4k.o obj-$(CONFIG_PPC_4K_PAGES) += hash64_4k.o
obj-$(CONFIG_PPC_64K_PAGES) += hash64_64k.o obj-$(CONFIG_PPC_64K_PAGES) += hash64_64k.o
endif endif
...@@ -31,7 +31,7 @@ obj-$(CONFIG_PPC_SPLPAR) += vphn.o ...@@ -31,7 +31,7 @@ obj-$(CONFIG_PPC_SPLPAR) += vphn.o
obj-$(CONFIG_PPC_MM_SLICES) += slice.o obj-$(CONFIG_PPC_MM_SLICES) += slice.o
obj-y += hugetlbpage.o obj-y += hugetlbpage.o
ifeq ($(CONFIG_HUGETLB_PAGE),y) ifeq ($(CONFIG_HUGETLB_PAGE),y)
obj-$(CONFIG_PPC_STD_MMU_64) += hugetlbpage-hash64.o obj-$(CONFIG_PPC_BOOK3S_64) += hugetlbpage-hash64.o
obj-$(CONFIG_PPC_RADIX_MMU) += hugetlbpage-radix.o obj-$(CONFIG_PPC_RADIX_MMU) += hugetlbpage-radix.o
obj-$(CONFIG_PPC_BOOK3E_MMU) += hugetlbpage-book3e.o obj-$(CONFIG_PPC_BOOK3E_MMU) += hugetlbpage-book3e.o
endif endif
......
...@@ -500,7 +500,7 @@ static void populate_markers(void) ...@@ -500,7 +500,7 @@ static void populate_markers(void)
address_markers[6].start_address = PHB_IO_END; address_markers[6].start_address = PHB_IO_END;
address_markers[7].start_address = IOREMAP_BASE; address_markers[7].start_address = IOREMAP_BASE;
address_markers[8].start_address = IOREMAP_END; address_markers[8].start_address = IOREMAP_END;
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
address_markers[9].start_address = H_VMEMMAP_BASE; address_markers[9].start_address = H_VMEMMAP_BASE;
#else #else
address_markers[9].start_address = VMEMMAP_BASE; address_markers[9].start_address = VMEMMAP_BASE;
......
...@@ -112,7 +112,7 @@ struct flag_info { ...@@ -112,7 +112,7 @@ struct flag_info {
static const struct flag_info flag_array[] = { static const struct flag_info flag_array[] = {
{ {
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
.mask = _PAGE_PRIVILEGED, .mask = _PAGE_PRIVILEGED,
.val = 0, .val = 0,
#else #else
...@@ -147,7 +147,7 @@ static const struct flag_info flag_array[] = { ...@@ -147,7 +147,7 @@ static const struct flag_info flag_array[] = {
.set = "present", .set = "present",
.clear = " ", .clear = " ",
}, { }, {
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
.mask = H_PAGE_HASHPTE, .mask = H_PAGE_HASHPTE,
.val = H_PAGE_HASHPTE, .val = H_PAGE_HASHPTE,
#else #else
...@@ -157,7 +157,7 @@ static const struct flag_info flag_array[] = { ...@@ -157,7 +157,7 @@ static const struct flag_info flag_array[] = {
.set = "hpte", .set = "hpte",
.clear = " ", .clear = " ",
}, { }, {
#ifndef CONFIG_PPC_STD_MMU_64 #ifndef CONFIG_PPC_BOOK3S_64
.mask = _PAGE_GUARDED, .mask = _PAGE_GUARDED,
.val = _PAGE_GUARDED, .val = _PAGE_GUARDED,
.set = "guarded", .set = "guarded",
...@@ -174,7 +174,7 @@ static const struct flag_info flag_array[] = { ...@@ -174,7 +174,7 @@ static const struct flag_info flag_array[] = {
.set = "accessed", .set = "accessed",
.clear = " ", .clear = " ",
}, { }, {
#ifndef CONFIG_PPC_STD_MMU_64 #ifndef CONFIG_PPC_BOOK3S_64
.mask = _PAGE_WRITETHRU, .mask = _PAGE_WRITETHRU,
.val = _PAGE_WRITETHRU, .val = _PAGE_WRITETHRU,
.set = "write through", .set = "write through",
...@@ -450,7 +450,7 @@ static void populate_markers(void) ...@@ -450,7 +450,7 @@ static void populate_markers(void)
address_markers[i++].start_address = PHB_IO_END; address_markers[i++].start_address = PHB_IO_END;
address_markers[i++].start_address = IOREMAP_BASE; address_markers[i++].start_address = IOREMAP_BASE;
address_markers[i++].start_address = IOREMAP_END; address_markers[i++].start_address = IOREMAP_END;
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
address_markers[i++].start_address = H_VMEMMAP_BASE; address_markers[i++].start_address = H_VMEMMAP_BASE;
#else #else
address_markers[i++].start_address = VMEMMAP_BASE; address_markers[i++].start_address = VMEMMAP_BASE;
......
...@@ -68,11 +68,11 @@ ...@@ -68,11 +68,11 @@
#include "mmu_decl.h" #include "mmu_decl.h"
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
#if H_PGTABLE_RANGE > USER_VSID_RANGE #if H_PGTABLE_RANGE > USER_VSID_RANGE
#warning Limited user VSID range means pagetable space is wasted #warning Limited user VSID range means pagetable space is wasted
#endif #endif
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
phys_addr_t memstart_addr = ~0; phys_addr_t memstart_addr = ~0;
EXPORT_SYMBOL_GPL(memstart_addr); EXPORT_SYMBOL_GPL(memstart_addr);
...@@ -367,7 +367,7 @@ EXPORT_SYMBOL_GPL(realmode_pfn_to_page); ...@@ -367,7 +367,7 @@ EXPORT_SYMBOL_GPL(realmode_pfn_to_page);
#endif /* CONFIG_SPARSEMEM_VMEMMAP */ #endif /* CONFIG_SPARSEMEM_VMEMMAP */
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
static bool disable_radix; static bool disable_radix;
static int __init parse_disable_radix(char *p) static int __init parse_disable_radix(char *p)
{ {
...@@ -444,4 +444,4 @@ void __init mmu_early_init_devtree(void) ...@@ -444,4 +444,4 @@ void __init mmu_early_init_devtree(void)
else else
hash__early_init_devtree(); hash__early_init_devtree();
} }
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#include "mmu_decl.h" #include "mmu_decl.h"
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
#if TASK_SIZE_USER64 > (1UL << (ESID_BITS + SID_SHIFT)) #if TASK_SIZE_USER64 > (1UL << (ESID_BITS + SID_SHIFT))
#error TASK_SIZE_USER64 exceeds user VSID range #error TASK_SIZE_USER64 exceeds user VSID range
#endif #endif
......
...@@ -294,10 +294,6 @@ config PPC_STD_MMU_32 ...@@ -294,10 +294,6 @@ config PPC_STD_MMU_32
def_bool y def_bool y
depends on PPC_STD_MMU && PPC32 depends on PPC_STD_MMU && PPC32
config PPC_STD_MMU_64
def_bool y
depends on PPC_STD_MMU && PPC64
config PPC_RADIX_MMU config PPC_RADIX_MMU
bool "Radix MMU Support" bool "Radix MMU Support"
depends on PPC_BOOK3S_64 depends on PPC_BOOK3S_64
...@@ -323,7 +319,7 @@ config PPC_BOOK3E_MMU ...@@ -323,7 +319,7 @@ config PPC_BOOK3E_MMU
config PPC_MM_SLICES config PPC_MM_SLICES
bool bool
default y if PPC_STD_MMU_64 default y if PPC_BOOK3S_64
default n default n
config PPC_HAVE_PMU_SUPPORT config PPC_HAVE_PMU_SUPPORT
......
...@@ -93,7 +93,7 @@ void vpa_init(int cpu) ...@@ -93,7 +93,7 @@ void vpa_init(int cpu)
return; return;
} }
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
/* /*
* PAPR says this feature is SLB-Buffer but firmware never * PAPR says this feature is SLB-Buffer but firmware never
* reports that. All SPLPAR support SLB shadow buffer. * reports that. All SPLPAR support SLB shadow buffer.
...@@ -106,7 +106,7 @@ void vpa_init(int cpu) ...@@ -106,7 +106,7 @@ void vpa_init(int cpu)
"cpu %d (hw %d) of area %lx failed with %ld\n", "cpu %d (hw %d) of area %lx failed with %ld\n",
cpu, hwcpu, addr, ret); cpu, hwcpu, addr, ret);
} }
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
/* /*
* Register dispatch trace log, if one has been allocated. * Register dispatch trace log, if one has been allocated.
...@@ -129,7 +129,7 @@ void vpa_init(int cpu) ...@@ -129,7 +129,7 @@ void vpa_init(int cpu)
} }
} }
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
static long pSeries_lpar_hpte_insert(unsigned long hpte_group, static long pSeries_lpar_hpte_insert(unsigned long hpte_group,
unsigned long vpn, unsigned long pa, unsigned long vpn, unsigned long pa,
...@@ -824,7 +824,7 @@ void arch_free_page(struct page *page, int order) ...@@ -824,7 +824,7 @@ void arch_free_page(struct page *page, int order)
EXPORT_SYMBOL(arch_free_page); EXPORT_SYMBOL(arch_free_page);
#endif /* CONFIG_PPC_SMLPAR */ #endif /* CONFIG_PPC_SMLPAR */
#endif /* CONFIG_PPC_STD_MMU_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
#ifdef CONFIG_TRACEPOINTS #ifdef CONFIG_TRACEPOINTS
#ifdef HAVE_JUMP_LABEL #ifdef HAVE_JUMP_LABEL
......
...@@ -485,7 +485,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) ...@@ -485,7 +485,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
seq_printf(m, "shared_processor_mode=%d\n", seq_printf(m, "shared_processor_mode=%d\n",
lppaca_shared_proc(get_lppaca())); lppaca_shared_proc(get_lppaca()));
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
seq_printf(m, "slb_size=%d\n", mmu_slb_size); seq_printf(m, "slb_size=%d\n", mmu_slb_size);
#endif #endif
parse_em_data(m); parse_em_data(m);
......
...@@ -2312,7 +2312,7 @@ static void dump_tracing(void) ...@@ -2312,7 +2312,7 @@ static void dump_tracing(void)
static void dump_one_paca(int cpu) static void dump_one_paca(int cpu)
{ {
struct paca_struct *p; struct paca_struct *p;
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
int i = 0; int i = 0;
#endif #endif
...@@ -2353,7 +2353,7 @@ static void dump_one_paca(int cpu) ...@@ -2353,7 +2353,7 @@ static void dump_one_paca(int cpu)
DUMP(p, hw_cpu_id, "x"); DUMP(p, hw_cpu_id, "x");
DUMP(p, cpu_start, "x"); DUMP(p, cpu_start, "x");
DUMP(p, kexec_state, "x"); DUMP(p, kexec_state, "x");
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
for (i = 0; i < SLB_NUM_BOLTED; i++) { for (i = 0; i < SLB_NUM_BOLTED; i++) {
u64 esid, vsid; u64 esid, vsid;
...@@ -3263,7 +3263,7 @@ static void xmon_print_symbol(unsigned long address, const char *mid, ...@@ -3263,7 +3263,7 @@ static void xmon_print_symbol(unsigned long address, const char *mid,
printf("%s", after); printf("%s", after);
} }
#ifdef CONFIG_PPC_STD_MMU_64 #ifdef CONFIG_PPC_BOOK3S_64
void dump_segments(void) void dump_segments(void)
{ {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment