Skip to contentSkip to conversation

powerpc/fsl-booke: Rework TLB CAM code

PATCH New Kumar Gala 1 participant 1 message Nov 5, 2009 PowerPC

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH v2 1/1 powerpc/fsl-booke: Rework TLB CAM code

Re-write the code so its more standalone and fixed some issues:
* Bump'd # of CAM entries to 64 to support e500mc
* Make the code handle MAS7 properly
* Use pr_cont instead of creating a string as we go

---
* Fix compile warning

 arch/powerpc/kernel/asm-offsets.c    |    3 -
 arch/powerpc/kernel/head_fsl_booke.S |   22 ------
 arch/powerpc/mm/fsl_booke_mmu.c      |  132 +++++++++++++++++++---------------
 arch/powerpc/mm/mmu_decl.h           |   11 ---
 4 files changed, 74 insertions(+), 94 deletions(-)
arch/powerpc/kernel/asm-offsets.c +0 -3
index e2e2082..a6c2b63 100644
@@ -421,9 +421,6 @@ int main(void)
 	DEFINE(PGD_T_LOG2, PGD_T_LOG2);
 	DEFINE(PTE_T_LOG2, PTE_T_LOG2);
 #endif
-#ifdef CONFIG_FSL_BOOKE
-	DEFINE(TLBCAM_SIZE, sizeof(struct tlbcam));
-#endif
 
 #ifdef CONFIG_KVM_EXIT_TIMING
 	DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu,
arch/powerpc/kernel/head_fsl_booke.S +0 -22
index 975788c..7f4bd7f 100644
@@ -944,28 +944,6 @@ _GLOBAL(__setup_e500mc_ivors)
 	blr
 
 /*
- * extern void loadcam_entry(unsigned int index)
- *
- * Load TLBCAM[index] entry in to the L2 CAM MMU
- */
-_GLOBAL(loadcam_entry)
-	lis	r4,TLBCAM@ha
-	addi	r4,r4,TLBCAM@l
-	mulli	r5,r3,TLBCAM_SIZE
-	add	r3,r5,r4
-	lwz	r4,0(r3)
-	mtspr	SPRN_MAS0,r4
-	lwz	r4,4(r3)
-	mtspr	SPRN_MAS1,r4
-	lwz	r4,8(r3)
-	mtspr	SPRN_MAS2,r4
-	lwz	r4,12(r3)
-	mtspr	SPRN_MAS3,r4
-	tlbwe
-	isync
-	blr
-
-/*
  * extern void giveup_altivec(struct task_struct *prev)
  *
  * The e500 core does not have an AltiVec unit.
arch/powerpc/mm/fsl_booke_mmu.c +74 -58

204 lines not on this page · raw message

arch/powerpc/mm/mmu_decl.h +0 -11
index d2e5321..e27a990 100644
@@ -98,21 +98,10 @@ extern void _tlbia(void);
 
 #ifdef CONFIG_PPC32
 
-struct tlbcam {
-	u32	MAS0;
-	u32	MAS1;
-	u32	MAS2;
-	u32	MAS3;
-	u32	MAS7;
-};
-
 extern void mapin_ram(void);
 extern int map_page(unsigned long va, phys_addr_t pa, int flags);
 extern void setbat(int index, unsigned long virt, phys_addr_t phys,
 		   unsigned int size, int flags);
-extern void settlbcam(int index, unsigned long virt, phys_addr_t phys,
-		      unsigned int size, int flags, unsigned int pid);
-extern void invalidate_tlbcam_entry(int index);
 
 extern int __map_without_bats;
 extern unsigned long ioremap_base;
Signature · 1 line
1.6.0.6