diff options
author | Tony Luck <tony.luck@intel.com> | 2005-10-28 14:32:56 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-10-28 14:32:56 -0700 |
commit | c87ff94333642ce3db4fc0857ad1f723cb42c1dd (patch) | |
tree | 9577010b5ca20b692904c4728b305a9cbde5373e /include/asm-ia64 | |
parent | 556902cd2d2cfdc54fe1f1d7f3ac5e2eb276ac09 (diff) | |
parent | 1e5c936e3cc2ab745f66c0ae296c42f892ffd42a (diff) | |
download | op-kernel-dev-c87ff94333642ce3db4fc0857ad1f723cb42c1dd.zip op-kernel-dev-c87ff94333642ce3db4fc0857ad1f723cb42c1dd.tar.gz |
Pull sparsemem-v5 into release branch
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/meminit.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/mmzone.h | 10 | ||||
-rw-r--r-- | include/asm-ia64/nodedata.h | 4 | ||||
-rw-r--r-- | include/asm-ia64/page.h | 6 | ||||
-rw-r--r-- | include/asm-ia64/sparsemem.h | 20 |
5 files changed, 33 insertions, 9 deletions
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index 9064663..46501b0 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h @@ -43,7 +43,7 @@ extern void efi_memmap_init(unsigned long *, unsigned long *); #define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) #define ORDERROUNDDOWN(n) ((n) & ~((PAGE_SIZE<<MAX_ORDER)-1)) -#ifdef CONFIG_DISCONTIGMEM +#ifdef CONFIG_NUMA extern void call_pernode_memory (unsigned long start, unsigned long len, void *func); #else # define call_pernode_memory(start, len, func) (*func)(start, len, 0) diff --git a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h index d32f51e..34efe88 100644 --- a/include/asm-ia64/mmzone.h +++ b/include/asm-ia64/mmzone.h @@ -15,7 +15,7 @@ #include <asm/page.h> #include <asm/meminit.h> -#ifdef CONFIG_DISCONTIGMEM +#ifdef CONFIG_NUMA static inline int pfn_to_nid(unsigned long pfn) { @@ -31,6 +31,10 @@ static inline int pfn_to_nid(unsigned long pfn) #endif } +#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID +extern int early_pfn_to_nid(unsigned long pfn); +#endif + #ifdef CONFIG_IA64_DIG /* DIG systems are small */ # define MAX_PHYSNODE_ID 8 # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) @@ -39,8 +43,8 @@ static inline int pfn_to_nid(unsigned long pfn) # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) #endif -#else /* CONFIG_DISCONTIGMEM */ +#else /* CONFIG_NUMA */ # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) -#endif /* CONFIG_DISCONTIGMEM */ +#endif /* CONFIG_NUMA */ #endif /* _ASM_IA64_MMZONE_H */ diff --git a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h index 6b0f3ed..9978c7c 100644 --- a/include/asm-ia64/nodedata.h +++ b/include/asm-ia64/nodedata.h @@ -17,7 +17,7 @@ #include <asm/percpu.h> #include <asm/mmzone.h> -#ifdef CONFIG_DISCONTIGMEM +#ifdef CONFIG_NUMA /* * Node Data. One of these structures is located on each node of a NUMA system. @@ -47,6 +47,6 @@ struct ia64_node_data { */ #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) -#endif /* CONFIG_DISCONTIGMEM */ +#endif /* CONFIG_NUMA */ #endif /* _ASM_IA64_NODEDATA_H */ diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 9edffad..ef436b9 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h @@ -102,15 +102,15 @@ do { \ #ifdef CONFIG_VIRTUAL_MEM_MAP extern int ia64_pfn_valid (unsigned long pfn); -#else +#elif defined(CONFIG_FLATMEM) # define ia64_pfn_valid(pfn) 1 #endif -#ifndef CONFIG_DISCONTIGMEM +#ifdef CONFIG_FLATMEM # define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) # define page_to_pfn(page) ((unsigned long) (page - mem_map)) # define pfn_to_page(pfn) (mem_map + (pfn)) -#else +#elif defined(CONFIG_DISCONTIGMEM) extern struct page *vmem_map; extern unsigned long max_low_pfn; # define pfn_valid(pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) diff --git a/include/asm-ia64/sparsemem.h b/include/asm-ia64/sparsemem.h new file mode 100644 index 0000000..67a7c40 --- /dev/null +++ b/include/asm-ia64/sparsemem.h @@ -0,0 +1,20 @@ +#ifndef _ASM_IA64_SPARSEMEM_H +#define _ASM_IA64_SPARSEMEM_H + +#ifdef CONFIG_SPARSEMEM +/* + * SECTION_SIZE_BITS 2^N: how big each section will be + * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space + */ + +#define SECTION_SIZE_BITS (30) +#define MAX_PHYSMEM_BITS (50) +#ifdef CONFIG_FORCE_MAX_ZONEORDER +#if ((CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS) +#undef SECTION_SIZE_BITS +#define SECTION_SIZE_BITS (CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT) +#endif +#endif + +#endif /* CONFIG_SPARSEMEM */ +#endif /* _ASM_IA64_SPARSEMEM_H */ |