aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm
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/mm
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/mm')
-rw-r--r--arch/sparc64/mm/fault.c2
-rw-r--r--arch/sparc64/mm/init.c23
2 files changed, 22 insertions, 3 deletions
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c
index 80793d61f311..31fbc67719a1 100644
--- a/arch/sparc64/mm/fault.c
+++ b/arch/sparc64/mm/fault.c
@@ -32,8 +32,6 @@
32 32
33#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0])) 33#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))
34 34
35extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
36
37/* 35/*
38 * To debug kernel to catch accesses to certain virtual/physical addresses. 36 * To debug kernel to catch accesses to certain virtual/physical addresses.
39 * Mode = 0 selects physical watchpoints, mode = 1 selects virtual watchpoints. 37 * Mode = 0 selects physical watchpoints, mode = 1 selects virtual watchpoints.
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;