aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2005-11-07 03:58:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:28 -0500
commit65463b73b14ed43368dc5961a6c3dcb0d98cfe1f (patch)
treecc1e0537b35d119d081e2835c9e5c8b3dfc15060 /include/asm-sh
parentd229401f130941583eb46a2e8886df61241c14eb (diff)
[PATCH] sh: Drop hp690 discontig support
There was only one board using this (hp690 specifically), and it just so happens that it's only physically discontiguous at the "normal" P1 offset. If we bump up the P1 offset, it's possible to hit a shadowed region of memory where we suddenly become magically contiguous. As people have been using this shadowed region workaround for quite some time (and without any adverse effects), it's time to drop the left over discontig bits that no longer have any practical use (it was always very much hp690-centric to begin with). Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/mmzone.h61
-rw-r--r--include/asm-sh/page.h7
2 files changed, 0 insertions, 68 deletions
diff --git a/include/asm-sh/mmzone.h b/include/asm-sh/mmzone.h
deleted file mode 100644
index 0e7406601fdf..000000000000
--- a/include/asm-sh/mmzone.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * linux/include/asm-sh/mmzone.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#ifndef __ASM_SH_MMZONE_H
9#define __ASM_SH_MMZONE_H
10
11#include <linux/config.h>
12
13#ifdef CONFIG_DISCONTIGMEM
14
15/* Currently, just for HP690 */
16#define PHYSADDR_TO_NID(phys) ((((phys) - __MEMORY_START) >= 0x01000000)?1:0)
17
18extern pg_data_t discontig_page_data[MAX_NUMNODES];
19extern bootmem_data_t discontig_node_bdata[MAX_NUMNODES];
20
21/*
22 * Following are macros that each numa implmentation must define.
23 */
24
25/*
26 * Given a kernel address, find the home node of the underlying memory.
27 */
28#define KVADDR_TO_NID(kaddr) PHYSADDR_TO_NID(__pa(kaddr))
29
30/*
31 * Return a pointer to the node data for node n.
32 */
33#define NODE_DATA(nid) (&discontig_page_data[nid])
34
35/*
36 * NODE_MEM_MAP gives the kaddr for the mem_map of the node.
37 */
38#define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map)
39
40#define phys_to_page(phys) \
41({ unsigned int node = PHYSADDR_TO_NID(phys); \
42 NODE_MEM_MAP(node) \
43 + (((phys) - NODE_DATA(node)->node_start_paddr) >> PAGE_SHIFT); })
44
45static inline int is_valid_page(struct page *page)
46{
47 unsigned int i;
48
49 for (i = 0; i < MAX_NUMNODES; i++) {
50 if (page >= NODE_MEM_MAP(i) &&
51 page < NODE_MEM_MAP(i) + NODE_DATA(i)->node_size)
52 return 1;
53 }
54 return 0;
55}
56
57#define VALID_PAGE(page) is_valid_page(page)
58#define page_to_phys(page) PHYSADDR(page_address(page))
59
60#endif /* CONFIG_DISCONTIGMEM */
61#endif
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 324e6cc5ecf7..972c3f655b2a 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -93,11 +93,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
93 93
94#define __MEMORY_START CONFIG_MEMORY_START 94#define __MEMORY_START CONFIG_MEMORY_START
95#define __MEMORY_SIZE CONFIG_MEMORY_SIZE 95#define __MEMORY_SIZE CONFIG_MEMORY_SIZE
96#ifdef CONFIG_DISCONTIGMEM
97/* Just for HP690, for now.. */
98#define __MEMORY_START_2ND (__MEMORY_START+0x02000000)
99#define __MEMORY_SIZE_2ND 0x001000000 /* 16MB */
100#endif
101 96
102#define PAGE_OFFSET (0x80000000UL) 97#define PAGE_OFFSET (0x80000000UL)
103#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) 98#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
@@ -105,10 +100,8 @@ typedef struct { unsigned long pgprot; } pgprot_t;
105 100
106#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) 101#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
107 102
108#ifndef CONFIG_DISCONTIGMEM
109#define phys_to_page(phys) (mem_map + (((phys)-__MEMORY_START) >> PAGE_SHIFT)) 103#define phys_to_page(phys) (mem_map + (((phys)-__MEMORY_START) >> PAGE_SHIFT))
110#define page_to_phys(page) (((page - mem_map) << PAGE_SHIFT) + __MEMORY_START) 104#define page_to_phys(page) (((page - mem_map) << PAGE_SHIFT) + __MEMORY_START)
111#endif
112 105
113/* PFN start number, because of __MEMORY_START */ 106/* PFN start number, because of __MEMORY_START */
114#define PFN_START (__MEMORY_START >> PAGE_SHIFT) 107#define PFN_START (__MEMORY_START >> PAGE_SHIFT)