linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@freescale.com>
To: linuxppc-dev@ozlabs.org
Cc: Trent Piepho <tpiepho@freescale.com>
Subject: [PATCH 2/5] powerpc: booke: Remove num_tlbcam_entries
Date: Mon,  8 Dec 2008 19:34:56 -0800	[thread overview]
Message-ID: <1228793699-23110-2-git-send-email-tpiepho@freescale.com> (raw)
In-Reply-To: <1228793699-23110-1-git-send-email-tpiepho@freescale.com>

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(-)

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;
-- 
1.5.4.1

  reply	other threads:[~2008-12-09  3:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09  3:34 [PATCH 1/5] powerpc: booke: Don't hard-code size of struct tlbcam Trent Piepho
2008-12-09  3:34 ` Trent Piepho [this message]
2009-01-07 16:04   ` [PATCH 2/5] powerpc: booke: Remove num_tlbcam_entries Kumar Gala
2008-12-09  3:34 ` [PATCH 3/5] powerpc: booke: Remove code duplication in lowmem mapping Trent Piepho
2009-01-07 16:13   ` Kumar Gala
2009-01-13 15:43   ` Kumar Gala
2008-12-09  3:34 ` [PATCH 4/5] powerpc: booke: Make CAM entries used for lowmem configurable Trent Piepho
2009-01-13 15:43   ` Kumar Gala
2008-12-09  3:34 ` [PATCH 5/5] powerpc: booke: Allow larger CAM sizes than 256 MB Trent Piepho
2009-01-13 15:43   ` Kumar Gala
2008-12-09 14:26 ` [PATCH 1/5] powerpc: booke: Don't hard-code size of struct tlbcam Josh Boyer
2009-01-07 16:17   ` Kumar Gala
2009-01-07 16:03 ` Kumar Gala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1228793699-23110-2-git-send-email-tpiepho@freescale.com \
    --to=tpiepho@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).