aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r--arch/sparc64/mm/init.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 63a7b9bafaff..48851a2e4fe1 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -41,7 +41,14 @@
41 41
42extern void device_scan(void); 42extern void device_scan(void);
43 43
44struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; 44struct sparc_phys_banks {
45 unsigned long base_addr;
46 unsigned long num_bytes;
47};
48
49#define SPARC_PHYS_BANKS 32
50
51static struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
45 52
46unsigned long *sparc64_valid_addr_bitmap __read_mostly; 53unsigned long *sparc64_valid_addr_bitmap __read_mostly;
47 54
@@ -1425,6 +1432,20 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
1425} 1432}
1426#endif 1433#endif
1427 1434
1435unsigned long __init find_ecache_flush_span(unsigned long size)
1436{
1437 unsigned long i;
1438
1439 for (i = 0; ; i++) {
1440 if (sp_banks[i].num_bytes == 0)
1441 break;
1442 if (sp_banks[i].num_bytes >= size)
1443 return sp_banks[i].base_addr;
1444 }
1445
1446 return ~0UL;
1447}
1448
1428static void __init prom_probe_memory(void) 1449static void __init prom_probe_memory(void)
1429{ 1450{
1430 struct linux_mlist_p1275 *mlist; 1451 struct linux_mlist_p1275 *mlist;