diff options
-rw-r--r-- | arch/ia64/include/asm/mca.h | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/crash.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/mca_asm.S | 27 |
4 files changed, 33 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h index 44a0b53df900..cb0952f51836 100644 --- a/arch/ia64/include/asm/mca.h +++ b/arch/ia64/include/asm/mca.h | |||
@@ -151,6 +151,7 @@ extern void ia64_mca_cmc_vector_setup(void); | |||
151 | extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)); | 151 | extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)); |
152 | extern void ia64_unreg_MCA_extension(void); | 152 | extern void ia64_unreg_MCA_extension(void); |
153 | extern unsigned long ia64_get_rnat(unsigned long *); | 153 | extern unsigned long ia64_get_rnat(unsigned long *); |
154 | extern void ia64_set_psr_mc(void); | ||
154 | extern void ia64_mca_printk(const char * fmt, ...) | 155 | extern void ia64_mca_printk(const char * fmt, ...) |
155 | __attribute__ ((format (printf, 1, 2))); | 156 | __attribute__ ((format (printf, 1, 2))); |
156 | 157 | ||
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index f065093f8e9b..3f3a5797d198 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c | |||
@@ -129,10 +129,14 @@ void | |||
129 | kdump_cpu_freeze(struct unw_frame_info *info, void *arg) | 129 | kdump_cpu_freeze(struct unw_frame_info *info, void *arg) |
130 | { | 130 | { |
131 | int cpuid; | 131 | int cpuid; |
132 | |||
132 | local_irq_disable(); | 133 | local_irq_disable(); |
133 | cpuid = smp_processor_id(); | 134 | cpuid = smp_processor_id(); |
134 | crash_save_this_cpu(); | 135 | crash_save_this_cpu(); |
135 | current->thread.ksp = (__u64)info->sw - 16; | 136 | current->thread.ksp = (__u64)info->sw - 16; |
137 | |||
138 | ia64_set_psr_mc(); /* mask MCA/INIT and stop reentrance */ | ||
139 | |||
136 | atomic_inc(&kdump_cpu_frozen); | 140 | atomic_inc(&kdump_cpu_frozen); |
137 | kdump_status[cpuid] = 1; | 141 | kdump_status[cpuid] = 1; |
138 | mb(); | 142 | mb(); |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index 23f846de62d5..e1f97ac9eefd 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -1242,7 +1242,7 @@ GLOBAL_ENTRY(ia64_jump_to_sal) | |||
1242 | movl r16=SAL_PSR_BITS_TO_SET;; | 1242 | movl r16=SAL_PSR_BITS_TO_SET;; |
1243 | mov cr.ipsr=r16 | 1243 | mov cr.ipsr=r16 |
1244 | mov cr.ifs=r0;; | 1244 | mov cr.ifs=r0;; |
1245 | rfi;; | 1245 | rfi;; // note: this unmask MCA/INIT (psr.mc) |
1246 | 1: | 1246 | 1: |
1247 | /* | 1247 | /* |
1248 | * Invalidate all TLB data/inst | 1248 | * Invalidate all TLB data/inst |
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S index a06d46548ff9..8d2eabe3119f 100644 --- a/arch/ia64/kernel/mca_asm.S +++ b/arch/ia64/kernel/mca_asm.S | |||
@@ -1073,3 +1073,30 @@ GLOBAL_ENTRY(ia64_get_rnat) | |||
1073 | mov ar.rsc=3 | 1073 | mov ar.rsc=3 |
1074 | br.ret.sptk.many rp | 1074 | br.ret.sptk.many rp |
1075 | END(ia64_get_rnat) | 1075 | END(ia64_get_rnat) |
1076 | |||
1077 | |||
1078 | // void ia64_set_psr_mc(void) | ||
1079 | // | ||
1080 | // Set psr.mc bit to mask MCA/INIT. | ||
1081 | GLOBAL_ENTRY(ia64_set_psr_mc) | ||
1082 | rsm psr.i | psr.ic // disable interrupts | ||
1083 | ;; | ||
1084 | srlz.d | ||
1085 | ;; | ||
1086 | mov r14 = psr // get psr{36:35,31:0} | ||
1087 | movl r15 = 1f | ||
1088 | ;; | ||
1089 | dep r14 = -1, r14, PSR_MC, 1 // set psr.mc | ||
1090 | ;; | ||
1091 | dep r14 = -1, r14, PSR_IC, 1 // set psr.ic | ||
1092 | ;; | ||
1093 | dep r14 = -1, r14, PSR_BN, 1 // keep bank1 in use | ||
1094 | ;; | ||
1095 | mov cr.ipsr = r14 | ||
1096 | mov cr.ifs = r0 | ||
1097 | mov cr.iip = r15 | ||
1098 | ;; | ||
1099 | rfi | ||
1100 | 1: | ||
1101 | br.ret.sptk.many rp | ||
1102 | END(ia64_set_psr_mc) | ||