diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-02-03 18:45:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-03 18:45:06 -0800 |
| commit | 4c5736de7785f499aad01c87b568011aebc8ebf4 (patch) | |
| tree | 5466ac60afd5d5981ab219241133b99b36d24773 /include/linux/mmzone.h | |
| parent | b5a2bdf93c878d8c6bd3172cf75d1662236684da (diff) | |
[PATCH] Remove memblks from the kernel
From: "Martin J. Bligh" <mbligh@aracnet.com>
This patch removes memblks from the kernel ... we don't use them, and the
NUMA API that was planning to use them when they were originally designed
isn't going to use them anymore. They're just unnecessary added complexity
now ... time for them to go.
There's a slight complication in that ia64 uses something with a similar
name for part of its memory layout, but Jes Sorensen kindly untangled them
from each other for us. The patch with his modifications is below. Jes
tested it on ia64, and I testbuilt it with every config in my arsenal.
Diffstat (limited to 'include/linux/mmzone.h')
| -rw-r--r-- | include/linux/mmzone.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 71f2f39cae0f..179f51f29f78 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -294,12 +294,6 @@ struct file; int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, void *, size_t *); -#ifdef CONFIG_NUMA -#define MAX_NR_MEMBLKS BITS_PER_LONG /* Max number of Memory Blocks */ -#else /* !CONFIG_NUMA */ -#define MAX_NR_MEMBLKS 1 -#endif /* CONFIG_NUMA */ - #include <linux/topology.h> /* Returns the number of the current Node. */ #define numa_node_id() (cpu_to_node(smp_processor_id())) @@ -342,7 +336,6 @@ extern struct pglist_data contig_page_data; #endif extern DECLARE_BITMAP(node_online_map, MAX_NUMNODES); -extern DECLARE_BITMAP(memblk_online_map, MAX_NR_MEMBLKS); #if defined(CONFIG_DISCONTIGMEM) || defined(CONFIG_NUMA) @@ -360,20 +353,6 @@ static inline unsigned int num_online_nodes(void) return num; } -#define memblk_online(memblk) test_bit(memblk, memblk_online_map) -#define memblk_set_online(memblk) set_bit(memblk, memblk_online_map) -#define memblk_set_offline(memblk) clear_bit(memblk, memblk_online_map) -static inline unsigned int num_online_memblks(void) -{ - int i, num = 0; - - for(i = 0; i < MAX_NR_MEMBLKS; i++){ - if (memblk_online(i)) - num++; - } - return num; -} - #else /* !CONFIG_DISCONTIGMEM && !CONFIG_NUMA */ #define node_online(node) \ @@ -384,14 +363,6 @@ static inline unsigned int num_online_memblks(void) ({ BUG_ON((node) != 0); clear_bit(node, node_online_map); }) #define num_online_nodes() 1 -#define memblk_online(memblk) \ - ({ BUG_ON((memblk) != 0); test_bit(memblk, memblk_online_map); }) -#define memblk_set_online(memblk) \ - ({ BUG_ON((memblk) != 0); set_bit(memblk, memblk_online_map); }) -#define memblk_set_offline(memblk) \ - ({ BUG_ON((memblk) != 0); clear_bit(memblk, memblk_online_map); }) -#define num_online_memblks() 1 - #endif /* CONFIG_DISCONTIGMEM || CONFIG_NUMA */ #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ |
