diff options
author | Mihai Caraman <mihai.caraman@freescale.com> | 2014-04-17 09:26:14 (GMT) |
---|---|---|
committer | Jose Rivera <German.Rivera@freescale.com> | 2014-04-30 01:24:50 (GMT) |
commit | 993d07a27f10ad4a5d4847d964a6634674c4e2ee (patch) | |
tree | c0824d859cbfd004cda14fb517cfe0e2068ea2cd /arch/powerpc/mm | |
parent | b3737b95683d33e9c5bf71f9aa4bedf2a34527c3 (diff) | |
download | linux-fsl-qoriq-993d07a27f10ad4a5d4847d964a6634674c4e2ee.tar.xz |
powerpc/booke64: Add LRAT next and max entries to tlb_per_core structure
LRAT (Logical to Real Address Translation) is shared between hw threads.
Add LRAT next and max entries to tlb_per_core data structure and initialize them.
Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
(cherry picked and merged from sdk1.5 commit aa10cefcc1588338b3a80e842bc4db351dcec176)
Change-Id: If229acd9f4ae28fb49ce42132831d720bd436b84
Reviewed-on: http://git.am.freescale.net:8181/11558
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Stuart Yoder <stuart.yoder@freescale.com>
Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/fsl_booke_mmu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index aada5a3..136871d 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c @@ -198,6 +198,15 @@ unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx) get_paca()->tlb_per_core.esel_max = mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY; get_paca()->tlb_per_core.esel_first = i; + + get_paca()->tlb_per_core.lrat_next = 0; + if (((mfspr(SPRN_MMUCFG) & MMUCFG_MAVN) == MMUCFG_MAVN_V2) && + (mfspr(SPRN_MMUCFG) & MMUCFG_LRAT)) { + get_paca()->tlb_per_core.lrat_max = + mfspr(SPRN_LRATCFG) & LRATCFG_NENTRY; + } else { + get_paca()->tlb_per_core.lrat_max = 0; + } #endif return amount_mapped; |