Patchwork [2/5] powerpc: booke: Remove num_tlbcam_entries

login
register
mail settings
Submitter Trent Piepho
Date Dec. 9, 2008, 3:34 a.m.
Message ID <1228793699-23110-2-git-send-email-tpiepho@freescale.com>
Download mbox | patch
Permalink /patch/12882/
State Accepted, archived
Commit 6fd8be4bf72879b3039654388e985cabf8449af5
Delegated to: Kumar Gala
Headers show

Comments

Trent Piepho - Dec. 9, 2008, 3:34 a.m.
This is a global variable defined in fsl_booke_mmu.c with a value that gets
initialized in assembly code in head_fsl_booke.S.

It's never used.

If some code ever does want to know the number of entries in TLB1, then
"numcams = mfspr(SPRN_TLB1CFG) & 0xfff", is a whole lot simpler than a
global initialized during kernel boot from assembly.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
---
 arch/powerpc/kernel/head_fsl_booke.S |    4 ----
 arch/powerpc/mm/fsl_booke_mmu.c      |    1 -
 arch/powerpc/mm/mmu_decl.h           |    2 --
 3 files changed, 0 insertions(+), 7 deletions(-)
Kumar Gala - Jan. 7, 2009, 4:04 p.m.
On Dec 8, 2008, at 9:34 PM, Trent Piepho wrote:

> This is a global variable defined in fsl_booke_mmu.c with a value  
> that gets
> initialized in assembly code in head_fsl_booke.S.
>
> It's never used.
>
> If some code ever does want to know the number of entries in TLB1,  
> then
> "numcams = mfspr(SPRN_TLB1CFG) & 0xfff", is a whole lot simpler than a
> global initialized during kernel boot from assembly.
>
> Signed-off-by: Trent Piepho <tpiepho@freescale.com>
> ---
> arch/powerpc/kernel/head_fsl_booke.S |    4 ----
> arch/powerpc/mm/fsl_booke_mmu.c      |    1 -
> arch/powerpc/mm/mmu_decl.h           |    2 --
> 3 files changed, 0 insertions(+), 7 deletions(-)

applied to next

- k

Patch

diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index c591acb..e33021f 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -389,10 +389,6 @@  skpinv:	addi	r6,r6,1				/* Increment */
 #endif
 #endif
 
-	mfspr	r3,SPRN_TLB1CFG
-	andi.	r3,r3,0xfff
-	lis	r4,num_tlbcam_entries@ha
-	stw	r3,num_tlbcam_entries@l(r4)
 /*
  * Decide what sort of machine this is and initialize the MMU.
  */
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index c9ee59a..1971e4e 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -56,7 +56,6 @@ 
 
 extern void loadcam_entry(unsigned int index);
 unsigned int tlbcam_index;
-unsigned int num_tlbcam_entries;
 static unsigned long __cam0, __cam1, __cam2;
 
 #define NUM_TLBCAMS	(16)
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index f0d0aae..1db3c67 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -51,8 +51,6 @@  extern unsigned int rtas_data, rtas_size;
 struct hash_pte;
 extern struct hash_pte *Hash, *Hash_end;
 extern unsigned long Hash_size, Hash_mask;
-
-extern unsigned int num_tlbcam_entries;
 #endif
 
 extern unsigned long ioremap_bot;