Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes from Benjamin Herrenschmidt:
"Here are a couple of last minute fixes for 3.4 for regressions
introduced by my rewrite of the lazy irq masking code."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/irq: Make alignment & program interrupt behave the same
powerpc/irq: Fix bug with new lazy IRQ handling code

+16 -29
-7
arch/powerpc/include/asm/exception-64s.h
··· 288 288 /* Exception addition: Hard disable interrupts */ 289 289 #define DISABLE_INTS SOFT_DISABLE_INTS(r10,r11) 290 290 291 - /* Exception addition: Keep interrupt state */ 292 - #define ENABLE_INTS \ 293 - ld r11,PACAKMSR(r13); \ 294 - ld r12,_MSR(r1); \ 295 - rlwimi r11,r12,0,MSR_EE; \ 296 - mtmsrd r11,1 297 - 298 291 #define ADD_NVGPRS \ 299 292 bl .save_nvgprs 300 293
-18
arch/powerpc/kernel/entry_64.S
··· 767 767 SOFT_DISABLE_INTS(r3,r4) 768 768 1: bl .preempt_schedule_irq 769 769 770 - /* Hard-disable interrupts again (and update PACA) */ 771 - #ifdef CONFIG_PPC_BOOK3E 772 - wrteei 0 773 - #else 774 - ld r10,PACAKMSR(r13) /* Get kernel MSR without EE */ 775 - mtmsrd r10,1 776 - #endif /* CONFIG_PPC_BOOK3E */ 777 - li r0,PACA_IRQ_HARD_DIS 778 - stb r0,PACAIRQHAPPENED(r13) 779 - 780 770 /* Re-test flags and eventually loop */ 781 771 clrrdi r9,r1,THREAD_SHIFT 782 772 ld r4,TI_FLAGS(r9) ··· 776 786 777 787 user_work: 778 788 #endif /* CONFIG_PREEMPT */ 779 - 780 - /* Enable interrupts */ 781 - #ifdef CONFIG_PPC_BOOK3E 782 - wrteei 1 783 - #else 784 - ori r10,r10,MSR_EE 785 - mtmsrd r10,1 786 - #endif /* CONFIG_PPC_BOOK3E */ 787 789 788 790 andi. r0,r4,_TIF_NEED_RESCHED 789 791 beq 1f
+1 -1
arch/powerpc/kernel/exceptions-64s.S
··· 768 768 std r3,_DAR(r1) 769 769 std r4,_DSISR(r1) 770 770 bl .save_nvgprs 771 + DISABLE_INTS 771 772 addi r3,r1,STACK_FRAME_OVERHEAD 772 - ENABLE_INTS 773 773 bl .alignment_exception 774 774 b .ret_from_except 775 775
+7 -1
arch/powerpc/kernel/irq.c
··· 260 260 * if they are currently disabled. This is typically called before 261 261 * schedule() or do_signal() when returning to userspace. We do it 262 262 * in C to avoid the burden of dealing with lockdep etc... 263 + * 264 + * NOTE: This is called with interrupts hard disabled but not marked 265 + * as such in paca->irq_happened, so we need to resync this. 263 266 */ 264 267 void restore_interrupts(void) 265 268 { 266 - if (irqs_disabled()) 269 + if (irqs_disabled()) { 270 + local_paca->irq_happened |= PACA_IRQ_HARD_DIS; 267 271 local_irq_enable(); 272 + } else 273 + __hard_irq_enable(); 268 274 } 269 275 270 276 #endif /* CONFIG_PPC64 */
+8 -2
arch/powerpc/kernel/traps.c
··· 248 248 addr, regs->nip, regs->link, code); 249 249 } 250 250 251 - if (!arch_irq_disabled_regs(regs)) 251 + if (arch_irqs_disabled() && !arch_irq_disabled_regs(regs)) 252 252 local_irq_enable(); 253 253 254 254 memset(&info, 0, sizeof(info)); ··· 1019 1019 return; 1020 1020 } 1021 1021 1022 - local_irq_enable(); 1022 + /* We restore the interrupt state now */ 1023 + if (!arch_irq_disabled_regs(regs)) 1024 + local_irq_enable(); 1023 1025 1024 1026 #ifdef CONFIG_MATH_EMULATION 1025 1027 /* (reason & REASON_ILLEGAL) would be the obvious thing here, ··· 1070 1068 void alignment_exception(struct pt_regs *regs) 1071 1069 { 1072 1070 int sig, code, fixed = 0; 1071 + 1072 + /* We restore the interrupt state now */ 1073 + if (!arch_irq_disabled_regs(regs)) 1074 + local_irq_enable(); 1073 1075 1074 1076 /* we don't implement logging of alignment exceptions */ 1075 1077 if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS))