Commit 65463b73 authored by Paul Mundt's avatar Paul Mundt Committed by Linus Torvalds

[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: default avatarPaul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d229401f
...@@ -490,16 +490,6 @@ config CPU_SUBTYPE_ST40 ...@@ -490,16 +490,6 @@ config CPU_SUBTYPE_ST40
depends on CPU_SUBTYPE_ST40STB1 || CPU_SUBTYPE_ST40GX1 depends on CPU_SUBTYPE_ST40STB1 || CPU_SUBTYPE_ST40GX1
default y default y
config ARCH_DISCONTIGMEM_ENABLE
bool
depends on SH_HP690
default y
help
Say Y to upport efficient handling of discontiguous physical memory,
for architectures which are either NUMA (Non-Uniform Memory Access)
or have huge holes in the physical address space for other reasons.
See <file:Documentation/vm/numa> for more.
source "mm/Kconfig" source "mm/Kconfig"
config ZERO_PAGE_OFFSET config ZERO_PAGE_OFFSET
......
...@@ -284,18 +284,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -284,18 +284,6 @@ void __init setup_arch(char **cmdline_p)
#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) #define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
#define PFN_PHYS(x) ((x) << PAGE_SHIFT) #define PFN_PHYS(x) ((x) << PAGE_SHIFT)
#ifdef CONFIG_DISCONTIGMEM
NODE_DATA(0)->bdata = &discontig_node_bdata[0];
NODE_DATA(1)->bdata = &discontig_node_bdata[1];
bootmap_size = init_bootmem_node(NODE_DATA(1),
PFN_UP(__MEMORY_START_2ND),
PFN_UP(__MEMORY_START_2ND),
PFN_DOWN(__MEMORY_START_2ND+__MEMORY_SIZE_2ND));
free_bootmem_node(NODE_DATA(1), __MEMORY_START_2ND, __MEMORY_SIZE_2ND);
reserve_bootmem_node(NODE_DATA(1), __MEMORY_START_2ND, bootmap_size);
#endif
/* /*
* Find the highest page frame number we have available * Find the highest page frame number we have available
*/ */
......
...@@ -51,11 +51,6 @@ unsigned long mmu_context_cache = NO_CONTEXT; ...@@ -51,11 +51,6 @@ unsigned long mmu_context_cache = NO_CONTEXT;
#define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn) #define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn)
#endif #endif
#ifdef CONFIG_DISCONTIGMEM
pg_data_t discontig_page_data[MAX_NUMNODES];
bootmem_data_t discontig_node_bdata[MAX_NUMNODES];
#endif
void (*copy_page)(void *from, void *to); void (*copy_page)(void *from, void *to);
void (*clear_page)(void *to); void (*clear_page)(void *to);
...@@ -216,15 +211,6 @@ void __init paging_init(void) ...@@ -216,15 +211,6 @@ void __init paging_init(void)
#endif #endif
NODE_DATA(0)->node_mem_map = NULL; NODE_DATA(0)->node_mem_map = NULL;
free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
#ifdef CONFIG_DISCONTIGMEM
/*
* And for discontig, do some more fixups on the zone sizes..
*/
zones_size[ZONE_DMA] = __MEMORY_SIZE_2ND >> PAGE_SHIFT;
zones_size[ZONE_NORMAL] = 0;
free_area_init_node(1, NODE_DATA(1), zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0);
#endif
} }
void __init mem_init(void) void __init mem_init(void)
...@@ -257,9 +243,6 @@ void __init mem_init(void) ...@@ -257,9 +243,6 @@ void __init mem_init(void)
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
totalram_pages += free_all_bootmem_node(NODE_DATA(0)); totalram_pages += free_all_bootmem_node(NODE_DATA(0));
#ifdef CONFIG_DISCONTIGMEM
totalram_pages += free_all_bootmem_node(NODE_DATA(1));
#endif
reservedpages = 0; reservedpages = 0;
for (tmp = 0; tmp < num_physpages; tmp++) for (tmp = 0; tmp < num_physpages; tmp++)
/* /*
......
/*
* linux/include/asm-sh/mmzone.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_SH_MMZONE_H
#define __ASM_SH_MMZONE_H
#include <linux/config.h>
#ifdef CONFIG_DISCONTIGMEM
/* Currently, just for HP690 */
#define PHYSADDR_TO_NID(phys) ((((phys) - __MEMORY_START) >= 0x01000000)?1:0)
extern pg_data_t discontig_page_data[MAX_NUMNODES];
extern bootmem_data_t discontig_node_bdata[MAX_NUMNODES];
/*
* Following are macros that each numa implmentation must define.
*/
/*
* Given a kernel address, find the home node of the underlying memory.
*/
#define KVADDR_TO_NID(kaddr) PHYSADDR_TO_NID(__pa(kaddr))
/*
* Return a pointer to the node data for node n.
*/
#define NODE_DATA(nid) (&discontig_page_data[nid])
/*
* NODE_MEM_MAP gives the kaddr for the mem_map of the node.
*/
#define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map)
#define phys_to_page(phys) \
({ unsigned int node = PHYSADDR_TO_NID(phys); \
NODE_MEM_MAP(node) \
+ (((phys) - NODE_DATA(node)->node_start_paddr) >> PAGE_SHIFT); })
static inline int is_valid_page(struct page *page)
{
unsigned int i;
for (i = 0; i < MAX_NUMNODES; i++) {
if (page >= NODE_MEM_MAP(i) &&
page < NODE_MEM_MAP(i) + NODE_DATA(i)->node_size)
return 1;
}
return 0;
}
#define VALID_PAGE(page) is_valid_page(page)
#define page_to_phys(page) PHYSADDR(page_address(page))
#endif /* CONFIG_DISCONTIGMEM */
#endif
...@@ -93,11 +93,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; ...@@ -93,11 +93,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define __MEMORY_START CONFIG_MEMORY_START #define __MEMORY_START CONFIG_MEMORY_START
#define __MEMORY_SIZE CONFIG_MEMORY_SIZE #define __MEMORY_SIZE CONFIG_MEMORY_SIZE
#ifdef CONFIG_DISCONTIGMEM
/* Just for HP690, for now.. */
#define __MEMORY_START_2ND (__MEMORY_START+0x02000000)
#define __MEMORY_SIZE_2ND 0x001000000 /* 16MB */
#endif
#define PAGE_OFFSET (0x80000000UL) #define PAGE_OFFSET (0x80000000UL)
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
...@@ -105,10 +100,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; ...@@ -105,10 +100,8 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
#ifndef CONFIG_DISCONTIGMEM
#define phys_to_page(phys) (mem_map + (((phys)-__MEMORY_START) >> PAGE_SHIFT)) #define phys_to_page(phys) (mem_map + (((phys)-__MEMORY_START) >> PAGE_SHIFT))
#define page_to_phys(page) (((page - mem_map) << PAGE_SHIFT) + __MEMORY_START) #define page_to_phys(page) (((page - mem_map) << PAGE_SHIFT) + __MEMORY_START)
#endif
/* PFN start number, because of __MEMORY_START */ /* PFN start number, because of __MEMORY_START */
#define PFN_START (__MEMORY_START >> PAGE_SHIFT) #define PFN_START (__MEMORY_START >> PAGE_SHIFT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment