aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-12-06 23:38:17 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:39 -0500
commit02316067852187b8bec781bec07410e91af79627 (patch)
tree856e3f4610c91a6548bf3bf5c70ecbc0b28a4145 /mm
parenta38a44c1a93078fc5fadc4ac2df8dea4697069e2 (diff)
[PATCH] hotplug CPU: clean up hotcpu_notifier() use
There was lots of #ifdef noise in the kernel due to hotcpu_notifier(fn, prio) not correctly marking 'fn' as used in the !HOTPLUG_CPU case, and thus generating compiler warnings of unused symbols, hence forcing people to add #ifdefs. the compiler can skip truly unused functions just fine: text data bss dec hex filename 1624412 728710 3674856 6027978 5bfaca vmlinux.before 1624412 728710 3674856 6027978 5bfaca vmlinux.after [akpm@osdl.org: topology.c fix] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c4
-rw-r--r--mm/swap.c2
-rw-r--r--mm/vmscan.c2
3 files changed, 2 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2273952300d4..27ec7a1b8022 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -701,7 +701,6 @@ void drain_node_pages(int nodeid)
701} 701}
702#endif 702#endif
703 703
704#if defined(CONFIG_PM) || defined(CONFIG_HOTPLUG_CPU)
705static void __drain_pages(unsigned int cpu) 704static void __drain_pages(unsigned int cpu)
706{ 705{
707 unsigned long flags; 706 unsigned long flags;
@@ -723,7 +722,6 @@ static void __drain_pages(unsigned int cpu)
723 } 722 }
724 } 723 }
725} 724}
726#endif /* CONFIG_PM || CONFIG_HOTPLUG_CPU */
727 725
728#ifdef CONFIG_PM 726#ifdef CONFIG_PM
729 727
@@ -2907,7 +2905,6 @@ void __init free_area_init(unsigned long *zones_size)
2907 __pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL); 2905 __pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL);
2908} 2906}
2909 2907
2910#ifdef CONFIG_HOTPLUG_CPU
2911static int page_alloc_cpu_notify(struct notifier_block *self, 2908static int page_alloc_cpu_notify(struct notifier_block *self,
2912 unsigned long action, void *hcpu) 2909 unsigned long action, void *hcpu)
2913{ 2910{
@@ -2922,7 +2919,6 @@ static int page_alloc_cpu_notify(struct notifier_block *self,
2922 } 2919 }
2923 return NOTIFY_OK; 2920 return NOTIFY_OK;
2924} 2921}
2925#endif /* CONFIG_HOTPLUG_CPU */
2926 2922
2927void __init page_alloc_init(void) 2923void __init page_alloc_init(void)
2928{ 2924{
diff --git a/mm/swap.c b/mm/swap.c
index 017e72ca9bbb..2ed7be39795e 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -514,5 +514,7 @@ void __init swap_setup(void)
514 * Right now other parts of the system means that we 514 * Right now other parts of the system means that we
515 * _really_ don't want to cluster much more 515 * _really_ don't want to cluster much more
516 */ 516 */
517#ifdef CONFIG_HOTPLUG_CPU
517 hotcpu_notifier(cpu_swap_callback, 0); 518 hotcpu_notifier(cpu_swap_callback, 0);
519#endif
518} 520}
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f6616e81fac7..093f5fe6dd77 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1513,7 +1513,6 @@ out:
1513} 1513}
1514#endif 1514#endif
1515 1515
1516#ifdef CONFIG_HOTPLUG_CPU
1517/* It's optimal to keep kswapds on the same CPUs as their memory, but 1516/* It's optimal to keep kswapds on the same CPUs as their memory, but
1518 not required for correctness. So if the last cpu in a node goes 1517 not required for correctness. So if the last cpu in a node goes
1519 away, we get changed to run anywhere: as the first one comes back, 1518 away, we get changed to run anywhere: as the first one comes back,
@@ -1534,7 +1533,6 @@ static int __devinit cpu_callback(struct notifier_block *nfb,
1534 } 1533 }
1535 return NOTIFY_OK; 1534 return NOTIFY_OK;
1536} 1535}
1537#endif /* CONFIG_HOTPLUG_CPU */
1538 1536
1539/* 1537/*
1540 * This kswapd start function will be called by init and node-hot-add. 1538 * This kswapd start function will be called by init and node-hot-add.