powerpc/book-3e: Introduce concept of Book-3e MMU
The Power ISA 2.06 spec introduces a standard MMU programming model that is based on the Freescale Book-E MMU programing model. The Freescale version is pretty backwards compatiable with the ISA 2.06 definition so we are starting to refactor some of the Freescale code so it can be easily shared. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
@@ -71,9 +71,9 @@ extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup;
|
|||||||
#elif defined(CONFIG_44x)
|
#elif defined(CONFIG_44x)
|
||||||
/* 44x-style software loaded TLB */
|
/* 44x-style software loaded TLB */
|
||||||
# include <asm/mmu-44x.h>
|
# include <asm/mmu-44x.h>
|
||||||
#elif defined(CONFIG_FSL_BOOKE)
|
#elif defined(CONFIG_PPC_BOOK3E_MMU)
|
||||||
/* Freescale Book-E software loaded TLB */
|
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
|
||||||
# include <asm/mmu-fsl-booke.h>
|
# include <asm/mmu-book3e.h>
|
||||||
#elif defined (CONFIG_PPC_8xx)
|
#elif defined (CONFIG_PPC_8xx)
|
||||||
/* Motorola/Freescale 8xx software loaded TLB */
|
/* Motorola/Freescale 8xx software loaded TLB */
|
||||||
# include <asm/mmu-8xx.h>
|
# include <asm/mmu-8xx.h>
|
||||||
|
@@ -63,7 +63,7 @@ debug_transfer_to_handler:
|
|||||||
|
|
||||||
.globl crit_transfer_to_handler
|
.globl crit_transfer_to_handler
|
||||||
crit_transfer_to_handler:
|
crit_transfer_to_handler:
|
||||||
#ifdef CONFIG_FSL_BOOKE
|
#ifdef CONFIG_PPC_BOOK3E_MMU
|
||||||
mfspr r0,SPRN_MAS0
|
mfspr r0,SPRN_MAS0
|
||||||
stw r0,MAS0(r11)
|
stw r0,MAS0(r11)
|
||||||
mfspr r0,SPRN_MAS1
|
mfspr r0,SPRN_MAS1
|
||||||
@@ -78,7 +78,7 @@ crit_transfer_to_handler:
|
|||||||
mfspr r0,SPRN_MAS7
|
mfspr r0,SPRN_MAS7
|
||||||
stw r0,MAS7(r11)
|
stw r0,MAS7(r11)
|
||||||
#endif /* CONFIG_PHYS_64BIT */
|
#endif /* CONFIG_PHYS_64BIT */
|
||||||
#endif /* CONFIG_FSL_BOOKE */
|
#endif /* CONFIG_PPC_BOOK3E_MMU */
|
||||||
#ifdef CONFIG_44x
|
#ifdef CONFIG_44x
|
||||||
mfspr r0,SPRN_MMUCR
|
mfspr r0,SPRN_MMUCR
|
||||||
stw r0,MMUCR(r11)
|
stw r0,MMUCR(r11)
|
||||||
@@ -914,7 +914,7 @@ exc_exit_restart_end:
|
|||||||
mtspr SPRN_##exc_lvl_srr0,r9; \
|
mtspr SPRN_##exc_lvl_srr0,r9; \
|
||||||
mtspr SPRN_##exc_lvl_srr1,r10;
|
mtspr SPRN_##exc_lvl_srr1,r10;
|
||||||
|
|
||||||
#if defined(CONFIG_FSL_BOOKE)
|
#if defined(CONFIG_PPC_BOOK3E_MMU)
|
||||||
#ifdef CONFIG_PHYS_64BIT
|
#ifdef CONFIG_PHYS_64BIT
|
||||||
#define RESTORE_MAS7 \
|
#define RESTORE_MAS7 \
|
||||||
lwz r11,MAS7(r1); \
|
lwz r11,MAS7(r1); \
|
||||||
|
@@ -210,6 +210,10 @@ config PPC_MMU_NOHASH
|
|||||||
def_bool y
|
def_bool y
|
||||||
depends on !PPC_STD_MMU
|
depends on !PPC_STD_MMU
|
||||||
|
|
||||||
|
config PPC_BOOK3E_MMU
|
||||||
|
def_bool y
|
||||||
|
depends on FSL_BOOKE
|
||||||
|
|
||||||
config PPC_MM_SLICES
|
config PPC_MM_SLICES
|
||||||
bool
|
bool
|
||||||
default y if HUGETLB_PAGE || (PPC_STD_MMU_64 && PPC_64K_PAGES)
|
default y if HUGETLB_PAGE || (PPC_STD_MMU_64 && PPC_64K_PAGES)
|
||||||
|
Reference in New Issue
Block a user