diff options
author | Matt Tolentino <metolent@cs.vt.edu> | 2006-01-17 01:03:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 02:18:35 -0500 |
commit | c09b42404d29c8a9266f8186632330dc8474bf2e (patch) | |
tree | 26477ddbd49e6de7ef16e21d7a7440b9b9f11c57 | |
parent | 44df75e629106efcada087cead6c3f33ed6bcc60 (diff) |
[PATCH] x86_64: add __meminit for memory hotplug
Add __meminit to the __init lineup to ensure functions default
to __init when memory hotplug is not enabled. Replace __devinit
with __meminit on functions that were changed when the memory
hotplug code was introduced.
Signed-off-by: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/mm/init.c | 2 | ||||
-rw-r--r-- | include/linux/init.h | 12 | ||||
-rw-r--r-- | mm/page_alloc.c | 14 |
3 files changed, 20 insertions, 8 deletions
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 7df494b51a5b..2700f01994ba 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -268,7 +268,7 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base) | |||
268 | pkmap_page_table = pte; | 268 | pkmap_page_table = pte; |
269 | } | 269 | } |
270 | 270 | ||
271 | static void __devinit free_new_highpage(struct page *page) | 271 | static void __meminit free_new_highpage(struct page *page) |
272 | { | 272 | { |
273 | set_page_count(page, 1); | 273 | set_page_count(page, 1); |
274 | __free_page(page); | 274 | __free_page(page); |
diff --git a/include/linux/init.h b/include/linux/init.h index 59008c3826cf..ff8d8b8632f4 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -241,6 +241,18 @@ void __init parse_early_param(void); | |||
241 | #define __cpuexitdata __exitdata | 241 | #define __cpuexitdata __exitdata |
242 | #endif | 242 | #endif |
243 | 243 | ||
244 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
245 | #define __meminit | ||
246 | #define __meminitdata | ||
247 | #define __memexit | ||
248 | #define __memexitdata | ||
249 | #else | ||
250 | #define __meminit __init | ||
251 | #define __meminitdata __initdata | ||
252 | #define __memexit __exit | ||
253 | #define __memexitdata __exitdata | ||
254 | #endif | ||
255 | |||
244 | /* Functions marked as __devexit may be discarded at kernel link time, depending | 256 | /* Functions marked as __devexit may be discarded at kernel link time, depending |
245 | on config options. Newer versions of binutils detect references from | 257 | on config options. Newer versions of binutils detect references from |
246 | retained sections to discarded sections and flag an error. Pointers to | 258 | retained sections to discarded sections and flag an error. Pointers to |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8c960b469593..c2e29743a8d1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1735,7 +1735,7 @@ static void __init calculate_zone_totalpages(struct pglist_data *pgdat, | |||
1735 | * up by free_all_bootmem() once the early boot process is | 1735 | * up by free_all_bootmem() once the early boot process is |
1736 | * done. Non-atomic initialization, single-pass. | 1736 | * done. Non-atomic initialization, single-pass. |
1737 | */ | 1737 | */ |
1738 | void __devinit memmap_init_zone(unsigned long size, int nid, unsigned long zone, | 1738 | void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, |
1739 | unsigned long start_pfn) | 1739 | unsigned long start_pfn) |
1740 | { | 1740 | { |
1741 | struct page *page; | 1741 | struct page *page; |
@@ -1788,7 +1788,7 @@ void zonetable_add(struct zone *zone, int nid, int zid, unsigned long pfn, | |||
1788 | memmap_init_zone((size), (nid), (zone), (start_pfn)) | 1788 | memmap_init_zone((size), (nid), (zone), (start_pfn)) |
1789 | #endif | 1789 | #endif |
1790 | 1790 | ||
1791 | static int __devinit zone_batchsize(struct zone *zone) | 1791 | static int __meminit zone_batchsize(struct zone *zone) |
1792 | { | 1792 | { |
1793 | int batch; | 1793 | int batch; |
1794 | 1794 | ||
@@ -1882,7 +1882,7 @@ static struct per_cpu_pageset | |||
1882 | * Dynamically allocate memory for the | 1882 | * Dynamically allocate memory for the |
1883 | * per cpu pageset array in struct zone. | 1883 | * per cpu pageset array in struct zone. |
1884 | */ | 1884 | */ |
1885 | static int __devinit process_zones(int cpu) | 1885 | static int __meminit process_zones(int cpu) |
1886 | { | 1886 | { |
1887 | struct zone *zone, *dzone; | 1887 | struct zone *zone, *dzone; |
1888 | 1888 | ||
@@ -1923,7 +1923,7 @@ static inline void free_zone_pagesets(int cpu) | |||
1923 | } | 1923 | } |
1924 | } | 1924 | } |
1925 | 1925 | ||
1926 | static int __devinit pageset_cpuup_callback(struct notifier_block *nfb, | 1926 | static int __meminit pageset_cpuup_callback(struct notifier_block *nfb, |
1927 | unsigned long action, | 1927 | unsigned long action, |
1928 | void *hcpu) | 1928 | void *hcpu) |
1929 | { | 1929 | { |
@@ -1963,7 +1963,7 @@ void __init setup_per_cpu_pageset(void) | |||
1963 | 1963 | ||
1964 | #endif | 1964 | #endif |
1965 | 1965 | ||
1966 | static __devinit | 1966 | static __meminit |
1967 | void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) | 1967 | void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) |
1968 | { | 1968 | { |
1969 | int i; | 1969 | int i; |
@@ -1983,7 +1983,7 @@ void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) | |||
1983 | init_waitqueue_head(zone->wait_table + i); | 1983 | init_waitqueue_head(zone->wait_table + i); |
1984 | } | 1984 | } |
1985 | 1985 | ||
1986 | static __devinit void zone_pcp_init(struct zone *zone) | 1986 | static __meminit void zone_pcp_init(struct zone *zone) |
1987 | { | 1987 | { |
1988 | int cpu; | 1988 | int cpu; |
1989 | unsigned long batch = zone_batchsize(zone); | 1989 | unsigned long batch = zone_batchsize(zone); |
@@ -2001,7 +2001,7 @@ static __devinit void zone_pcp_init(struct zone *zone) | |||
2001 | zone->name, zone->present_pages, batch); | 2001 | zone->name, zone->present_pages, batch); |
2002 | } | 2002 | } |
2003 | 2003 | ||
2004 | static __devinit void init_currently_empty_zone(struct zone *zone, | 2004 | static __meminit void init_currently_empty_zone(struct zone *zone, |
2005 | unsigned long zone_start_pfn, unsigned long size) | 2005 | unsigned long zone_start_pfn, unsigned long size) |
2006 | { | 2006 | { |
2007 | struct pglist_data *pgdat = zone->zone_pgdat; | 2007 | struct pglist_data *pgdat = zone->zone_pgdat; |