Commit 9c7b216d23e820e0e148d5be01bbb5bd2d8378fe

Authored by Chandra Seetharaman
Committed by Linus Torvalds
1 parent 6ac12dfe9c

[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
... ... @@ -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
... ... @@ -959,7 +959,7 @@
959 959 }
960 960 }
961 961  
962   -static int palinfo_cpu_callback(struct notifier_block *nfb,
  962 +static int __devinit palinfo_cpu_callback(struct notifier_block *nfb,
963 963 unsigned long action,
964 964 void *hcpu)
965 965 {
arch/ia64/kernel/salinfo.c
... ... @@ -572,7 +572,7 @@
572 572 };
573 573  
574 574 #ifdef CONFIG_HOTPLUG_CPU
575   -static int
  575 +static int __devinit
576 576 salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
577 577 {
578 578 unsigned int i, cpu = (unsigned long)hcpu;
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;
... ... @@ -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;
... ... @@ -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;
... ... @@ -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;
... ... @@ -446,7 +446,7 @@
446 446 }
447 447 #endif /* CONFIG_HOTPLUG_CPU */
448 448  
449   -static int cpu_callback(struct notifier_block *nfb,
  449 +static int __devinit cpu_callback(struct notifier_block *nfb,
450 450 unsigned long action,
451 451 void *hcpu)
452 452 {
... ... @@ -104,7 +104,7 @@
104 104 /*
105 105 * Create/destroy watchdog threads as CPUs come and go:
106 106 */
107   -static int
  107 +static int __devinit
108 108 cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
109 109 {
110 110 int hotcpu = (unsigned long)hcpu;
... ... @@ -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;
... ... @@ -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 {
... ... @@ -2009,7 +2009,7 @@
2009 2009 }
2010 2010 }
2011 2011  
2012   -static int pageset_cpuup_callback(struct notifier_block *nfb,
  2012 +static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb,
2013 2013 unsigned long action,
2014 2014 void *hcpu)
2015 2015 {
... ... @@ -1073,7 +1073,7 @@
1073 1073  
1074 1074 #endif
1075 1075  
1076   -static int cpuup_callback(struct notifier_block *nfb,
  1076 +static int __devinit cpuup_callback(struct notifier_block *nfb,
1077 1077 unsigned long action, void *hcpu)
1078 1078 {
1079 1079 long cpu = (long)hcpu;
... ... @@ -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;