]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ppc32: Clean up NUM_TLBCAMS usage for Freescale Book-E PPC's
authorKumar Gala <galak@freescale.com>
Wed, 22 Jun 2005 00:15:26 +0000 (17:15 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 22 Jun 2005 01:46:24 +0000 (18:46 -0700)
Made the number of TLB CAM entries private and converted the board
consumers to use num_tlbcam_entries which is setup at boot time from
configuration registers.  This way the only consumers of the #define
NUM_TLBCAMS are the arrays used to manage the TLB.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/mm/fsl_booke_mmu.c
arch/ppc/mm/mmu_decl.h
arch/ppc/mm/pgtable.c
arch/ppc/platforms/85xx/mpc8540_ads.c
arch/ppc/platforms/85xx/mpc85xx_cds_common.c
arch/ppc/platforms/85xx/sbc8560.c
include/asm-ppc/pgtable.h

index 36233bdcdf8ff7590b64941ef05430851a18a1d6..e07990efa046e238b8dcc4deadff38bb80afcf3d 100644 (file)
@@ -64,6 +64,8 @@ extern unsigned long total_lowmem;
 extern unsigned long __max_low_memory;
 #define MAX_LOW_MEM    CONFIG_LOWMEM_SIZE
 
+#define NUM_TLBCAMS    (16)
+
 struct tlbcam {
        u32     MAS0;
        u32     MAS1;
index ffcdb46997dc3396463b55990f36b9dea2b17828..540f3292b2291f0c1e2cc78ccbdf87b5feac39b3 100644 (file)
@@ -43,6 +43,8 @@ extern int mem_init_done;
 extern PTE *Hash, *Hash_end;
 extern unsigned long Hash_size, Hash_mask;
 
+extern unsigned int num_tlbcam_entries;
+
 /* ...and now those things that may be slightly different between processor
  * architectures.  -- Dan
  */
index 5d2f3f66aefa6a695ed19fa9e069f61c03434dc9..81a3d7446d3718576505f4cd847c75c644bd33e2 100644 (file)
@@ -66,7 +66,6 @@ void setbat(int index, unsigned long virt, unsigned long phys,
 
 #ifdef HAVE_TLBCAM
 extern unsigned int tlbcam_index;
-extern unsigned int num_tlbcam_entries;
 extern unsigned long v_mapped_by_tlbcam(unsigned long va);
 extern unsigned long p_mapped_by_tlbcam(unsigned long pa);
 #else /* !HAVE_TLBCAM */
index 583838ab02d8370a97d22640915a3fed84d1eaf6..d1c2c6cb30006942f5f8d894ffa4f0f0237ee340 100644 (file)
@@ -88,7 +88,7 @@ mpc8540ads_setup_arch(void)
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        /* Invalidate the entry we stole earlier the serial ports
         * should be properly mapped */
-       invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
+       invalidate_tlbcam_entry(num_tlbcam_entries - 1);
 #endif
 
        /* setup the board related information for the enet controllers */
@@ -150,7 +150,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                struct uart_port p;
 
                /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
-               settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base,
+               settlbcam(num_tlbcam_entries - 1, binfo->bi_immr_base,
                          binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0);
 
                memset(&p, 0, sizeof (p));
index bee6633f460117168841233fb7eb6f0f7eec73f4..51964b3081eb69649232664ba8ac9d377d3d1a55 100644 (file)
@@ -446,7 +446,7 @@ mpc85xx_cds_setup_arch(void)
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        /* Invalidate the entry we stole earlier the serial ports
         * should be properly mapped */
-       invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
+       invalidate_tlbcam_entry(num_tlbcam_entries - 1);
 #endif
 
        /* setup the board related information for the enet controllers */
@@ -528,7 +528,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                struct uart_port p;
 
                /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
-               settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base,
+               settlbcam(num_tlbcam_entries - 1, binfo->bi_immr_base,
                                binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0);
 
                memset(&p, 0, sizeof (p));
index 7b9e1543e17524e6301e4c45cd9d77b4a6b8967e..42e960a0bf33e2012c399674449250a7f3d3109e 100644 (file)
@@ -125,7 +125,7 @@ sbc8560_setup_arch(void)
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        /* Invalidate the entry we stole earlier the serial ports
         * should be properly mapped */ 
-       invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
+       invalidate_tlbcam_entry(num_tlbcam_entries - 1);
 #endif
 
        /* setup the board related information for the enet controllers */
@@ -176,7 +176,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
-       settlbcam(NUM_TLBCAMS - 1, UARTA_ADDR,
+       settlbcam(num_tlbcam_entries - 1, UARTA_ADDR,
                  UARTA_ADDR, 0x1000, _PAGE_IO, 0);
 #endif
 
index a38606d15549ac326babf08d583972a4be973d07..4d4b20c9de78fbf31097ea3cb5e098b352cf73f7 100644 (file)
@@ -267,8 +267,6 @@ extern unsigned long ioremap_bot, ioremap_base;
 #define _PMD_PRESENT_MASK (PAGE_MASK)
 #define _PMD_BAD       (~PAGE_MASK)
 
-#define NUM_TLBCAMS    (16)
-
 #elif defined(CONFIG_8xx)
 /* Definitions for 8xx embedded chips. */
 #define _PAGE_PRESENT  0x0001  /* Page is valid */