mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[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
[[email protected]: topology.c fix]
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a38a44c1a9
commit
0231606785
25 changed files with 8 additions and 56 deletions
|
|
@ -701,7 +701,6 @@ void drain_node_pages(int nodeid)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PM) || defined(CONFIG_HOTPLUG_CPU)
|
||||
static void __drain_pages(unsigned int cpu)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
|
@ -723,7 +722,6 @@ static void __drain_pages(unsigned int cpu)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PM || CONFIG_HOTPLUG_CPU */
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
|
|
@ -2907,7 +2905,6 @@ void __init free_area_init(unsigned long *zones_size)
|
|||
__pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
static int page_alloc_cpu_notify(struct notifier_block *self,
|
||||
unsigned long action, void *hcpu)
|
||||
{
|
||||
|
|
@ -2922,7 +2919,6 @@ static int page_alloc_cpu_notify(struct notifier_block *self,
|
|||
}
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
#endif /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
void __init page_alloc_init(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -514,5 +514,7 @@ void __init swap_setup(void)
|
|||
* Right now other parts of the system means that we
|
||||
* _really_ don't want to cluster much more
|
||||
*/
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
hotcpu_notifier(cpu_swap_callback, 0);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1513,7 +1513,6 @@ out:
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
/* It's optimal to keep kswapds on the same CPUs as their memory, but
|
||||
not required for correctness. So if the last cpu in a node goes
|
||||
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,
|
|||
}
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
#endif /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
/*
|
||||
* This kswapd start function will be called by init and node-hot-add.
|
||||
|
|
|
|||
Loading…
Reference in a new issue