diff options
author | Kumar Gala <galak@freescale.com> | 2005-06-21 20:15:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 21:46:24 -0400 |
commit | 5be061eee931db2718feecaf10df17610386202b (patch) | |
tree | 1e78b9993aaa8f176dd2a71c2d6ef01e224b34b8 /arch/ppc/mm | |
parent | 65145e060b1c933ebc4215c3b493f586e08a1d5c (diff) |
[PATCH] ppc32: Clean up NUM_TLBCAMS usage for Freescale Book-E PPC's
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>
Diffstat (limited to 'arch/ppc/mm')
-rw-r--r-- | arch/ppc/mm/fsl_booke_mmu.c | 2 | ||||
-rw-r--r-- | arch/ppc/mm/mmu_decl.h | 2 | ||||
-rw-r--r-- | arch/ppc/mm/pgtable.c | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c index 36233bdcdf8f..e07990efa046 100644 --- a/arch/ppc/mm/fsl_booke_mmu.c +++ b/arch/ppc/mm/fsl_booke_mmu.c | |||
@@ -64,6 +64,8 @@ extern unsigned long total_lowmem; | |||
64 | extern unsigned long __max_low_memory; | 64 | extern unsigned long __max_low_memory; |
65 | #define MAX_LOW_MEM CONFIG_LOWMEM_SIZE | 65 | #define MAX_LOW_MEM CONFIG_LOWMEM_SIZE |
66 | 66 | ||
67 | #define NUM_TLBCAMS (16) | ||
68 | |||
67 | struct tlbcam { | 69 | struct tlbcam { |
68 | u32 MAS0; | 70 | u32 MAS0; |
69 | u32 MAS1; | 71 | u32 MAS1; |
diff --git a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h index ffcdb46997dc..540f3292b229 100644 --- a/arch/ppc/mm/mmu_decl.h +++ b/arch/ppc/mm/mmu_decl.h | |||
@@ -43,6 +43,8 @@ extern int mem_init_done; | |||
43 | extern PTE *Hash, *Hash_end; | 43 | extern PTE *Hash, *Hash_end; |
44 | extern unsigned long Hash_size, Hash_mask; | 44 | extern unsigned long Hash_size, Hash_mask; |
45 | 45 | ||
46 | extern unsigned int num_tlbcam_entries; | ||
47 | |||
46 | /* ...and now those things that may be slightly different between processor | 48 | /* ...and now those things that may be slightly different between processor |
47 | * architectures. -- Dan | 49 | * architectures. -- Dan |
48 | */ | 50 | */ |
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 5d2f3f66aefa..81a3d7446d37 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c | |||
@@ -66,7 +66,6 @@ void setbat(int index, unsigned long virt, unsigned long phys, | |||
66 | 66 | ||
67 | #ifdef HAVE_TLBCAM | 67 | #ifdef HAVE_TLBCAM |
68 | extern unsigned int tlbcam_index; | 68 | extern unsigned int tlbcam_index; |
69 | extern unsigned int num_tlbcam_entries; | ||
70 | extern unsigned long v_mapped_by_tlbcam(unsigned long va); | 69 | extern unsigned long v_mapped_by_tlbcam(unsigned long va); |
71 | extern unsigned long p_mapped_by_tlbcam(unsigned long pa); | 70 | extern unsigned long p_mapped_by_tlbcam(unsigned long pa); |
72 | #else /* !HAVE_TLBCAM */ | 71 | #else /* !HAVE_TLBCAM */ |