diff options
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r-- | arch/sparc64/mm/init.c | 23 |
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 | ||
42 | extern void device_scan(void); | 42 | extern void device_scan(void); |
43 | 43 | ||
44 | struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; | 44 | struct sparc_phys_banks { |
45 | unsigned long base_addr; | ||
46 | unsigned long num_bytes; | ||
47 | }; | ||
48 | |||
49 | #define SPARC_PHYS_BANKS 32 | ||
50 | |||
51 | static struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; | ||
45 | 52 | ||
46 | unsigned long *sparc64_valid_addr_bitmap __read_mostly; | 53 | unsigned 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 | ||
1435 | unsigned 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 | |||
1428 | static void __init prom_probe_memory(void) | 1449 | static void __init prom_probe_memory(void) |
1429 | { | 1450 | { |
1430 | struct linux_mlist_p1275 *mlist; | 1451 | struct linux_mlist_p1275 *mlist; |