aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/traps.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-09-29 00:46:43 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-09-29 00:46:43 -0400
commit10147570f9eaff3920f0c67bad7244c2eb958d4f (patch)
tree213bdf97f2ac9d2dc3708db19da4ea41ca4f1606 /arch/sparc64/kernel/traps.c
parent0836a0eb4073c3e0a09c5965833b9dec19f5abc7 (diff)
[SPARC64]: Kill all external references to sp_banks[]
Thus, we can mark sp_banks[] static in arch/sparc64/mm/init.c Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/traps.c')
-rw-r--r--arch/sparc64/kernel/traps.c33
1 files changed, 6 insertions, 27 deletions
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 1aa15990f5af..eeb1e835c423 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -757,26 +757,12 @@ void __init cheetah_ecache_flush_init(void)
757 ecache_flush_size = (2 * largest_size); 757 ecache_flush_size = (2 * largest_size);
758 ecache_flush_linesize = smallest_linesize; 758 ecache_flush_linesize = smallest_linesize;
759 759
760 /* Discover a physically contiguous chunk of physical 760 ecache_flush_physbase = find_ecache_flush_span(ecache_flush_size);
761 * memory in 'sp_banks' of size ecache_flush_size calculated
762 * above. Store the physical base of this area at
763 * ecache_flush_physbase.
764 */
765 for (node = 0; ; node++) {
766 if (sp_banks[node].num_bytes == 0)
767 break;
768 if (sp_banks[node].num_bytes >= ecache_flush_size) {
769 ecache_flush_physbase = sp_banks[node].base_addr;
770 break;
771 }
772 }
773 761
774 /* Note: Zero would be a valid value of ecache_flush_physbase so 762 if (ecache_flush_physbase == ~0UL) {
775 * don't use that as the success test. :-)
776 */
777 if (sp_banks[node].num_bytes == 0) {
778 prom_printf("cheetah_ecache_flush_init: Cannot find %d byte " 763 prom_printf("cheetah_ecache_flush_init: Cannot find %d byte "
779 "contiguous physical memory.\n", ecache_flush_size); 764 "contiguous physical memory.\n",
765 ecache_flush_size);
780 prom_halt(); 766 prom_halt();
781 } 767 }
782 768
@@ -1345,16 +1331,9 @@ static int cheetah_fix_ce(unsigned long physaddr)
1345/* Return non-zero if PADDR is a valid physical memory address. */ 1331/* Return non-zero if PADDR is a valid physical memory address. */
1346static int cheetah_check_main_memory(unsigned long paddr) 1332static int cheetah_check_main_memory(unsigned long paddr)
1347{ 1333{
1348 int i; 1334 unsigned long vaddr = PAGE_OFFSET + paddr;
1349 1335
1350 for (i = 0; ; i++) { 1336 return kern_addr_valid(vaddr);
1351 if (sp_banks[i].num_bytes == 0)
1352 break;
1353 if (paddr >= sp_banks[i].base_addr &&
1354 paddr < (sp_banks[i].base_addr + sp_banks[i].num_bytes))
1355 return 1;
1356 }
1357 return 0;
1358} 1337}
1359 1338
1360void cheetah_cee_handler(struct pt_regs *regs, unsigned long afsr, unsigned long afar) 1339void cheetah_cee_handler(struct pt_regs *regs, unsigned long afsr, unsigned long afar)