aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/mm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-09-28 21:46:43 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-09-28 21:46:43 -0700
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 80793d61f31..31fbc67719a 100644
--- a/arch/sparc64/mm/fault.c
+++ b/arch/sparc64/mm/fault.c
@@ -32,8 +32,6 @@
#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))
-extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
-
/*
* To debug kernel to catch accesses to certain virtual/physical addresses.
* 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 63a7b9bafaf..48851a2e4fe 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -41,7 +41,14 @@
extern void device_scan(void);
-struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
+struct sparc_phys_banks {
+ unsigned long base_addr;
+ unsigned long num_bytes;
+};
+
+#define SPARC_PHYS_BANKS 32
+
+static struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
unsigned long *sparc64_valid_addr_bitmap __read_mostly;
@@ -1425,6 +1432,20 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
}
#endif
+unsigned long __init find_ecache_flush_span(unsigned long size)
+{
+ unsigned long i;
+
+ for (i = 0; ; i++) {
+ if (sp_banks[i].num_bytes == 0)
+ break;
+ if (sp_banks[i].num_bytes >= size)
+ return sp_banks[i].base_addr;
+ }
+
+ return ~0UL;
+}
+
static void __init prom_probe_memory(void)
{
struct linux_mlist_p1275 *mlist;