diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-07-13 16:23:51 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-07-13 16:23:51 -0400 |
commit | 327309e899662b482c58cf25f574513d38b5788c (patch) | |
tree | 069de438aa0e92dd9b6ba28e6b207e2cd07151a5 /arch/ia64/kernel | |
parent | 0c168775709faa74c1b87f1e61046e0c51ade7f3 (diff) | |
parent | c32511e2718618f0b53479eb36e07439aa363a74 (diff) |
Merge upstream 2.6.13-rc3 into ieee80211 branch of netdev-2.6.
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 58 | ||||
-rw-r--r-- | arch/ia64/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 13 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 15 | ||||
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/numa.c | 57 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 41 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 7 | ||||
-rw-r--r-- | arch/ia64/kernel/traps.c | 6 |
15 files changed, 146 insertions, 65 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index b2e2f6509eb0..e1fb68ddec26 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -17,6 +17,7 @@ obj-$(CONFIG_IA64_PALINFO) += palinfo.o | |||
17 | obj-$(CONFIG_IOSAPIC) += iosapic.o | 17 | obj-$(CONFIG_IOSAPIC) += iosapic.o |
18 | obj-$(CONFIG_MODULES) += module.o | 18 | obj-$(CONFIG_MODULES) += module.o |
19 | obj-$(CONFIG_SMP) += smp.o smpboot.o domain.o | 19 | obj-$(CONFIG_SMP) += smp.o smpboot.o domain.o |
20 | obj-$(CONFIG_NUMA) += numa.o | ||
20 | obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o | 21 | obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o |
21 | obj-$(CONFIG_IA64_CYCLONE) += cyclone.o | 22 | obj-$(CONFIG_IA64_CYCLONE) += cyclone.o |
22 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o | 23 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index cda06f88c66e..9609f243e5d0 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Copyright (C) 2001 Jenna Hall <jenna.s.hall@intel.com> | 11 | * Copyright (C) 2001 Jenna Hall <jenna.s.hall@intel.com> |
12 | * Copyright (C) 2001 Takayoshi Kochi <t-kochi@bq.jp.nec.com> | 12 | * Copyright (C) 2001 Takayoshi Kochi <t-kochi@bq.jp.nec.com> |
13 | * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> | 13 | * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> |
14 | * Copyright (C) 2004 Ashok Raj <ashok.raj@intel.com> | ||
14 | * | 15 | * |
15 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 16 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
16 | * | 17 | * |
@@ -67,6 +68,11 @@ EXPORT_SYMBOL(pm_power_off); | |||
67 | unsigned char acpi_kbd_controller_present = 1; | 68 | unsigned char acpi_kbd_controller_present = 1; |
68 | unsigned char acpi_legacy_devices; | 69 | unsigned char acpi_legacy_devices; |
69 | 70 | ||
71 | static unsigned int __initdata acpi_madt_rev; | ||
72 | |||
73 | unsigned int acpi_cpei_override; | ||
74 | unsigned int acpi_cpei_phys_cpuid; | ||
75 | |||
70 | #define MAX_SAPICS 256 | 76 | #define MAX_SAPICS 256 |
71 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = | 77 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = |
72 | { [0 ... MAX_SAPICS - 1] = -1 }; | 78 | { [0 ... MAX_SAPICS - 1] = -1 }; |
@@ -265,10 +271,56 @@ acpi_parse_plat_int_src ( | |||
265 | (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | 271 | (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); |
266 | 272 | ||
267 | platform_intr_list[plintsrc->type] = vector; | 273 | platform_intr_list[plintsrc->type] = vector; |
274 | if (acpi_madt_rev > 1) { | ||
275 | acpi_cpei_override = plintsrc->plint_flags.cpei_override_flag; | ||
276 | } | ||
277 | |||
278 | /* | ||
279 | * Save the physical id, so we can check when its being removed | ||
280 | */ | ||
281 | acpi_cpei_phys_cpuid = ((plintsrc->id << 8) | (plintsrc->eid)) & 0xffff; | ||
282 | |||
268 | return 0; | 283 | return 0; |
269 | } | 284 | } |
270 | 285 | ||
271 | 286 | ||
287 | unsigned int can_cpei_retarget(void) | ||
288 | { | ||
289 | extern int cpe_vector; | ||
290 | |||
291 | /* | ||
292 | * Only if CPEI is supported and the override flag | ||
293 | * is present, otherwise return that its re-targettable | ||
294 | * if we are in polling mode. | ||
295 | */ | ||
296 | if (cpe_vector > 0 && !acpi_cpei_override) | ||
297 | return 0; | ||
298 | else | ||
299 | return 1; | ||
300 | } | ||
301 | |||
302 | unsigned int is_cpu_cpei_target(unsigned int cpu) | ||
303 | { | ||
304 | unsigned int logical_id; | ||
305 | |||
306 | logical_id = cpu_logical_id(acpi_cpei_phys_cpuid); | ||
307 | |||
308 | if (logical_id == cpu) | ||
309 | return 1; | ||
310 | else | ||
311 | return 0; | ||
312 | } | ||
313 | |||
314 | void set_cpei_target_cpu(unsigned int cpu) | ||
315 | { | ||
316 | acpi_cpei_phys_cpuid = cpu_physical_id(cpu); | ||
317 | } | ||
318 | |||
319 | unsigned int get_cpei_target_cpu(void) | ||
320 | { | ||
321 | return acpi_cpei_phys_cpuid; | ||
322 | } | ||
323 | |||
272 | static int __init | 324 | static int __init |
273 | acpi_parse_int_src_ovr ( | 325 | acpi_parse_int_src_ovr ( |
274 | acpi_table_entry_header *header, const unsigned long end) | 326 | acpi_table_entry_header *header, const unsigned long end) |
@@ -326,6 +378,8 @@ acpi_parse_madt (unsigned long phys_addr, unsigned long size) | |||
326 | 378 | ||
327 | acpi_madt = (struct acpi_table_madt *) __va(phys_addr); | 379 | acpi_madt = (struct acpi_table_madt *) __va(phys_addr); |
328 | 380 | ||
381 | acpi_madt_rev = acpi_madt->header.revision; | ||
382 | |||
329 | /* remember the value for reference after free_initmem() */ | 383 | /* remember the value for reference after free_initmem() */ |
330 | #ifdef CONFIG_ITANIUM | 384 | #ifdef CONFIG_ITANIUM |
331 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ | 385 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ |
@@ -640,9 +694,11 @@ acpi_boot_init (void) | |||
640 | if (smp_boot_data.cpu_phys_id[cpu] != hard_smp_processor_id()) | 694 | if (smp_boot_data.cpu_phys_id[cpu] != hard_smp_processor_id()) |
641 | node_cpuid[i++].phys_id = smp_boot_data.cpu_phys_id[cpu]; | 695 | node_cpuid[i++].phys_id = smp_boot_data.cpu_phys_id[cpu]; |
642 | } | 696 | } |
643 | build_cpu_to_node_map(); | ||
644 | # endif | 697 | # endif |
645 | #endif | 698 | #endif |
699 | #ifdef CONFIG_ACPI_NUMA | ||
700 | build_cpu_to_node_map(); | ||
701 | #endif | ||
646 | /* Make boot-up look pretty */ | 702 | /* Make boot-up look pretty */ |
647 | printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, total_cpus); | 703 | printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, total_cpus); |
648 | return 0; | 704 | return 0; |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 69f88d561d62..bb9a506deb78 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1249,7 +1249,7 @@ ENTRY(sys_rt_sigreturn) | |||
1249 | stf.spill [r17]=f11 | 1249 | stf.spill [r17]=f11 |
1250 | adds out0=16,sp // out0 = &sigscratch | 1250 | adds out0=16,sp // out0 = &sigscratch |
1251 | br.call.sptk.many rp=ia64_rt_sigreturn | 1251 | br.call.sptk.many rp=ia64_rt_sigreturn |
1252 | .ret19: .restore sp 0 | 1252 | .ret19: .restore sp,0 |
1253 | adds sp=16,sp | 1253 | adds sp=16,sp |
1254 | ;; | 1254 | ;; |
1255 | ld8 r9=[sp] // load new ar.unat | 1255 | ld8 r9=[sp] // load new ar.unat |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index c170be095ccd..7936b62f7a2e 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -489,8 +489,6 @@ static int iosapic_find_sharable_vector (unsigned long trigger, unsigned long po | |||
489 | } | 489 | } |
490 | } | 490 | } |
491 | } | 491 | } |
492 | if (vector < 0) | ||
493 | panic("%s: out of interrupt vectors!\n", __FUNCTION__); | ||
494 | 492 | ||
495 | return vector; | 493 | return vector; |
496 | } | 494 | } |
@@ -506,6 +504,8 @@ iosapic_reassign_vector (int vector) | |||
506 | 504 | ||
507 | if (!list_empty(&iosapic_intr_info[vector].rtes)) { | 505 | if (!list_empty(&iosapic_intr_info[vector].rtes)) { |
508 | new_vector = assign_irq_vector(AUTO_ASSIGN); | 506 | new_vector = assign_irq_vector(AUTO_ASSIGN); |
507 | if (new_vector < 0) | ||
508 | panic("%s: out of interrupt vectors!\n", __FUNCTION__); | ||
509 | printk(KERN_INFO "Reassigning vector %d to %d\n", vector, new_vector); | 509 | printk(KERN_INFO "Reassigning vector %d to %d\n", vector, new_vector); |
510 | memcpy(&iosapic_intr_info[new_vector], &iosapic_intr_info[vector], | 510 | memcpy(&iosapic_intr_info[new_vector], &iosapic_intr_info[vector], |
511 | sizeof(struct iosapic_intr_info)); | 511 | sizeof(struct iosapic_intr_info)); |
@@ -734,9 +734,12 @@ again: | |||
734 | spin_unlock_irqrestore(&iosapic_lock, flags); | 734 | spin_unlock_irqrestore(&iosapic_lock, flags); |
735 | 735 | ||
736 | /* If vector is running out, we try to find a sharable vector */ | 736 | /* If vector is running out, we try to find a sharable vector */ |
737 | vector = assign_irq_vector_nopanic(AUTO_ASSIGN); | 737 | vector = assign_irq_vector(AUTO_ASSIGN); |
738 | if (vector < 0) | 738 | if (vector < 0) { |
739 | vector = iosapic_find_sharable_vector(trigger, polarity); | 739 | vector = iosapic_find_sharable_vector(trigger, polarity); |
740 | if (vector < 0) | ||
741 | panic("%s: out of interrupt vectors!\n", __FUNCTION__); | ||
742 | } | ||
740 | 743 | ||
741 | spin_lock_irqsave(&irq_descp(vector)->lock, flags); | 744 | spin_lock_irqsave(&irq_descp(vector)->lock, flags); |
742 | spin_lock(&iosapic_lock); | 745 | spin_lock(&iosapic_lock); |
@@ -884,6 +887,8 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi, | |||
884 | break; | 887 | break; |
885 | case ACPI_INTERRUPT_INIT: | 888 | case ACPI_INTERRUPT_INIT: |
886 | vector = assign_irq_vector(AUTO_ASSIGN); | 889 | vector = assign_irq_vector(AUTO_ASSIGN); |
890 | if (vector < 0) | ||
891 | panic("%s: out of interrupt vectors!\n", __FUNCTION__); | ||
887 | delivery = IOSAPIC_INIT; | 892 | delivery = IOSAPIC_INIT; |
888 | break; | 893 | break; |
889 | case ACPI_INTERRUPT_CPEI: | 894 | case ACPI_INTERRUPT_CPEI: |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 4fe60c7a2e90..6c4d59fd0364 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -63,30 +63,19 @@ EXPORT_SYMBOL(isa_irq_to_vector_map); | |||
63 | static unsigned long ia64_vector_mask[BITS_TO_LONGS(IA64_NUM_DEVICE_VECTORS)]; | 63 | static unsigned long ia64_vector_mask[BITS_TO_LONGS(IA64_NUM_DEVICE_VECTORS)]; |
64 | 64 | ||
65 | int | 65 | int |
66 | assign_irq_vector_nopanic (int irq) | 66 | assign_irq_vector (int irq) |
67 | { | 67 | { |
68 | int pos, vector; | 68 | int pos, vector; |
69 | again: | 69 | again: |
70 | pos = find_first_zero_bit(ia64_vector_mask, IA64_NUM_DEVICE_VECTORS); | 70 | pos = find_first_zero_bit(ia64_vector_mask, IA64_NUM_DEVICE_VECTORS); |
71 | vector = IA64_FIRST_DEVICE_VECTOR + pos; | 71 | vector = IA64_FIRST_DEVICE_VECTOR + pos; |
72 | if (vector > IA64_LAST_DEVICE_VECTOR) | 72 | if (vector > IA64_LAST_DEVICE_VECTOR) |
73 | return -1; | 73 | return -ENOSPC; |
74 | if (test_and_set_bit(pos, ia64_vector_mask)) | 74 | if (test_and_set_bit(pos, ia64_vector_mask)) |
75 | goto again; | 75 | goto again; |
76 | return vector; | 76 | return vector; |
77 | } | 77 | } |
78 | 78 | ||
79 | int | ||
80 | assign_irq_vector (int irq) | ||
81 | { | ||
82 | int vector = assign_irq_vector_nopanic(irq); | ||
83 | |||
84 | if (vector < 0) | ||
85 | panic("assign_irq_vector: out of interrupt vectors!"); | ||
86 | |||
87 | return vector; | ||
88 | } | ||
89 | |||
90 | void | 79 | void |
91 | free_irq_vector (int vector) | 80 | free_irq_vector (int vector) |
92 | { | 81 | { |
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 3aa3167edbec..884f5cd27d8a 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -713,7 +713,7 @@ static struct kprobe trampoline_p = { | |||
713 | .pre_handler = trampoline_probe_handler | 713 | .pre_handler = trampoline_probe_handler |
714 | }; | 714 | }; |
715 | 715 | ||
716 | int __init arch_init(void) | 716 | int __init arch_init_kprobes(void) |
717 | { | 717 | { |
718 | trampoline_p.addr = | 718 | trampoline_p.addr = |
719 | (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; | 719 | (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 736e328b5e61..4ebbf3974381 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -271,7 +271,7 @@ ia64_mca_log_sal_error_record(int sal_info_type) | |||
271 | 271 | ||
272 | #ifdef CONFIG_ACPI | 272 | #ifdef CONFIG_ACPI |
273 | 273 | ||
274 | static int cpe_vector = -1; | 274 | int cpe_vector = -1; |
275 | 275 | ||
276 | static irqreturn_t | 276 | static irqreturn_t |
277 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) | 277 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) |
diff --git a/arch/ia64/kernel/numa.c b/arch/ia64/kernel/numa.c new file mode 100644 index 000000000000..a68ce6678092 --- /dev/null +++ b/arch/ia64/kernel/numa.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | * | ||
16 | * ia64 kernel NUMA specific stuff | ||
17 | * | ||
18 | * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> | ||
19 | * Copyright (C) 2004 Silicon Graphics, Inc. | ||
20 | * Jesse Barnes <jbarnes@sgi.com> | ||
21 | */ | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/topology.h> | ||
24 | #include <linux/module.h> | ||
25 | #include <asm/processor.h> | ||
26 | #include <asm/smp.h> | ||
27 | |||
28 | u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned; | ||
29 | EXPORT_SYMBOL(cpu_to_node_map); | ||
30 | |||
31 | cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; | ||
32 | |||
33 | /** | ||
34 | * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays | ||
35 | * | ||
36 | * Build cpu to node mapping and initialize the per node cpu masks using | ||
37 | * info from the node_cpuid array handed to us by ACPI. | ||
38 | */ | ||
39 | void __init build_cpu_to_node_map(void) | ||
40 | { | ||
41 | int cpu, i, node; | ||
42 | |||
43 | for(node=0; node < MAX_NUMNODES; node++) | ||
44 | cpus_clear(node_to_cpu_mask[node]); | ||
45 | |||
46 | for(cpu = 0; cpu < NR_CPUS; ++cpu) { | ||
47 | node = -1; | ||
48 | for (i = 0; i < NR_CPUS; ++i) | ||
49 | if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) { | ||
50 | node = node_cpuid[i].nid; | ||
51 | break; | ||
52 | } | ||
53 | cpu_to_node_map[cpu] = (node >= 0) ? node : 0; | ||
54 | if (node >= 0) | ||
55 | cpu_set(cpu, node_to_cpu_mask[node]); | ||
56 | } | ||
57 | } | ||
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 6407bff6bfd7..b8ebb8e427ef 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/vfs.h> | 37 | #include <linux/vfs.h> |
38 | #include <linux/pagemap.h> | 38 | #include <linux/pagemap.h> |
39 | #include <linux/mount.h> | 39 | #include <linux/mount.h> |
40 | #include <linux/version.h> | ||
41 | #include <linux/bitops.h> | 40 | #include <linux/bitops.h> |
42 | 41 | ||
43 | #include <asm/errno.h> | 42 | #include <asm/errno.h> |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 6e35bff05d59..e484910246ad 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -196,6 +196,7 @@ update_pal_halt_status(int status) | |||
196 | void | 196 | void |
197 | default_idle (void) | 197 | default_idle (void) |
198 | { | 198 | { |
199 | local_irq_enable(); | ||
199 | while (!need_resched()) | 200 | while (!need_resched()) |
200 | if (can_do_pal_halt) | 201 | if (can_do_pal_halt) |
201 | safe_halt(); | 202 | safe_halt(); |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 2693e1522d7c..5c7c95737bbf 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -40,6 +40,8 @@ | |||
40 | #include <linux/serial_core.h> | 40 | #include <linux/serial_core.h> |
41 | #include <linux/efi.h> | 41 | #include <linux/efi.h> |
42 | #include <linux/initrd.h> | 42 | #include <linux/initrd.h> |
43 | #include <linux/platform.h> | ||
44 | #include <linux/pm.h> | ||
43 | 45 | ||
44 | #include <asm/ia32.h> | 46 | #include <asm/ia32.h> |
45 | #include <asm/machvec.h> | 47 | #include <asm/machvec.h> |
@@ -783,6 +785,7 @@ cpu_init (void) | |||
783 | /* size of physical stacked register partition plus 8 bytes: */ | 785 | /* size of physical stacked register partition plus 8 bytes: */ |
784 | __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; | 786 | __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; |
785 | platform_cpu_init(); | 787 | platform_cpu_init(); |
788 | pm_idle = default_idle; | ||
786 | } | 789 | } |
787 | 790 | ||
788 | void | 791 | void |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index edd9f07860b2..b8a0a7d257a9 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -143,6 +143,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) | |||
143 | 143 | ||
144 | __copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16); | 144 | __copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16); |
145 | psr->mfh = 0; /* drop signal handler's fph contents... */ | 145 | psr->mfh = 0; /* drop signal handler's fph contents... */ |
146 | preempt_disable(); | ||
146 | if (psr->dfh) | 147 | if (psr->dfh) |
147 | ia64_drop_fpu(current); | 148 | ia64_drop_fpu(current); |
148 | else { | 149 | else { |
@@ -150,6 +151,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) | |||
150 | __ia64_load_fpu(current->thread.fph); | 151 | __ia64_load_fpu(current->thread.fph); |
151 | ia64_set_local_fpu_owner(current); | 152 | ia64_set_local_fpu_owner(current); |
152 | } | 153 | } |
154 | preempt_enable(); | ||
153 | } | 155 | } |
154 | return err; | 156 | return err; |
155 | } | 157 | } |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 623b0a546709..7d72c0d872b3 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -525,47 +525,6 @@ smp_build_cpu_map (void) | |||
525 | } | 525 | } |
526 | } | 526 | } |
527 | 527 | ||
528 | #ifdef CONFIG_NUMA | ||
529 | |||
530 | /* on which node is each logical CPU (one cacheline even for 64 CPUs) */ | ||
531 | u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned; | ||
532 | EXPORT_SYMBOL(cpu_to_node_map); | ||
533 | /* which logical CPUs are on which nodes */ | ||
534 | cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; | ||
535 | |||
536 | /* | ||
537 | * Build cpu to node mapping and initialize the per node cpu masks. | ||
538 | */ | ||
539 | void __init | ||
540 | build_cpu_to_node_map (void) | ||
541 | { | ||
542 | int cpu, i, node; | ||
543 | |||
544 | for(node=0; node<MAX_NUMNODES; node++) | ||
545 | cpus_clear(node_to_cpu_mask[node]); | ||
546 | for(cpu = 0; cpu < NR_CPUS; ++cpu) { | ||
547 | /* | ||
548 | * All Itanium NUMA platforms I know use ACPI, so maybe we | ||
549 | * can drop this ifdef completely. [EF] | ||
550 | */ | ||
551 | #ifdef CONFIG_ACPI_NUMA | ||
552 | node = -1; | ||
553 | for (i = 0; i < NR_CPUS; ++i) | ||
554 | if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) { | ||
555 | node = node_cpuid[i].nid; | ||
556 | break; | ||
557 | } | ||
558 | #else | ||
559 | # error Fixme: Dunno how to build CPU-to-node map. | ||
560 | #endif | ||
561 | cpu_to_node_map[cpu] = (node >= 0) ? node : 0; | ||
562 | if (node >= 0) | ||
563 | cpu_set(cpu, node_to_cpu_mask[node]); | ||
564 | } | ||
565 | } | ||
566 | |||
567 | #endif /* CONFIG_NUMA */ | ||
568 | |||
569 | /* | 528 | /* |
570 | * Cycle through the APs sending Wakeup IPIs to boot each. | 529 | * Cycle through the APs sending Wakeup IPIs to boot each. |
571 | */ | 530 | */ |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index f1aafd4c05f9..d8030f3bd865 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -36,6 +36,13 @@ int arch_register_cpu(int num) | |||
36 | parent = &sysfs_nodes[cpu_to_node(num)]; | 36 | parent = &sysfs_nodes[cpu_to_node(num)]; |
37 | #endif /* CONFIG_NUMA */ | 37 | #endif /* CONFIG_NUMA */ |
38 | 38 | ||
39 | /* | ||
40 | * If CPEI cannot be re-targetted, and this is | ||
41 | * CPEI target, then dont create the control file | ||
42 | */ | ||
43 | if (!can_cpei_retarget() && is_cpu_cpei_target(num)) | ||
44 | sysfs_cpus[num].cpu.no_control = 1; | ||
45 | |||
39 | return register_cpu(&sysfs_cpus[num].cpu, num, parent); | 46 | return register_cpu(&sysfs_cpus[num].cpu, num, parent); |
40 | } | 47 | } |
41 | 48 | ||
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index e7e520d90f03..4440c8343fa4 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -90,14 +90,16 @@ die (const char *str, struct pt_regs *regs, long err) | |||
90 | .lock_owner_depth = 0 | 90 | .lock_owner_depth = 0 |
91 | }; | 91 | }; |
92 | static int die_counter; | 92 | static int die_counter; |
93 | int cpu = get_cpu(); | ||
93 | 94 | ||
94 | if (die.lock_owner != smp_processor_id()) { | 95 | if (die.lock_owner != cpu) { |
95 | console_verbose(); | 96 | console_verbose(); |
96 | spin_lock_irq(&die.lock); | 97 | spin_lock_irq(&die.lock); |
97 | die.lock_owner = smp_processor_id(); | 98 | die.lock_owner = cpu; |
98 | die.lock_owner_depth = 0; | 99 | die.lock_owner_depth = 0; |
99 | bust_spinlocks(1); | 100 | bust_spinlocks(1); |
100 | } | 101 | } |
102 | put_cpu(); | ||
101 | 103 | ||
102 | if (++die.lock_owner_depth < 3) { | 104 | if (++die.lock_owner_depth < 3) { |
103 | printk("%s[%d]: %s %ld [%d]\n", | 105 | printk("%s[%d]: %s %ld [%d]\n", |