diff options
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 24 | ||||
-rw-r--r-- | arch/ia64/kernel/irq.c | 24 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_lsapic.c | 10 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/palinfo.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/salinfo.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 8 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 32 |
10 files changed, 52 insertions, 68 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index d58c1c5c903a..efc7df4b0fd2 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -456,7 +456,7 @@ iosapic_startup_edge_irq (unsigned int irq) | |||
456 | static void | 456 | static void |
457 | iosapic_ack_edge_irq (unsigned int irq) | 457 | iosapic_ack_edge_irq (unsigned int irq) |
458 | { | 458 | { |
459 | irq_desc_t *idesc = irq_descp(irq); | 459 | irq_desc_t *idesc = irq_desc + irq; |
460 | 460 | ||
461 | move_native_irq(irq); | 461 | move_native_irq(irq); |
462 | /* | 462 | /* |
@@ -659,14 +659,14 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
659 | else | 659 | else |
660 | irq_type = &irq_type_iosapic_level; | 660 | irq_type = &irq_type_iosapic_level; |
661 | 661 | ||
662 | idesc = irq_descp(vector); | 662 | idesc = irq_desc + vector; |
663 | if (idesc->handler != irq_type) { | 663 | if (idesc->chip != irq_type) { |
664 | if (idesc->handler != &no_irq_type) | 664 | if (idesc->chip != &no_irq_type) |
665 | printk(KERN_WARNING | 665 | printk(KERN_WARNING |
666 | "%s: changing vector %d from %s to %s\n", | 666 | "%s: changing vector %d from %s to %s\n", |
667 | __FUNCTION__, vector, | 667 | __FUNCTION__, vector, |
668 | idesc->handler->typename, irq_type->typename); | 668 | idesc->chip->typename, irq_type->typename); |
669 | idesc->handler = irq_type; | 669 | idesc->chip = irq_type; |
670 | } | 670 | } |
671 | return 0; | 671 | return 0; |
672 | } | 672 | } |
@@ -793,14 +793,14 @@ again: | |||
793 | return -ENOSPC; | 793 | return -ENOSPC; |
794 | } | 794 | } |
795 | 795 | ||
796 | spin_lock_irqsave(&irq_descp(vector)->lock, flags); | 796 | spin_lock_irqsave(&irq_desc[vector].lock, flags); |
797 | spin_lock(&iosapic_lock); | 797 | spin_lock(&iosapic_lock); |
798 | { | 798 | { |
799 | if (gsi_to_vector(gsi) > 0) { | 799 | if (gsi_to_vector(gsi) > 0) { |
800 | if (list_empty(&iosapic_intr_info[vector].rtes)) | 800 | if (list_empty(&iosapic_intr_info[vector].rtes)) |
801 | free_irq_vector(vector); | 801 | free_irq_vector(vector); |
802 | spin_unlock(&iosapic_lock); | 802 | spin_unlock(&iosapic_lock); |
803 | spin_unlock_irqrestore(&irq_descp(vector)->lock, | 803 | spin_unlock_irqrestore(&irq_desc[vector].lock, |
804 | flags); | 804 | flags); |
805 | goto again; | 805 | goto again; |
806 | } | 806 | } |
@@ -810,7 +810,7 @@ again: | |||
810 | polarity, trigger); | 810 | polarity, trigger); |
811 | if (err < 0) { | 811 | if (err < 0) { |
812 | spin_unlock(&iosapic_lock); | 812 | spin_unlock(&iosapic_lock); |
813 | spin_unlock_irqrestore(&irq_descp(vector)->lock, | 813 | spin_unlock_irqrestore(&irq_desc[vector].lock, |
814 | flags); | 814 | flags); |
815 | return err; | 815 | return err; |
816 | } | 816 | } |
@@ -825,7 +825,7 @@ again: | |||
825 | set_rte(gsi, vector, dest, mask); | 825 | set_rte(gsi, vector, dest, mask); |
826 | } | 826 | } |
827 | spin_unlock(&iosapic_lock); | 827 | spin_unlock(&iosapic_lock); |
828 | spin_unlock_irqrestore(&irq_descp(vector)->lock, flags); | 828 | spin_unlock_irqrestore(&irq_desc[vector].lock, flags); |
829 | 829 | ||
830 | printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n", | 830 | printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n", |
831 | gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), | 831 | gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), |
@@ -860,7 +860,7 @@ iosapic_unregister_intr (unsigned int gsi) | |||
860 | } | 860 | } |
861 | vector = irq_to_vector(irq); | 861 | vector = irq_to_vector(irq); |
862 | 862 | ||
863 | idesc = irq_descp(irq); | 863 | idesc = irq_desc + irq; |
864 | spin_lock_irqsave(&idesc->lock, flags); | 864 | spin_lock_irqsave(&idesc->lock, flags); |
865 | spin_lock(&iosapic_lock); | 865 | spin_lock(&iosapic_lock); |
866 | { | 866 | { |
@@ -903,7 +903,7 @@ iosapic_unregister_intr (unsigned int gsi) | |||
903 | BUG_ON(iosapic_intr_info[vector].count); | 903 | BUG_ON(iosapic_intr_info[vector].count); |
904 | 904 | ||
905 | /* Clear the interrupt controller descriptor */ | 905 | /* Clear the interrupt controller descriptor */ |
906 | idesc->handler = &no_irq_type; | 906 | idesc->chip = &no_irq_type; |
907 | 907 | ||
908 | /* Clear the interrupt information */ | 908 | /* Clear the interrupt information */ |
909 | memset(&iosapic_intr_info[vector], 0, | 909 | memset(&iosapic_intr_info[vector], 0, |
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 9c72ea3f6432..7852382de2fa 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
76 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | 76 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
77 | } | 77 | } |
78 | #endif | 78 | #endif |
79 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 79 | seq_printf(p, " %14s", irq_desc[i].chip->typename); |
80 | seq_printf(p, " %s", action->name); | 80 | seq_printf(p, " %s", action->name); |
81 | 81 | ||
82 | for (action=action->next; action; action = action->next) | 82 | for (action=action->next; action; action = action->next) |
@@ -100,7 +100,7 @@ void set_irq_affinity_info (unsigned int irq, int hwid, int redir) | |||
100 | cpu_set(cpu_logical_id(hwid), mask); | 100 | cpu_set(cpu_logical_id(hwid), mask); |
101 | 101 | ||
102 | if (irq < NR_IRQS) { | 102 | if (irq < NR_IRQS) { |
103 | irq_affinity[irq] = mask; | 103 | irq_desc[irq].affinity = mask; |
104 | irq_redir[irq] = (char) (redir & 0xff); | 104 | irq_redir[irq] = (char) (redir & 0xff); |
105 | } | 105 | } |
106 | } | 106 | } |
@@ -120,7 +120,7 @@ static void migrate_irqs(void) | |||
120 | int irq, new_cpu; | 120 | int irq, new_cpu; |
121 | 121 | ||
122 | for (irq=0; irq < NR_IRQS; irq++) { | 122 | for (irq=0; irq < NR_IRQS; irq++) { |
123 | desc = irq_descp(irq); | 123 | desc = irq_desc + irq; |
124 | 124 | ||
125 | /* | 125 | /* |
126 | * No handling for now. | 126 | * No handling for now. |
@@ -131,7 +131,7 @@ static void migrate_irqs(void) | |||
131 | if (desc->status == IRQ_PER_CPU) | 131 | if (desc->status == IRQ_PER_CPU) |
132 | continue; | 132 | continue; |
133 | 133 | ||
134 | cpus_and(mask, irq_affinity[irq], cpu_online_map); | 134 | cpus_and(mask, irq_desc[irq].affinity, cpu_online_map); |
135 | if (any_online_cpu(mask) == NR_CPUS) { | 135 | if (any_online_cpu(mask) == NR_CPUS) { |
136 | /* | 136 | /* |
137 | * Save it for phase 2 processing | 137 | * Save it for phase 2 processing |
@@ -144,15 +144,15 @@ static void migrate_irqs(void) | |||
144 | /* | 144 | /* |
145 | * Al three are essential, currently WARN_ON.. maybe panic? | 145 | * Al three are essential, currently WARN_ON.. maybe panic? |
146 | */ | 146 | */ |
147 | if (desc->handler && desc->handler->disable && | 147 | if (desc->chip && desc->chip->disable && |
148 | desc->handler->enable && desc->handler->set_affinity) { | 148 | desc->chip->enable && desc->chip->set_affinity) { |
149 | desc->handler->disable(irq); | 149 | desc->chip->disable(irq); |
150 | desc->handler->set_affinity(irq, mask); | 150 | desc->chip->set_affinity(irq, mask); |
151 | desc->handler->enable(irq); | 151 | desc->chip->enable(irq); |
152 | } else { | 152 | } else { |
153 | WARN_ON((!(desc->handler) || !(desc->handler->disable) || | 153 | WARN_ON((!(desc->chip) || !(desc->chip->disable) || |
154 | !(desc->handler->enable) || | 154 | !(desc->chip->enable) || |
155 | !(desc->handler->set_affinity))); | 155 | !(desc->chip->set_affinity))); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | } | 158 | } |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index ef9a2b49307a..f5035304594e 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -249,9 +249,9 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action) | |||
249 | 249 | ||
250 | for (irq = 0; irq < NR_IRQS; ++irq) | 250 | for (irq = 0; irq < NR_IRQS; ++irq) |
251 | if (irq_to_vector(irq) == vec) { | 251 | if (irq_to_vector(irq) == vec) { |
252 | desc = irq_descp(irq); | 252 | desc = irq_desc + irq; |
253 | desc->status |= IRQ_PER_CPU; | 253 | desc->status |= IRQ_PER_CPU; |
254 | desc->handler = &irq_type_ia64_lsapic; | 254 | desc->chip = &irq_type_ia64_lsapic; |
255 | if (action) | 255 | if (action) |
256 | setup_irq(irq, action); | 256 | setup_irq(irq, action); |
257 | } | 257 | } |
diff --git a/arch/ia64/kernel/irq_lsapic.c b/arch/ia64/kernel/irq_lsapic.c index ea14e6a04409..1ab58b09f3d7 100644 --- a/arch/ia64/kernel/irq_lsapic.c +++ b/arch/ia64/kernel/irq_lsapic.c | |||
@@ -26,6 +26,13 @@ lsapic_noop (unsigned int irq) | |||
26 | /* nuthing to do... */ | 26 | /* nuthing to do... */ |
27 | } | 27 | } |
28 | 28 | ||
29 | static int lsapic_retrigger(unsigned int irq) | ||
30 | { | ||
31 | ia64_resend_irq(irq); | ||
32 | |||
33 | return 1; | ||
34 | } | ||
35 | |||
29 | struct hw_interrupt_type irq_type_ia64_lsapic = { | 36 | struct hw_interrupt_type irq_type_ia64_lsapic = { |
30 | .typename = "LSAPIC", | 37 | .typename = "LSAPIC", |
31 | .startup = lsapic_noop_startup, | 38 | .startup = lsapic_noop_startup, |
@@ -33,5 +40,6 @@ struct hw_interrupt_type irq_type_ia64_lsapic = { | |||
33 | .enable = lsapic_noop, | 40 | .enable = lsapic_noop, |
34 | .disable = lsapic_noop, | 41 | .disable = lsapic_noop, |
35 | .ack = lsapic_noop, | 42 | .ack = lsapic_noop, |
36 | .end = lsapic_noop | 43 | .end = lsapic_noop, |
44 | .retrigger = lsapic_retrigger, | ||
37 | }; | 45 | }; |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 6a0880639bc9..d7dc5e63de63 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1788,7 +1788,7 @@ ia64_mca_late_init(void) | |||
1788 | cpe_poll_enabled = 0; | 1788 | cpe_poll_enabled = 0; |
1789 | for (irq = 0; irq < NR_IRQS; ++irq) | 1789 | for (irq = 0; irq < NR_IRQS; ++irq) |
1790 | if (irq_to_vector(irq) == cpe_vector) { | 1790 | if (irq_to_vector(irq) == cpe_vector) { |
1791 | desc = irq_descp(irq); | 1791 | desc = irq_desc + irq; |
1792 | desc->status |= IRQ_PER_CPU; | 1792 | desc->status |= IRQ_PER_CPU; |
1793 | setup_irq(irq, &mca_cpe_irqaction); | 1793 | setup_irq(irq, &mca_cpe_irqaction); |
1794 | ia64_cpe_irq = irq; | 1794 | ia64_cpe_irq = irq; |
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 859fb37ff49b..8a1208419138 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
@@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu) | |||
959 | } | 959 | } |
960 | } | 960 | } |
961 | 961 | ||
962 | static int palinfo_cpu_callback(struct notifier_block *nfb, | 962 | static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb, |
963 | unsigned long action, | 963 | unsigned long action, |
964 | void *hcpu) | 964 | void *hcpu) |
965 | { | 965 | { |
@@ -978,7 +978,7 @@ static int palinfo_cpu_callback(struct notifier_block *nfb, | |||
978 | return NOTIFY_OK; | 978 | return NOTIFY_OK; |
979 | } | 979 | } |
980 | 980 | ||
981 | static struct notifier_block palinfo_cpu_notifier = | 981 | static struct notifier_block __cpuinitdata palinfo_cpu_notifier = |
982 | { | 982 | { |
983 | .notifier_call = palinfo_cpu_callback, | 983 | .notifier_call = palinfo_cpu_callback, |
984 | .priority = 0, | 984 | .priority = 0, |
@@ -998,7 +998,7 @@ palinfo_init(void) | |||
998 | } | 998 | } |
999 | 999 | ||
1000 | /* Register for future delivery via notify registration */ | 1000 | /* Register for future delivery via notify registration */ |
1001 | register_cpu_notifier(&palinfo_cpu_notifier); | 1001 | register_hotcpu_notifier(&palinfo_cpu_notifier); |
1002 | 1002 | ||
1003 | return 0; | 1003 | return 0; |
1004 | } | 1004 | } |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 6d7bc8ff7b3a..a0055d3d695c 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -6165,7 +6165,7 @@ pfm_load_regs (struct task_struct *task) | |||
6165 | /* | 6165 | /* |
6166 | * will replay the PMU interrupt | 6166 | * will replay the PMU interrupt |
6167 | */ | 6167 | */ |
6168 | if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR); | 6168 | if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR); |
6169 | 6169 | ||
6170 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; | 6170 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; |
6171 | } | 6171 | } |
@@ -6305,7 +6305,7 @@ pfm_load_regs (struct task_struct *task) | |||
6305 | /* | 6305 | /* |
6306 | * will replay the PMU interrupt | 6306 | * will replay the PMU interrupt |
6307 | */ | 6307 | */ |
6308 | if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR); | 6308 | if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR); |
6309 | 6309 | ||
6310 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; | 6310 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; |
6311 | } | 6311 | } |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index 663a186ad194..9065f0f01ba3 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = { | |||
572 | }; | 572 | }; |
573 | 573 | ||
574 | #ifdef CONFIG_HOTPLUG_CPU | 574 | #ifdef CONFIG_HOTPLUG_CPU |
575 | static int | 575 | static int __devinit |
576 | salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) | 576 | salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) |
577 | { | 577 | { |
578 | unsigned int i, cpu = (unsigned long)hcpu; | 578 | unsigned int i, cpu = (unsigned long)hcpu; |
@@ -673,9 +673,7 @@ salinfo_init(void) | |||
673 | salinfo_timer.function = &salinfo_timeout; | 673 | salinfo_timer.function = &salinfo_timeout; |
674 | add_timer(&salinfo_timer); | 674 | add_timer(&salinfo_timer); |
675 | 675 | ||
676 | #ifdef CONFIG_HOTPLUG_CPU | 676 | register_hotcpu_notifier(&salinfo_cpu_notifier); |
677 | register_cpu_notifier(&salinfo_cpu_notifier); | ||
678 | #endif | ||
679 | 677 | ||
680 | return 0; | 678 | return 0; |
681 | } | 679 | } |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 44e9547878ac..5203df78f150 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -677,16 +677,16 @@ int migrate_platform_irqs(unsigned int cpu) | |||
677 | new_cpei_cpu = any_online_cpu(cpu_online_map); | 677 | new_cpei_cpu = any_online_cpu(cpu_online_map); |
678 | mask = cpumask_of_cpu(new_cpei_cpu); | 678 | mask = cpumask_of_cpu(new_cpei_cpu); |
679 | set_cpei_target_cpu(new_cpei_cpu); | 679 | set_cpei_target_cpu(new_cpei_cpu); |
680 | desc = irq_descp(ia64_cpe_irq); | 680 | desc = irq_desc + ia64_cpe_irq; |
681 | /* | 681 | /* |
682 | * Switch for now, immediatly, we need to do fake intr | 682 | * Switch for now, immediatly, we need to do fake intr |
683 | * as other interrupts, but need to study CPEI behaviour with | 683 | * as other interrupts, but need to study CPEI behaviour with |
684 | * polling before making changes. | 684 | * polling before making changes. |
685 | */ | 685 | */ |
686 | if (desc) { | 686 | if (desc) { |
687 | desc->handler->disable(ia64_cpe_irq); | 687 | desc->chip->disable(ia64_cpe_irq); |
688 | desc->handler->set_affinity(ia64_cpe_irq, mask); | 688 | desc->chip->set_affinity(ia64_cpe_irq, mask); |
689 | desc->handler->enable(ia64_cpe_irq); | 689 | desc->chip->enable(ia64_cpe_irq); |
690 | printk ("Re-targetting CPEI to cpu %d\n", new_cpei_cpu); | 690 | printk ("Re-targetting CPEI to cpu %d\n", new_cpei_cpu); |
691 | } | 691 | } |
692 | } | 692 | } |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 879edb51d1e0..5511d9c6c701 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -26,19 +26,10 @@ | |||
26 | #include <asm/numa.h> | 26 | #include <asm/numa.h> |
27 | #include <asm/cpu.h> | 27 | #include <asm/cpu.h> |
28 | 28 | ||
29 | #ifdef CONFIG_NUMA | ||
30 | static struct node *sysfs_nodes; | ||
31 | #endif | ||
32 | static struct ia64_cpu *sysfs_cpus; | 29 | static struct ia64_cpu *sysfs_cpus; |
33 | 30 | ||
34 | int arch_register_cpu(int num) | 31 | int arch_register_cpu(int num) |
35 | { | 32 | { |
36 | struct node *parent = NULL; | ||
37 | |||
38 | #ifdef CONFIG_NUMA | ||
39 | parent = &sysfs_nodes[cpu_to_node(num)]; | ||
40 | #endif /* CONFIG_NUMA */ | ||
41 | |||
42 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) | 33 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) |
43 | /* | 34 | /* |
44 | * If CPEI cannot be re-targetted, and this is | 35 | * If CPEI cannot be re-targetted, and this is |
@@ -48,21 +39,14 @@ int arch_register_cpu(int num) | |||
48 | sysfs_cpus[num].cpu.no_control = 1; | 39 | sysfs_cpus[num].cpu.no_control = 1; |
49 | #endif | 40 | #endif |
50 | 41 | ||
51 | return register_cpu(&sysfs_cpus[num].cpu, num, parent); | 42 | return register_cpu(&sysfs_cpus[num].cpu, num); |
52 | } | 43 | } |
53 | 44 | ||
54 | #ifdef CONFIG_HOTPLUG_CPU | 45 | #ifdef CONFIG_HOTPLUG_CPU |
55 | 46 | ||
56 | void arch_unregister_cpu(int num) | 47 | void arch_unregister_cpu(int num) |
57 | { | 48 | { |
58 | struct node *parent = NULL; | 49 | return unregister_cpu(&sysfs_cpus[num].cpu); |
59 | |||
60 | #ifdef CONFIG_NUMA | ||
61 | int node = cpu_to_node(num); | ||
62 | parent = &sysfs_nodes[node]; | ||
63 | #endif /* CONFIG_NUMA */ | ||
64 | |||
65 | return unregister_cpu(&sysfs_cpus[num].cpu, parent); | ||
66 | } | 50 | } |
67 | EXPORT_SYMBOL(arch_register_cpu); | 51 | EXPORT_SYMBOL(arch_register_cpu); |
68 | EXPORT_SYMBOL(arch_unregister_cpu); | 52 | EXPORT_SYMBOL(arch_unregister_cpu); |
@@ -74,17 +58,11 @@ static int __init topology_init(void) | |||
74 | int i, err = 0; | 58 | int i, err = 0; |
75 | 59 | ||
76 | #ifdef CONFIG_NUMA | 60 | #ifdef CONFIG_NUMA |
77 | sysfs_nodes = kzalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); | ||
78 | if (!sysfs_nodes) { | ||
79 | err = -ENOMEM; | ||
80 | goto out; | ||
81 | } | ||
82 | |||
83 | /* | 61 | /* |
84 | * MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? | 62 | * MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? |
85 | */ | 63 | */ |
86 | for_each_online_node(i) { | 64 | for_each_online_node(i) { |
87 | if ((err = register_node(&sysfs_nodes[i], i, 0))) | 65 | if ((err = register_one_node(i))) |
88 | goto out; | 66 | goto out; |
89 | } | 67 | } |
90 | #endif | 68 | #endif |
@@ -426,7 +404,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev) | |||
426 | * When a cpu is hot-plugged, do a check and initiate | 404 | * When a cpu is hot-plugged, do a check and initiate |
427 | * cache kobject if necessary | 405 | * cache kobject if necessary |
428 | */ | 406 | */ |
429 | static int cache_cpu_callback(struct notifier_block *nfb, | 407 | static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, |
430 | unsigned long action, void *hcpu) | 408 | unsigned long action, void *hcpu) |
431 | { | 409 | { |
432 | unsigned int cpu = (unsigned long)hcpu; | 410 | unsigned int cpu = (unsigned long)hcpu; |
@@ -444,7 +422,7 @@ static int cache_cpu_callback(struct notifier_block *nfb, | |||
444 | return NOTIFY_OK; | 422 | return NOTIFY_OK; |
445 | } | 423 | } |
446 | 424 | ||
447 | static struct notifier_block cache_cpu_notifier = | 425 | static struct notifier_block __cpuinitdata cache_cpu_notifier = |
448 | { | 426 | { |
449 | .notifier_call = cache_cpu_callback | 427 | .notifier_call = cache_cpu_callback |
450 | }; | 428 | }; |