aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/asm-offsets.c1
-rw-r--r--arch/ia64/kernel/crash.c12
-rw-r--r--arch/ia64/kernel/efi.c12
-rw-r--r--arch/ia64/kernel/fsys.S105
-rw-r--r--arch/ia64/kernel/iosapic.c8
-rw-r--r--arch/ia64/kernel/mca.c8
-rw-r--r--arch/ia64/kernel/mca_drv.c65
-rw-r--r--arch/ia64/kernel/msi_ia64.c6
-rw-r--r--arch/ia64/kernel/ptrace.c1
-rw-r--r--arch/ia64/kernel/setup.c26
-rw-r--r--arch/ia64/kernel/smpboot.c17
11 files changed, 206 insertions, 55 deletions
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c
index 75a2a2c12258..2236fabbb3c6 100644
--- a/arch/ia64/kernel/asm-offsets.c
+++ b/arch/ia64/kernel/asm-offsets.c
@@ -35,6 +35,7 @@ void foo(void)
35 BLANK(); 35 BLANK();
36 36
37 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); 37 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
38 DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
38 DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); 39 DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
39 40
40 BLANK(); 41 BLANK();
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 5cdd2f5fa064..80a94e707827 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -21,9 +21,9 @@
21#include <asm/mca.h> 21#include <asm/mca.h>
22 22
23int kdump_status[NR_CPUS]; 23int kdump_status[NR_CPUS];
24atomic_t kdump_cpu_freezed; 24static atomic_t kdump_cpu_frozen;
25atomic_t kdump_in_progress; 25atomic_t kdump_in_progress;
26int kdump_on_init = 1; 26static int kdump_on_init = 1;
27 27
28static inline Elf64_Word 28static inline Elf64_Word
29*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data, 29*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data,
@@ -86,7 +86,7 @@ kdump_wait_cpu_freeze(void)
86 int cpu_num = num_online_cpus() - 1; 86 int cpu_num = num_online_cpus() - 1;
87 int timeout = 1000; 87 int timeout = 1000;
88 while(timeout-- > 0) { 88 while(timeout-- > 0) {
89 if (atomic_read(&kdump_cpu_freezed) == cpu_num) 89 if (atomic_read(&kdump_cpu_frozen) == cpu_num)
90 return 0; 90 return 0;
91 udelay(1000); 91 udelay(1000);
92 } 92 }
@@ -108,8 +108,8 @@ machine_crash_shutdown(struct pt_regs *pt)
108 kexec_disable_iosapic(); 108 kexec_disable_iosapic();
109#ifdef CONFIG_SMP 109#ifdef CONFIG_SMP
110 kdump_smp_send_stop(); 110 kdump_smp_send_stop();
111 /* not all cpu response to IPI, send INIT to freeze them */
111 if (kdump_wait_cpu_freeze() && kdump_on_init) { 112 if (kdump_wait_cpu_freeze() && kdump_on_init) {
112 //not all cpu response to IPI, send INIT to freeze them
113 kdump_smp_send_init(); 113 kdump_smp_send_init();
114 } 114 }
115#endif 115#endif
@@ -136,7 +136,7 @@ kdump_cpu_freeze(struct unw_frame_info *info, void *arg)
136 cpuid = smp_processor_id(); 136 cpuid = smp_processor_id();
137 crash_save_this_cpu(); 137 crash_save_this_cpu();
138 current->thread.ksp = (__u64)info->sw - 16; 138 current->thread.ksp = (__u64)info->sw - 16;
139 atomic_inc(&kdump_cpu_freezed); 139 atomic_inc(&kdump_cpu_frozen);
140 kdump_status[cpuid] = 1; 140 kdump_status[cpuid] = 1;
141 mb(); 141 mb();
142#ifdef CONFIG_HOTPLUG_CPU 142#ifdef CONFIG_HOTPLUG_CPU
@@ -164,7 +164,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
164 164
165 nd = (struct ia64_mca_notify_die *)args->err; 165 nd = (struct ia64_mca_notify_die *)args->err;
166 /* Reason code 1 means machine check rendezous*/ 166 /* Reason code 1 means machine check rendezous*/
167 if ((val == DIE_INIT_MONARCH_ENTER || DIE_INIT_SLAVE_ENTER) && 167 if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) &&
168 nd->sos->rv_rc == 1) 168 nd->sos->rv_rc == 1)
169 return NOTIFY_DONE; 169 return NOTIFY_DONE;
170 170
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 4061593e5b17..f45f91d38cab 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -971,6 +971,11 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
971 if (!is_memory_available(md)) 971 if (!is_memory_available(md))
972 continue; 972 continue;
973 973
974#ifdef CONFIG_CRASH_DUMP
975 /* saved_max_pfn should ignore max_addr= command line arg */
976 if (saved_max_pfn < (efi_md_end(md) >> PAGE_SHIFT))
977 saved_max_pfn = (efi_md_end(md) >> PAGE_SHIFT);
978#endif
974 /* 979 /*
975 * Round ends inward to granule boundaries 980 * Round ends inward to granule boundaries
976 * Give trimmings to uncached allocator 981 * Give trimmings to uncached allocator
@@ -1010,11 +1015,6 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
1010 } else 1015 } else
1011 ae = efi_md_end(md); 1016 ae = efi_md_end(md);
1012 1017
1013#ifdef CONFIG_CRASH_DUMP
1014 /* saved_max_pfn should ignore max_addr= command line arg */
1015 if (saved_max_pfn < (ae >> PAGE_SHIFT))
1016 saved_max_pfn = (ae >> PAGE_SHIFT);
1017#endif
1018 /* keep within max_addr= and min_addr= command line arg */ 1018 /* keep within max_addr= and min_addr= command line arg */
1019 as = max(as, min_addr); 1019 as = max(as, min_addr);
1020 ae = min(ae, max_addr); 1020 ae = min(ae, max_addr);
@@ -1142,7 +1142,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
1142/* find a block of memory aligned to 64M exclude reserved regions 1142/* find a block of memory aligned to 64M exclude reserved regions
1143 rsvd_regions are sorted 1143 rsvd_regions are sorted
1144 */ 1144 */
1145unsigned long 1145unsigned long __init
1146kdump_find_rsvd_region (unsigned long size, 1146kdump_find_rsvd_region (unsigned long size,
1147 struct rsvd_region *r, int n) 1147 struct rsvd_region *r, int n)
1148{ 1148{
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index 7a05b1cb2ad5..8589e84a27c6 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -10,6 +10,8 @@
10 * probably broke it along the way... ;-) 10 * probably broke it along the way... ;-)
11 * 13-Jul-04 clameter Implement fsys_clock_gettime and revise fsys_gettimeofday to make 11 * 13-Jul-04 clameter Implement fsys_clock_gettime and revise fsys_gettimeofday to make
12 * it capable of using memory based clocks without falling back to C code. 12 * it capable of using memory based clocks without falling back to C code.
13 * 08-Feb-07 Fenghua Yu Implement fsys_getcpu.
14 *
13 */ 15 */
14 16
15#include <asm/asmmacro.h> 17#include <asm/asmmacro.h>
@@ -505,6 +507,59 @@ EX(.fail_efault, (p15) st8 [r34]=r3)
505#endif 507#endif
506END(fsys_rt_sigprocmask) 508END(fsys_rt_sigprocmask)
507 509
510/*
511 * fsys_getcpu doesn't use the third parameter in this implementation. It reads
512 * current_thread_info()->cpu and corresponding node in cpu_to_node_map.
513 */
514ENTRY(fsys_getcpu)
515 .prologue
516 .altrp b6
517 .body
518 ;;
519 add r2=TI_FLAGS+IA64_TASK_SIZE,r16
520 tnat.nz p6,p0 = r32 // guard against NaT argument
521 add r3=TI_CPU+IA64_TASK_SIZE,r16
522 ;;
523 ld4 r3=[r3] // M r3 = thread_info->cpu
524 ld4 r2=[r2] // M r2 = thread_info->flags
525(p6) br.cond.spnt.few .fail_einval // B
526 ;;
527 tnat.nz p7,p0 = r33 // I guard against NaT argument
528(p7) br.cond.spnt.few .fail_einval // B
529#ifdef CONFIG_NUMA
530 movl r17=cpu_to_node_map
531 ;;
532EX(.fail_efault, probe.w.fault r32, 3) // M This takes 5 cycles
533EX(.fail_efault, probe.w.fault r33, 3) // M This takes 5 cycles
534 shladd r18=r3,1,r17
535 ;;
536 ld2 r20=[r18] // r20 = cpu_to_node_map[cpu]
537 and r2 = TIF_ALLWORK_MASK,r2
538 ;;
539 cmp.ne p8,p0=0,r2
540(p8) br.spnt.many fsys_fallback_syscall
541 ;;
542 ;;
543EX(.fail_efault, st4 [r32] = r3)
544EX(.fail_efault, st2 [r33] = r20)
545 mov r8=0
546 ;;
547#else
548EX(.fail_efault, probe.w.fault r32, 3) // M This takes 5 cycles
549EX(.fail_efault, probe.w.fault r33, 3) // M This takes 5 cycles
550 and r2 = TIF_ALLWORK_MASK,r2
551 ;;
552 cmp.ne p8,p0=0,r2
553(p8) br.spnt.many fsys_fallback_syscall
554 ;;
555EX(.fail_efault, st4 [r32] = r3)
556EX(.fail_efault, st2 [r33] = r0)
557 mov r8=0
558 ;;
559#endif
560 FSYS_RETURN
561END(fsys_getcpu)
562
508ENTRY(fsys_fallback_syscall) 563ENTRY(fsys_fallback_syscall)
509 .prologue 564 .prologue
510 .altrp b6 565 .altrp b6
@@ -878,6 +933,56 @@ fsyscall_table:
878 data8 0 // timer_delete 933 data8 0 // timer_delete
879 data8 0 // clock_settime 934 data8 0 // clock_settime
880 data8 fsys_clock_gettime // clock_gettime 935 data8 fsys_clock_gettime // clock_gettime
936 data8 0 // clock_getres // 1255
937 data8 0 // clock_nanosleep
938 data8 0 // fstatfs64
939 data8 0 // statfs64
940 data8 0 // mbind
941 data8 0 // get_mempolicy // 1260
942 data8 0 // set_mempolicy
943 data8 0 // mq_open
944 data8 0 // mq_unlink
945 data8 0 // mq_timedsend
946 data8 0 // mq_timedreceive // 1265
947 data8 0 // mq_notify
948 data8 0 // mq_getsetattr
949 data8 0 // kexec_load
950 data8 0 // vserver
951 data8 0 // waitid // 1270
952 data8 0 // add_key
953 data8 0 // request_key
954 data8 0 // keyctl
955 data8 0 // ioprio_set
956 data8 0 // ioprio_get // 1275
957 data8 0 // move_pages
958 data8 0 // inotify_init
959 data8 0 // inotify_add_watch
960 data8 0 // inotify_rm_watch
961 data8 0 // migrate_pages // 1280
962 data8 0 // openat
963 data8 0 // mkdirat
964 data8 0 // mknodat
965 data8 0 // fchownat
966 data8 0 // futimesat // 1285
967 data8 0 // newfstatat
968 data8 0 // unlinkat
969 data8 0 // renameat
970 data8 0 // linkat
971 data8 0 // symlinkat // 1290
972 data8 0 // readlinkat
973 data8 0 // fchmodat
974 data8 0 // faccessat
975 data8 0
976 data8 0 // 1295
977 data8 0 // unshare
978 data8 0 // splice
979 data8 0 // set_robust_list
980 data8 0 // get_robust_list
981 data8 0 // sync_file_range // 1300
982 data8 0 // tee
983 data8 0 // vmsplice
984 data8 0
985 data8 fsys_getcpu // getcpu // 1304
881 986
882 // fill in zeros for the remaining entries 987 // fill in zeros for the remaining entries
883 .zero: 988 .zero:
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index d6aab40c6416..dcfbf3e7a9ef 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -446,7 +446,7 @@ iosapic_end_level_irq (unsigned int irq)
446#define iosapic_disable_level_irq mask_irq 446#define iosapic_disable_level_irq mask_irq
447#define iosapic_ack_level_irq nop 447#define iosapic_ack_level_irq nop
448 448
449struct hw_interrupt_type irq_type_iosapic_level = { 449struct irq_chip irq_type_iosapic_level = {
450 .name = "IO-SAPIC-level", 450 .name = "IO-SAPIC-level",
451 .startup = iosapic_startup_level_irq, 451 .startup = iosapic_startup_level_irq,
452 .shutdown = iosapic_shutdown_level_irq, 452 .shutdown = iosapic_shutdown_level_irq,
@@ -454,6 +454,8 @@ struct hw_interrupt_type irq_type_iosapic_level = {
454 .disable = iosapic_disable_level_irq, 454 .disable = iosapic_disable_level_irq,
455 .ack = iosapic_ack_level_irq, 455 .ack = iosapic_ack_level_irq,
456 .end = iosapic_end_level_irq, 456 .end = iosapic_end_level_irq,
457 .mask = mask_irq,
458 .unmask = unmask_irq,
457 .set_affinity = iosapic_set_affinity 459 .set_affinity = iosapic_set_affinity
458}; 460};
459 461
@@ -493,7 +495,7 @@ iosapic_ack_edge_irq (unsigned int irq)
493#define iosapic_disable_edge_irq nop 495#define iosapic_disable_edge_irq nop
494#define iosapic_end_edge_irq nop 496#define iosapic_end_edge_irq nop
495 497
496struct hw_interrupt_type irq_type_iosapic_edge = { 498struct irq_chip irq_type_iosapic_edge = {
497 .name = "IO-SAPIC-edge", 499 .name = "IO-SAPIC-edge",
498 .startup = iosapic_startup_edge_irq, 500 .startup = iosapic_startup_edge_irq,
499 .shutdown = iosapic_disable_edge_irq, 501 .shutdown = iosapic_disable_edge_irq,
@@ -501,6 +503,8 @@ struct hw_interrupt_type irq_type_iosapic_edge = {
501 .disable = iosapic_disable_edge_irq, 503 .disable = iosapic_disable_edge_irq,
502 .ack = iosapic_ack_edge_irq, 504 .ack = iosapic_ack_edge_irq,
503 .end = iosapic_end_edge_irq, 505 .end = iosapic_end_edge_irq,
506 .mask = mask_irq,
507 .unmask = unmask_irq,
504 .set_affinity = iosapic_set_affinity 508 .set_affinity = iosapic_set_affinity
505}; 509};
506 510
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index a76add3e76a2..491687f84fb5 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1192,8 +1192,6 @@ void
1192ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw, 1192ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1193 struct ia64_sal_os_state *sos) 1193 struct ia64_sal_os_state *sos)
1194{ 1194{
1195 pal_processor_state_info_t *psp = (pal_processor_state_info_t *)
1196 &sos->proc_state_param;
1197 int recover, cpu = smp_processor_id(); 1195 int recover, cpu = smp_processor_id();
1198 struct task_struct *previous_current; 1196 struct task_struct *previous_current;
1199 struct ia64_mca_notify_die nd = 1197 struct ia64_mca_notify_die nd =
@@ -1223,10 +1221,8 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1223 /* Get the MCA error record and log it */ 1221 /* Get the MCA error record and log it */
1224 ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA); 1222 ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA);
1225 1223
1226 /* TLB error is only exist in this SAL error record */ 1224 /* MCA error recovery */
1227 recover = (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc)) 1225 recover = (ia64_mca_ucmc_extension
1228 /* other error recovery */
1229 || (ia64_mca_ucmc_extension
1230 && ia64_mca_ucmc_extension( 1226 && ia64_mca_ucmc_extension(
1231 IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_MCA), 1227 IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_MCA),
1232 sos)); 1228 sos));
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c
index afc1403799c9..832cf1e647e8 100644
--- a/arch/ia64/kernel/mca_drv.c
+++ b/arch/ia64/kernel/mca_drv.c
@@ -602,11 +602,40 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx,
602 default: 602 default:
603 break; 603 break;
604 } 604 }
605 } else if (psp->cc && !psp->bc) { /* Cache error */
606 status = recover_from_read_error(slidx, peidx, pbci, sos);
605 } 607 }
606 608
607 return status; 609 return status;
608} 610}
609 611
612/*
613 * recover_from_tlb_check
614 * @peidx: pointer of index of processor error section
615 *
616 * Return value:
617 * 1 on Success / 0 on Failure
618 */
619static int
620recover_from_tlb_check(peidx_table_t *peidx)
621{
622 sal_log_mod_error_info_t *smei;
623 pal_tlb_check_info_t *ptci;
624
625 smei = (sal_log_mod_error_info_t *)peidx_tlb_check(peidx, 0);
626 ptci = (pal_tlb_check_info_t *)&(smei->check_info);
627
628 /*
629 * Look for signature of a duplicate TLB DTC entry, which is
630 * a SW bug and always fatal.
631 */
632 if (ptci->op == PAL_TLB_CHECK_OP_PURGE
633 && !(ptci->itr || ptci->dtc || ptci->itc))
634 return fatal_mca("Duplicate TLB entry");
635
636 return mca_recovered("TLB check recovered");
637}
638
610/** 639/**
611 * recover_from_processor_error 640 * recover_from_processor_error
612 * @platform: whether there are some platform error section or not 641 * @platform: whether there are some platform error section or not
@@ -618,13 +647,6 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx,
618 * Return value: 647 * Return value:
619 * 1 on Success / 0 on Failure 648 * 1 on Success / 0 on Failure
620 */ 649 */
621/*
622 * Later we try to recover when below all conditions are satisfied.
623 * 1. Only one processor error section is exist.
624 * 2. BUS_CHECK is exist and the others are not exist.(Except TLB_CHECK)
625 * 3. The entry of BUS_CHECK_INFO is 1.
626 * 4. "External bus error" flag is set and the others are not set.
627 */
628 650
629static int 651static int
630recover_from_processor_error(int platform, slidx_table_t *slidx, 652recover_from_processor_error(int platform, slidx_table_t *slidx,
@@ -652,38 +674,39 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
652 return fatal_mca("error not contained"); 674 return fatal_mca("error not contained");
653 675
654 /* 676 /*
677 * Look for recoverable TLB check
678 */
679 if (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc))
680 return recover_from_tlb_check(peidx);
681
682 /*
655 * The cache check and bus check bits have four possible states 683 * The cache check and bus check bits have four possible states
656 * cc bc 684 * cc bc
657 * 0 0 Weird record, not recovered
658 * 1 0 Cache error, not recovered
659 * 0 1 I/O error, attempt recovery
660 * 1 1 Memory error, attempt recovery 685 * 1 1 Memory error, attempt recovery
686 * 1 0 Cache error, attempt recovery
687 * 0 1 I/O error, attempt recovery
688 * 0 0 Other error type, not recovered
661 */ 689 */
662 if (psp->bc == 0 || pbci == NULL) 690 if (psp->cc == 0 && (psp->bc == 0 || pbci == NULL))
663 return fatal_mca("No bus check"); 691 return fatal_mca("No cache or bus check");
664 692
665 /* 693 /*
666 * Sorry, we cannot handle so many. 694 * Cannot handle more than one bus check.
667 */ 695 */
668 if (peidx_bus_check_num(peidx) > 1) 696 if (peidx_bus_check_num(peidx) > 1)
669 return fatal_mca("Too many bus checks"); 697 return fatal_mca("Too many bus checks");
670 /* 698
671 * Well, here is only one bus error.
672 */
673 if (pbci->ib) 699 if (pbci->ib)
674 return fatal_mca("Internal Bus error"); 700 return fatal_mca("Internal Bus error");
675 if (pbci->cc)
676 return fatal_mca("Cache-cache error");
677 if (pbci->eb && pbci->bsi > 0) 701 if (pbci->eb && pbci->bsi > 0)
678 return fatal_mca("External bus check fatal status"); 702 return fatal_mca("External bus check fatal status");
679 703
680 /* 704 /*
681 * This is a local MCA and estimated as recoverble external bus error. 705 * This is a local MCA and estimated as a recoverble error.
682 * (e.g. a load from poisoned memory)
683 * This means "there are some platform errors".
684 */ 706 */
685 if (platform) 707 if (platform)
686 return recover_from_platform_error(slidx, peidx, pbci, sos); 708 return recover_from_platform_error(slidx, peidx, pbci, sos);
709
687 /* 710 /*
688 * On account of strange SAL error record, we cannot recover. 711 * On account of strange SAL error record, we cannot recover.
689 */ 712 */
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index e7220900ea14..c81080df70df 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -68,7 +68,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
68{ 68{
69 struct msi_msg msg; 69 struct msi_msg msg;
70 unsigned long dest_phys_id; 70 unsigned long dest_phys_id;
71 unsigned int irq, vector; 71 int irq, vector;
72 72
73 irq = create_irq(); 73 irq = create_irq();
74 if (irq < 0) 74 if (irq < 0)
@@ -76,7 +76,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
76 76
77 set_irq_msi(irq, desc); 77 set_irq_msi(irq, desc);
78 dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map)); 78 dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map));
79 vector = irq; 79 vector = irq_to_vector(irq);
80 80
81 msg.address_hi = 0; 81 msg.address_hi = 0;
82 msg.address_lo = 82 msg.address_lo =
@@ -110,7 +110,7 @@ static void ia64_ack_msi_irq(unsigned int irq)
110 110
111static int ia64_msi_retrigger_irq(unsigned int irq) 111static int ia64_msi_retrigger_irq(unsigned int irq)
112{ 112{
113 unsigned int vector = irq; 113 unsigned int vector = irq_to_vector(irq);
114 ia64_resend_irq(vector); 114 ia64_resend_irq(vector);
115 115
116 return 1; 116 return 1;
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 3f8918782e0c..00f803246948 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -1573,6 +1573,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
1573 1573
1574 case PTRACE_DETACH: 1574 case PTRACE_DETACH:
1575 /* detach a process that was attached. */ 1575 /* detach a process that was attached. */
1576 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
1576 ret = ptrace_detach(child, data); 1577 ret = ptrace_detach(child, data);
1577 goto out_tsk; 1578 goto out_tsk;
1578 1579
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 7d6fe65c93f4..dc7dd7648ec5 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -91,8 +91,6 @@ static struct resource code_resource = {
91 .name = "Kernel code", 91 .name = "Kernel code",
92 .flags = IORESOURCE_BUSY | IORESOURCE_MEM 92 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
93}; 93};
94extern void efi_initialize_iomem_resources(struct resource *,
95 struct resource *);
96extern char _text[], _end[], _etext[]; 94extern char _text[], _end[], _etext[];
97 95
98unsigned long ia64_max_cacheline_size; 96unsigned long ia64_max_cacheline_size;
@@ -642,7 +640,7 @@ show_cpuinfo (struct seq_file *m, void *v)
642 "features : %s\n" 640 "features : %s\n"
643 "cpu number : %lu\n" 641 "cpu number : %lu\n"
644 "cpu regs : %u\n" 642 "cpu regs : %u\n"
645 "cpu MHz : %lu.%06lu\n" 643 "cpu MHz : %lu.%03lu\n"
646 "itc MHz : %lu.%06lu\n" 644 "itc MHz : %lu.%06lu\n"
647 "BogoMIPS : %lu.%02lu\n", 645 "BogoMIPS : %lu.%02lu\n",
648 cpunum, c->vendor, c->family, c->model, 646 cpunum, c->vendor, c->family, c->model,
@@ -694,12 +692,15 @@ struct seq_operations cpuinfo_op = {
694 .show = show_cpuinfo 692 .show = show_cpuinfo
695}; 693};
696 694
697static char brandname[128]; 695#define MAX_BRANDS 8
696static char brandname[MAX_BRANDS][128];
698 697
699static char * __cpuinit 698static char * __cpuinit
700get_model_name(__u8 family, __u8 model) 699get_model_name(__u8 family, __u8 model)
701{ 700{
701 static int overflow;
702 char brand[128]; 702 char brand[128];
703 int i;
703 704
704 memcpy(brand, "Unknown", 8); 705 memcpy(brand, "Unknown", 8);
705 if (ia64_pal_get_brand_info(brand)) { 706 if (ia64_pal_get_brand_info(brand)) {
@@ -711,12 +712,17 @@ get_model_name(__u8 family, __u8 model)
711 case 2: memcpy(brand, "Madison up to 9M cache", 23); break; 712 case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
712 } 713 }
713 } 714 }
714 if (brandname[0] == '\0') 715 for (i = 0; i < MAX_BRANDS; i++)
715 return strcpy(brandname, brand); 716 if (strcmp(brandname[i], brand) == 0)
716 else if (strcmp(brandname, brand) == 0) 717 return brandname[i];
717 return brandname; 718 for (i = 0; i < MAX_BRANDS; i++)
718 else 719 if (brandname[i][0] == '\0')
719 return kstrdup(brand, GFP_KERNEL); 720 return strcpy(brandname[i], brand);
721 if (overflow++ == 0)
722 printk(KERN_ERR
723 "%s: Table overflow. Some processor model information will be missing\n",
724 __FUNCTION__);
725 return "Unknown";
720} 726}
721 727
722static void __cpuinit 728static void __cpuinit
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index b21ddecea943..ff7df439da6d 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -375,6 +375,7 @@ static void __devinit
375smp_callin (void) 375smp_callin (void)
376{ 376{
377 int cpuid, phys_id, itc_master; 377 int cpuid, phys_id, itc_master;
378 struct cpuinfo_ia64 *last_cpuinfo, *this_cpuinfo;
378 extern void ia64_init_itm(void); 379 extern void ia64_init_itm(void);
379 extern volatile int time_keeper_id; 380 extern volatile int time_keeper_id;
380 381
@@ -424,7 +425,21 @@ smp_callin (void)
424 * Get our bogomips. 425 * Get our bogomips.
425 */ 426 */
426 ia64_init_itm(); 427 ia64_init_itm();
427 calibrate_delay(); 428
429 /*
430 * Delay calibration can be skipped if new processor is identical to the
431 * previous processor.
432 */
433 last_cpuinfo = cpu_data(cpuid - 1);
434 this_cpuinfo = local_cpu_data;
435 if (last_cpuinfo->itc_freq != this_cpuinfo->itc_freq ||
436 last_cpuinfo->proc_freq != this_cpuinfo->proc_freq ||
437 last_cpuinfo->features != this_cpuinfo->features ||
438 last_cpuinfo->revision != this_cpuinfo->revision ||
439 last_cpuinfo->family != this_cpuinfo->family ||
440 last_cpuinfo->archrev != this_cpuinfo->archrev ||
441 last_cpuinfo->model != this_cpuinfo->model)
442 calibrate_delay();
428 local_cpu_data->loops_per_jiffy = loops_per_jiffy; 443 local_cpu_data->loops_per_jiffy = loops_per_jiffy;
429 444
430#ifdef CONFIG_IA32_SUPPORT 445#ifdef CONFIG_IA32_SUPPORT