diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:28:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:28:11 -0500 |
commit | 8fc543c8f004fc9dfe0a262dc452dfe2eca4589b (patch) | |
tree | b14a215ffe0f8c594ac517257855a681ba6b7b79 /arch | |
parent | a70a93229943c177f0062490b4f8e44be4cef685 (diff) | |
parent | 7f6ff62a8f3a4e68258958196098c6f71563ae61 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] IOSAPIC bogus error cleanup
[IA64] Update printing of feature set bits
[IA64] Fix IOSAPIC delivery mode setting
[IA64] XPC heartbeat timer function must run on CPU 0
[IA64] Clean up /proc/interrupts output
[IA64] Disable/re-enable CPE interrupts on Altix
[IA64] Clean-up McKinley Errata message
[IA64] Add gate.lds to list of files ignored by Git
[IA64] Fix section mismatch in contig.c version of per_cpu_init()
[IA64] Wrong args to memset in efi_gettimeofday()
[IA64] Remove duplicate includes from ia32priv.h
[IA64] fix number of bytes zeroed by sys_fw_init() in arch/ia64/hp/sim/boot/fw-emu.c
[IA64] Fix perfmon sysctl directory modes
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/hp/sim/boot/fw-emu.c | 2 | ||||
-rw-r--r-- | arch/ia64/ia32/ia32priv.h | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/.gitignore | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 8 | ||||
-rw-r--r-- | arch/ia64/kernel/efi.c | 5 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 18 | ||||
-rw-r--r-- | arch/ia64/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/palinfo.c | 91 | ||||
-rw-r--r-- | arch/ia64/kernel/patch.c | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 4 | ||||
-rw-r--r-- | arch/ia64/mm/contig.c | 74 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/irq.c | 8 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/xpc_main.c | 12 |
14 files changed, 162 insertions, 73 deletions
diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c index 1189d035d316..bf6d9d8c802f 100644 --- a/arch/ia64/hp/sim/boot/fw-emu.c +++ b/arch/ia64/hp/sim/boot/fw-emu.c | |||
@@ -285,7 +285,7 @@ sys_fw_init (const char *args, int arglen) | |||
285 | } | 285 | } |
286 | cmd_line[arglen] = '\0'; | 286 | cmd_line[arglen] = '\0'; |
287 | 287 | ||
288 | memset(efi_systab, 0, sizeof(efi_systab)); | 288 | memset(efi_systab, 0, sizeof(*efi_systab)); |
289 | efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE; | 289 | efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE; |
290 | efi_systab->hdr.revision = ((1 << 16) | 00); | 290 | efi_systab->hdr.revision = ((1 << 16) | 00); |
291 | efi_systab->hdr.headersize = sizeof(efi_systab->hdr); | 291 | efi_systab->hdr.headersize = sizeof(efi_systab->hdr); |
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h index 466bbcb138b2..c5c872b250da 100644 --- a/arch/ia64/ia32/ia32priv.h +++ b/arch/ia64/ia32/ia32priv.h | |||
@@ -290,7 +290,6 @@ struct old_linux32_dirent { | |||
290 | #define _ASM_IA64_ELF_H /* Don't include elf.h */ | 290 | #define _ASM_IA64_ELF_H /* Don't include elf.h */ |
291 | 291 | ||
292 | #include <linux/sched.h> | 292 | #include <linux/sched.h> |
293 | #include <asm/processor.h> | ||
294 | 293 | ||
295 | /* | 294 | /* |
296 | * This is used to ensure we don't load something for the wrong architecture. | 295 | * This is used to ensure we don't load something for the wrong architecture. |
diff --git a/arch/ia64/kernel/.gitignore b/arch/ia64/kernel/.gitignore new file mode 100644 index 000000000000..98307759a3b8 --- /dev/null +++ b/arch/ia64/kernel/.gitignore | |||
@@ -0,0 +1 @@ | |||
gate.lds | |||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 3d45d24a9d61..897e2083a3b1 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -678,9 +678,11 @@ int __init acpi_boot_init(void) | |||
678 | /* I/O APIC */ | 678 | /* I/O APIC */ |
679 | 679 | ||
680 | if (acpi_table_parse_madt | 680 | if (acpi_table_parse_madt |
681 | (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) | 681 | (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) { |
682 | printk(KERN_ERR PREFIX | 682 | if (!ia64_platform_is("sn2")) |
683 | "Error parsing MADT - no IOSAPIC entries\n"); | 683 | printk(KERN_ERR PREFIX |
684 | "Error parsing MADT - no IOSAPIC entries\n"); | ||
685 | } | ||
684 | 686 | ||
685 | /* System-Level Interrupt Routing */ | 687 | /* System-Level Interrupt Routing */ |
686 | 688 | ||
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 6216eba2e38f..5181bf551f3c 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -218,9 +218,10 @@ efi_gettimeofday (struct timespec *ts) | |||
218 | { | 218 | { |
219 | efi_time_t tm; | 219 | efi_time_t tm; |
220 | 220 | ||
221 | memset(ts, 0, sizeof(ts)); | 221 | if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) { |
222 | if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) | 222 | memset(ts, 0, sizeof(*ts)); |
223 | return; | 223 | return; |
224 | } | ||
224 | 225 | ||
225 | ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); | 226 | ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); |
226 | ts->tv_nsec = tm.nanosecond; | 227 | ts->tv_nsec = tm.nanosecond; |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index cfe4654838f4..274a59383043 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -748,6 +748,15 @@ skip_numa_setup: | |||
748 | #endif | 748 | #endif |
749 | } | 749 | } |
750 | 750 | ||
751 | static inline unsigned char choose_dmode(void) | ||
752 | { | ||
753 | #ifdef CONFIG_SMP | ||
754 | if (smp_int_redirect & SMP_IRQ_REDIRECTION) | ||
755 | return IOSAPIC_LOWEST_PRIORITY; | ||
756 | #endif | ||
757 | return IOSAPIC_FIXED; | ||
758 | } | ||
759 | |||
751 | /* | 760 | /* |
752 | * ACPI can describe IOSAPIC interrupts via static tables and namespace | 761 | * ACPI can describe IOSAPIC interrupts via static tables and namespace |
753 | * methods. This provides an interface to register those interrupts and | 762 | * methods. This provides an interface to register those interrupts and |
@@ -762,6 +771,7 @@ iosapic_register_intr (unsigned int gsi, | |||
762 | unsigned long flags; | 771 | unsigned long flags; |
763 | struct iosapic_rte_info *rte; | 772 | struct iosapic_rte_info *rte; |
764 | u32 low32; | 773 | u32 low32; |
774 | unsigned char dmode; | ||
765 | 775 | ||
766 | /* | 776 | /* |
767 | * If this GSI has already been registered (i.e., it's a | 777 | * If this GSI has already been registered (i.e., it's a |
@@ -791,8 +801,8 @@ iosapic_register_intr (unsigned int gsi, | |||
791 | 801 | ||
792 | spin_lock(&irq_desc[irq].lock); | 802 | spin_lock(&irq_desc[irq].lock); |
793 | dest = get_target_cpu(gsi, irq); | 803 | dest = get_target_cpu(gsi, irq); |
794 | err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, | 804 | dmode = choose_dmode(); |
795 | polarity, trigger); | 805 | err = register_intr(gsi, irq, dmode, polarity, trigger); |
796 | if (err < 0) { | 806 | if (err < 0) { |
797 | spin_unlock(&irq_desc[irq].lock); | 807 | spin_unlock(&irq_desc[irq].lock); |
798 | irq = err; | 808 | irq = err; |
@@ -961,10 +971,12 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, | |||
961 | { | 971 | { |
962 | int vector, irq; | 972 | int vector, irq; |
963 | unsigned int dest = cpu_physical_id(smp_processor_id()); | 973 | unsigned int dest = cpu_physical_id(smp_processor_id()); |
974 | unsigned char dmode; | ||
964 | 975 | ||
965 | irq = vector = isa_irq_to_vector(isa_irq); | 976 | irq = vector = isa_irq_to_vector(isa_irq); |
966 | BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL)); | 977 | BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL)); |
967 | register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, polarity, trigger); | 978 | dmode = choose_dmode(); |
979 | register_intr(gsi, irq, dmode, polarity, trigger); | ||
968 | 980 | ||
969 | DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n", | 981 | DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n", |
970 | isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level", | 982 | isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level", |
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 44be1c952b7c..6dee579f205f 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -61,9 +61,11 @@ int show_interrupts(struct seq_file *p, void *v) | |||
61 | unsigned long flags; | 61 | unsigned long flags; |
62 | 62 | ||
63 | if (i == 0) { | 63 | if (i == 0) { |
64 | seq_printf(p, " "); | 64 | char cpuname[16]; |
65 | seq_printf(p, " "); | ||
65 | for_each_online_cpu(j) { | 66 | for_each_online_cpu(j) { |
66 | seq_printf(p, "CPU%d ",j); | 67 | snprintf(cpuname, 10, "CPU%d", j); |
68 | seq_printf(p, "%10s ", cpuname); | ||
67 | } | 69 | } |
68 | seq_putc(p, '\n'); | 70 | seq_putc(p, '\n'); |
69 | } | 71 | } |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index cc87025e8f54..10b48cd15a87 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -571,7 +571,7 @@ out: | |||
571 | * Outputs | 571 | * Outputs |
572 | * None | 572 | * None |
573 | */ | 573 | */ |
574 | static void __init | 574 | void |
575 | ia64_mca_register_cpev (int cpev) | 575 | ia64_mca_register_cpev (int cpev) |
576 | { | 576 | { |
577 | /* Register the CPE interrupt vector with SAL */ | 577 | /* Register the CPE interrupt vector with SAL */ |
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 6ef6ffb943a0..396004e8cd14 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
@@ -470,7 +470,7 @@ register_info(char *page) | |||
470 | return p - page; | 470 | return p - page; |
471 | } | 471 | } |
472 | 472 | ||
473 | static const char *proc_features[]={ | 473 | static char *proc_features_0[]={ /* Feature set 0 */ |
474 | NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, | 474 | NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, |
475 | NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL, | 475 | NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL, |
476 | NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, | 476 | NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, |
@@ -502,25 +502,92 @@ static const char *proc_features[]={ | |||
502 | "Enable BERR promotion" | 502 | "Enable BERR promotion" |
503 | }; | 503 | }; |
504 | 504 | ||
505 | static char *proc_features_16[]={ /* Feature set 16 */ | ||
506 | "Disable ETM", | ||
507 | "Enable ETM", | ||
508 | "Enable MCA on half-way timer", | ||
509 | "Enable snoop WC", | ||
510 | NULL, | ||
511 | "Enable Fast Deferral", | ||
512 | "Disable MCA on memory aliasing", | ||
513 | "Enable RSB", | ||
514 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||
515 | "DP system processor", | ||
516 | "Low Voltage", | ||
517 | "HT supported", | ||
518 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||
519 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||
520 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||
521 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||
522 | NULL, NULL, NULL, NULL, NULL | ||
523 | }; | ||
524 | |||
525 | static char **proc_features[]={ | ||
526 | proc_features_0, | ||
527 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||
528 | NULL, NULL, NULL, NULL, | ||
529 | proc_features_16, | ||
530 | NULL, NULL, NULL, NULL, | ||
531 | }; | ||
532 | |||
533 | static char * | ||
534 | feature_set_info(char *page, u64 avail, u64 status, u64 control, u64 set) | ||
535 | { | ||
536 | char *p = page; | ||
537 | char **vf, **v; | ||
538 | int i; | ||
539 | |||
540 | vf = v = proc_features[set]; | ||
541 | for(i=0; i < 64; i++, avail >>=1, status >>=1, control >>=1) { | ||
542 | |||
543 | if (!(control)) /* No remaining bits set */ | ||
544 | break; | ||
545 | if (!(avail & 0x1)) /* Print only bits that are available */ | ||
546 | continue; | ||
547 | if (vf) | ||
548 | v = vf + i; | ||
549 | if ( v && *v ) { | ||
550 | p += sprintf(p, "%-40s : %s %s\n", *v, | ||
551 | avail & 0x1 ? (status & 0x1 ? | ||
552 | "On " : "Off"): "", | ||
553 | avail & 0x1 ? (control & 0x1 ? | ||
554 | "Ctrl" : "NoCtrl"): ""); | ||
555 | } else { | ||
556 | p += sprintf(p, "Feature set %2ld bit %2d\t\t\t" | ||
557 | " : %s %s\n", | ||
558 | set, i, | ||
559 | avail & 0x1 ? (status & 0x1 ? | ||
560 | "On " : "Off"): "", | ||
561 | avail & 0x1 ? (control & 0x1 ? | ||
562 | "Ctrl" : "NoCtrl"): ""); | ||
563 | } | ||
564 | } | ||
565 | return p; | ||
566 | } | ||
505 | 567 | ||
506 | static int | 568 | static int |
507 | processor_info(char *page) | 569 | processor_info(char *page) |
508 | { | 570 | { |
509 | char *p = page; | 571 | char *p = page; |
510 | const char **v = proc_features; | 572 | u64 avail=1, status=1, control=1, feature_set=0; |
511 | u64 avail=1, status=1, control=1; | ||
512 | int i; | ||
513 | s64 ret; | 573 | s64 ret; |
514 | 574 | ||
515 | if ((ret=ia64_pal_proc_get_features(&avail, &status, &control)) != 0) return 0; | 575 | do { |
576 | ret = ia64_pal_proc_get_features(&avail, &status, &control, | ||
577 | feature_set); | ||
578 | if (ret < 0) { | ||
579 | return p - page; | ||
580 | } | ||
581 | if (ret == 1) { | ||
582 | feature_set++; | ||
583 | continue; | ||
584 | } | ||
585 | |||
586 | p = feature_set_info(p, avail, status, control, feature_set); | ||
587 | |||
588 | feature_set++; | ||
589 | } while(1); | ||
516 | 590 | ||
517 | for(i=0; i < 64; i++, v++,avail >>=1, status >>=1, control >>=1) { | ||
518 | if ( ! *v ) continue; | ||
519 | p += sprintf(p, "%-40s : %s%s %s\n", *v, | ||
520 | avail & 0x1 ? "" : "NotImpl", | ||
521 | avail & 0x1 ? (status & 0x1 ? "On" : "Off"): "", | ||
522 | avail & 0x1 ? (control & 0x1 ? "Ctrl" : "NoCtrl"): ""); | ||
523 | } | ||
524 | return p - page; | 591 | return p - page; |
525 | } | 592 | } |
526 | 593 | ||
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index e796e29f8e15..2cb9425e0421 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c | |||
@@ -129,9 +129,6 @@ ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) | |||
129 | first_time = 0; | 129 | first_time = 0; |
130 | if (need_workaround) | 130 | if (need_workaround) |
131 | printk(KERN_INFO "Leaving McKinley Errata 9 workaround enabled\n"); | 131 | printk(KERN_INFO "Leaving McKinley Errata 9 workaround enabled\n"); |
132 | else | ||
133 | printk(KERN_INFO "McKinley Errata 9 workaround not needed; " | ||
134 | "disabling it\n"); | ||
135 | } | 132 | } |
136 | if (need_workaround) | 133 | if (need_workaround) |
137 | return; | 134 | return; |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 59169bf7145f..73e7c2e40b54 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -558,7 +558,7 @@ static ctl_table pfm_sysctl_dir[] = { | |||
558 | { | 558 | { |
559 | .ctl_name = CTL_UNNUMBERED, | 559 | .ctl_name = CTL_UNNUMBERED, |
560 | .procname = "perfmon", | 560 | .procname = "perfmon", |
561 | .mode = 0755, | 561 | .mode = 0555, |
562 | .child = pfm_ctl_table, | 562 | .child = pfm_ctl_table, |
563 | }, | 563 | }, |
564 | {} | 564 | {} |
@@ -567,7 +567,7 @@ static ctl_table pfm_sysctl_root[] = { | |||
567 | { | 567 | { |
568 | .ctl_name = CTL_KERN, | 568 | .ctl_name = CTL_KERN, |
569 | .procname = "kernel", | 569 | .procname = "kernel", |
570 | .mode = 0755, | 570 | .mode = 0555, |
571 | .child = pfm_sysctl_dir, | 571 | .child = pfm_sysctl_dir, |
572 | }, | 572 | }, |
573 | {} | 573 | {} |
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index d3c538be466c..7e9c275ea148 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c | |||
@@ -146,6 +146,46 @@ find_bootmap_location (unsigned long start, unsigned long end, void *arg) | |||
146 | return 0; | 146 | return 0; |
147 | } | 147 | } |
148 | 148 | ||
149 | #ifdef CONFIG_SMP | ||
150 | static void *cpu_data; | ||
151 | /** | ||
152 | * per_cpu_init - setup per-cpu variables | ||
153 | * | ||
154 | * Allocate and setup per-cpu data areas. | ||
155 | */ | ||
156 | void * __cpuinit | ||
157 | per_cpu_init (void) | ||
158 | { | ||
159 | int cpu; | ||
160 | static int first_time=1; | ||
161 | |||
162 | /* | ||
163 | * get_free_pages() cannot be used before cpu_init() done. BSP | ||
164 | * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls | ||
165 | * get_zeroed_page(). | ||
166 | */ | ||
167 | if (first_time) { | ||
168 | first_time=0; | ||
169 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | ||
170 | memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); | ||
171 | __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; | ||
172 | cpu_data += PERCPU_PAGE_SIZE; | ||
173 | per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu]; | ||
174 | } | ||
175 | } | ||
176 | return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; | ||
177 | } | ||
178 | |||
179 | static inline void | ||
180 | alloc_per_cpu_data(void) | ||
181 | { | ||
182 | cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, | ||
183 | PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); | ||
184 | } | ||
185 | #else | ||
186 | #define alloc_per_cpu_data() do { } while (0) | ||
187 | #endif /* CONFIG_SMP */ | ||
188 | |||
149 | /** | 189 | /** |
150 | * find_memory - setup memory map | 190 | * find_memory - setup memory map |
151 | * | 191 | * |
@@ -182,41 +222,9 @@ find_memory (void) | |||
182 | 222 | ||
183 | find_initrd(); | 223 | find_initrd(); |
184 | 224 | ||
225 | alloc_per_cpu_data(); | ||
185 | } | 226 | } |
186 | 227 | ||
187 | #ifdef CONFIG_SMP | ||
188 | /** | ||
189 | * per_cpu_init - setup per-cpu variables | ||
190 | * | ||
191 | * Allocate and setup per-cpu data areas. | ||
192 | */ | ||
193 | void * __cpuinit | ||
194 | per_cpu_init (void) | ||
195 | { | ||
196 | void *cpu_data; | ||
197 | int cpu; | ||
198 | static int first_time=1; | ||
199 | |||
200 | /* | ||
201 | * get_free_pages() cannot be used before cpu_init() done. BSP | ||
202 | * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls | ||
203 | * get_zeroed_page(). | ||
204 | */ | ||
205 | if (first_time) { | ||
206 | first_time=0; | ||
207 | cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, | ||
208 | PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); | ||
209 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | ||
210 | memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); | ||
211 | __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; | ||
212 | cpu_data += PERCPU_PAGE_SIZE; | ||
213 | per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu]; | ||
214 | } | ||
215 | } | ||
216 | return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; | ||
217 | } | ||
218 | #endif /* CONFIG_SMP */ | ||
219 | |||
220 | static int | 228 | static int |
221 | count_pages (u64 start, u64 end, void *arg) | 229 | count_pages (u64 start, u64 end, void *arg) |
222 | { | 230 | { |
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 0f9b12683bf3..53351c3cd7b1 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. | 8 | * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
@@ -85,12 +85,18 @@ static void sn_shutdown_irq(unsigned int irq) | |||
85 | { | 85 | { |
86 | } | 86 | } |
87 | 87 | ||
88 | extern void ia64_mca_register_cpev(int); | ||
89 | |||
88 | static void sn_disable_irq(unsigned int irq) | 90 | static void sn_disable_irq(unsigned int irq) |
89 | { | 91 | { |
92 | if (irq == local_vector_to_irq(IA64_CPE_VECTOR)) | ||
93 | ia64_mca_register_cpev(0); | ||
90 | } | 94 | } |
91 | 95 | ||
92 | static void sn_enable_irq(unsigned int irq) | 96 | static void sn_enable_irq(unsigned int irq) |
93 | { | 97 | { |
98 | if (irq == local_vector_to_irq(IA64_CPE_VECTOR)) | ||
99 | ia64_mca_register_cpev(irq); | ||
94 | } | 100 | } |
95 | 101 | ||
96 | static void sn_ack_irq(unsigned int irq) | 102 | static void sn_ack_irq(unsigned int irq) |
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index e336e1692a73..81785b78bc1e 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
@@ -257,7 +257,9 @@ xpc_hb_checker(void *ignore) | |||
257 | 257 | ||
258 | set_cpus_allowed(current, cpumask_of_cpu(XPC_HB_CHECK_CPU)); | 258 | set_cpus_allowed(current, cpumask_of_cpu(XPC_HB_CHECK_CPU)); |
259 | 259 | ||
260 | /* set our heartbeating to other partitions into motion */ | ||
260 | xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ); | 261 | xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ); |
262 | xpc_hb_beater(0); | ||
261 | 263 | ||
262 | while (!(volatile int) xpc_exiting) { | 264 | while (!(volatile int) xpc_exiting) { |
263 | 265 | ||
@@ -1338,16 +1340,8 @@ xpc_init(void) | |||
1338 | dev_warn(xpc_part, "can't register die notifier\n"); | 1340 | dev_warn(xpc_part, "can't register die notifier\n"); |
1339 | } | 1341 | } |
1340 | 1342 | ||
1341 | |||
1342 | /* | ||
1343 | * Set the beating to other partitions into motion. This is | ||
1344 | * the last requirement for other partitions' discovery to | ||
1345 | * initiate communications with us. | ||
1346 | */ | ||
1347 | init_timer(&xpc_hb_timer); | 1343 | init_timer(&xpc_hb_timer); |
1348 | xpc_hb_timer.function = xpc_hb_beater; | 1344 | xpc_hb_timer.function = xpc_hb_beater; |
1349 | xpc_hb_beater(0); | ||
1350 | |||
1351 | 1345 | ||
1352 | /* | 1346 | /* |
1353 | * The real work-horse behind xpc. This processes incoming | 1347 | * The real work-horse behind xpc. This processes incoming |