Commit 9c7b216d23e820e0e148d5be01bbb5bd2d8378fe
Committed by
Linus Torvalds
1 parent
6ac12dfe9c
Exists in
master
and in
4 other branches
[PATCH] cpu hotplug: revert init patch submitted for 2.6.17
In 2.6.17, there was a problem with cpu_notifiers and XFS. I provided a band-aid solution to solve that problem. In the process, i undid all the changes you both were making to ensure that these notifiers were available only at init time (unless CONFIG_HOTPLUG_CPU is defined). We deferred the real fix to 2.6.18. Here is a set of patches that fixes the XFS problem cleanly and makes the cpu notifiers available only at init time (unless CONFIG_HOTPLUG_CPU is defined). If CONFIG_HOTPLUG_CPU is defined then cpu notifiers are available at run time. This patch reverts the notifier_call changes made in 2.6.17 Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Cc: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 18 changed files with 18 additions and 18 deletions Side-by-side Diff
- arch/i386/kernel/cpu/intel_cacheinfo.c
- arch/ia64/kernel/palinfo.c
- arch/ia64/kernel/salinfo.c
- arch/ia64/kernel/topology.c
- arch/powerpc/kernel/sysfs.c
- arch/x86_64/kernel/mce.c
- drivers/base/topology.c
- drivers/cpufreq/cpufreq.c
- kernel/hrtimer.c
- kernel/profile.c
- kernel/rcupdate.c
- kernel/softirq.c
- kernel/softlockup.c
- kernel/timer.c
- kernel/workqueue.c
- mm/page_alloc.c
- mm/slab.c
- mm/vmscan.c
arch/i386/kernel/cpu/intel_cacheinfo.c
| ... | ... | @@ -729,7 +729,7 @@ |
| 729 | 729 | return; |
| 730 | 730 | } |
| 731 | 731 | |
| 732 | -static int cacheinfo_cpu_callback(struct notifier_block *nfb, | |
| 732 | +static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, | |
| 733 | 733 | unsigned long action, void *hcpu) |
| 734 | 734 | { |
| 735 | 735 | unsigned int cpu = (unsigned long)hcpu; |
arch/ia64/kernel/palinfo.c
arch/ia64/kernel/salinfo.c
arch/ia64/kernel/topology.c
| ... | ... | @@ -404,7 +404,7 @@ |
| 404 | 404 | * When a cpu is hot-plugged, do a check and initiate |
| 405 | 405 | * cache kobject if necessary |
| 406 | 406 | */ |
| 407 | -static int cache_cpu_callback(struct notifier_block *nfb, | |
| 407 | +static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, | |
| 408 | 408 | unsigned long action, void *hcpu) |
| 409 | 409 | { |
| 410 | 410 | unsigned int cpu = (unsigned long)hcpu; |
arch/powerpc/kernel/sysfs.c
| ... | ... | @@ -279,7 +279,7 @@ |
| 279 | 279 | } |
| 280 | 280 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 281 | 281 | |
| 282 | -static int sysfs_cpu_notify(struct notifier_block *self, | |
| 282 | +static int __devinit sysfs_cpu_notify(struct notifier_block *self, | |
| 283 | 283 | unsigned long action, void *hcpu) |
| 284 | 284 | { |
| 285 | 285 | unsigned int cpu = (unsigned int)(long)hcpu; |
arch/x86_64/kernel/mce.c
| ... | ... | @@ -629,7 +629,7 @@ |
| 629 | 629 | #endif |
| 630 | 630 | |
| 631 | 631 | /* Get notified when a cpu comes on/off. Be hotplug friendly. */ |
| 632 | -static int | |
| 632 | +static __cpuinit int | |
| 633 | 633 | mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) |
| 634 | 634 | { |
| 635 | 635 | unsigned int cpu = (unsigned long)hcpu; |
drivers/base/topology.c
| ... | ... | @@ -107,7 +107,7 @@ |
| 107 | 107 | return 0; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | -static int topology_cpu_callback(struct notifier_block *nfb, | |
| 110 | +static int __cpuinit topology_cpu_callback(struct notifier_block *nfb, | |
| 111 | 111 | unsigned long action, void *hcpu) |
| 112 | 112 | { |
| 113 | 113 | unsigned int cpu = (unsigned long)hcpu; |
drivers/cpufreq/cpufreq.c
| ... | ... | @@ -1497,7 +1497,7 @@ |
| 1497 | 1497 | } |
| 1498 | 1498 | EXPORT_SYMBOL(cpufreq_update_policy); |
| 1499 | 1499 | |
| 1500 | -static int cpufreq_cpu_callback(struct notifier_block *nfb, | |
| 1500 | +static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb, | |
| 1501 | 1501 | unsigned long action, void *hcpu) |
| 1502 | 1502 | { |
| 1503 | 1503 | unsigned int cpu = (unsigned long)hcpu; |
kernel/hrtimer.c
| ... | ... | @@ -833,7 +833,7 @@ |
| 833 | 833 | } |
| 834 | 834 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 835 | 835 | |
| 836 | -static int hrtimer_cpu_notify(struct notifier_block *self, | |
| 836 | +static int __devinit hrtimer_cpu_notify(struct notifier_block *self, | |
| 837 | 837 | unsigned long action, void *hcpu) |
| 838 | 838 | { |
| 839 | 839 | long cpu = (long)hcpu; |
kernel/profile.c
| ... | ... | @@ -299,7 +299,7 @@ |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | #ifdef CONFIG_HOTPLUG_CPU |
| 302 | -static int profile_cpu_callback(struct notifier_block *info, | |
| 302 | +static int __devinit profile_cpu_callback(struct notifier_block *info, | |
| 303 | 303 | unsigned long action, void *__cpu) |
| 304 | 304 | { |
| 305 | 305 | int node, cpu = (unsigned long)__cpu; |
kernel/rcupdate.c
| ... | ... | @@ -548,7 +548,7 @@ |
| 548 | 548 | tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | -static int rcu_cpu_notify(struct notifier_block *self, | |
| 551 | +static int __devinit rcu_cpu_notify(struct notifier_block *self, | |
| 552 | 552 | unsigned long action, void *hcpu) |
| 553 | 553 | { |
| 554 | 554 | long cpu = (long)hcpu; |
kernel/softirq.c
kernel/softlockup.c
kernel/timer.c
| ... | ... | @@ -1652,7 +1652,7 @@ |
| 1652 | 1652 | } |
| 1653 | 1653 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 1654 | 1654 | |
| 1655 | -static int timer_cpu_notify(struct notifier_block *self, | |
| 1655 | +static int __devinit timer_cpu_notify(struct notifier_block *self, | |
| 1656 | 1656 | unsigned long action, void *hcpu) |
| 1657 | 1657 | { |
| 1658 | 1658 | long cpu = (long)hcpu; |
kernel/workqueue.c
| ... | ... | @@ -559,7 +559,7 @@ |
| 559 | 559 | } |
| 560 | 560 | |
| 561 | 561 | /* We're holding the cpucontrol mutex here */ |
| 562 | -static int workqueue_cpu_callback(struct notifier_block *nfb, | |
| 562 | +static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, | |
| 563 | 563 | unsigned long action, |
| 564 | 564 | void *hcpu) |
| 565 | 565 | { |
mm/page_alloc.c
mm/slab.c
mm/vmscan.c
| ... | ... | @@ -1450,7 +1450,7 @@ |
| 1450 | 1450 | not required for correctness. So if the last cpu in a node goes |
| 1451 | 1451 | away, we get changed to run anywhere: as the first one comes back, |
| 1452 | 1452 | restore their cpu bindings. */ |
| 1453 | -static int cpu_callback(struct notifier_block *nfb, | |
| 1453 | +static int __devinit cpu_callback(struct notifier_block *nfb, | |
| 1454 | 1454 | unsigned long action, void *hcpu) |
| 1455 | 1455 | { |
| 1456 | 1456 | pg_data_t *pgdat; |