diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-03-08 05:16:07 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:14:22 -0500 |
commit | d1112018b4bc82adf5c8a9c15a08954328f023ae (patch) | |
tree | 4d94ef6c153f028cfaaff711cf7d4f07aa90e9b4 /include/asm-sparc64 | |
parent | ee29074d3bd23848905f52c515974e0cd0219faa (diff) |
[SPARC64]: Move over to sparsemem.
This has been pending for a long time, and the fact
that we waste a ton of ram on some configurations
kind of pushed things over the edge.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/numnodes.h | 6 | ||||
-rw-r--r-- | include/asm-sparc64/page.h | 9 | ||||
-rw-r--r-- | include/asm-sparc64/pgtable.h | 3 | ||||
-rw-r--r-- | include/asm-sparc64/sparsemem.h | 12 |
4 files changed, 19 insertions, 11 deletions
diff --git a/include/asm-sparc64/numnodes.h b/include/asm-sparc64/numnodes.h new file mode 100644 index 000000000000..017e7e74f5e7 --- /dev/null +++ b/include/asm-sparc64/numnodes.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _SPARC64_NUMNODES_H | ||
2 | #define _SPARC64_NUMNODES_H | ||
3 | |||
4 | #define NODES_SHIFT 0 | ||
5 | |||
6 | #endif /* !(_SPARC64_NUMNODES_H) */ | ||
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index c277ac56b9d7..f6b49256fe2b 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -125,17 +125,10 @@ typedef unsigned long pgprot_t; | |||
125 | #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) | 125 | #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) |
126 | #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) | 126 | #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) |
127 | 127 | ||
128 | /* PFNs are real physical page numbers. However, mem_map only begins to record | 128 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
129 | * per-page information starting at pfn_base. This is to handle systems where | ||
130 | * the first physical page in the machine is at some huge physical address, | ||
131 | * such as 4GB. This is common on a partitioned E10000, for example. | ||
132 | */ | ||
133 | extern struct page *pfn_to_page(unsigned long pfn); | ||
134 | extern unsigned long page_to_pfn(struct page *); | ||
135 | 129 | ||
136 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr)>>PAGE_SHIFT) | 130 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr)>>PAGE_SHIFT) |
137 | 131 | ||
138 | #define pfn_valid(pfn) (((pfn)-(pfn_base)) < max_mapnr) | ||
139 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 132 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
140 | 133 | ||
141 | #define virt_to_phys __pa | 134 | #define virt_to_phys __pa |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 75a2cd2d7e81..d427ce649214 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -217,9 +217,6 @@ extern unsigned long pg_iobits; | |||
217 | extern unsigned long _PAGE_ALL_SZ_BITS; | 217 | extern unsigned long _PAGE_ALL_SZ_BITS; |
218 | extern unsigned long _PAGE_SZBITS; | 218 | extern unsigned long _PAGE_SZBITS; |
219 | 219 | ||
220 | extern unsigned long phys_base; | ||
221 | extern unsigned long pfn_base; | ||
222 | |||
223 | extern struct page *mem_map_zero; | 220 | extern struct page *mem_map_zero; |
224 | #define ZERO_PAGE(vaddr) (mem_map_zero) | 221 | #define ZERO_PAGE(vaddr) (mem_map_zero) |
225 | 222 | ||
diff --git a/include/asm-sparc64/sparsemem.h b/include/asm-sparc64/sparsemem.h new file mode 100644 index 000000000000..ed5c9d8541e2 --- /dev/null +++ b/include/asm-sparc64/sparsemem.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _SPARC64_SPARSEMEM_H | ||
2 | #define _SPARC64_SPARSEMEM_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #define SECTION_SIZE_BITS 26 | ||
7 | #define MAX_PHYSADDR_BITS 42 | ||
8 | #define MAX_PHYSMEM_BITS 42 | ||
9 | |||
10 | #endif /* !(__KERNEL__) */ | ||
11 | |||
12 | #endif /* !(_SPARC64_SPARSEMEM_H) */ | ||