aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2012-07-26 09:56:11 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-05 02:05:19 -0400
commitdabe859ec6360a12e71f39bf695d174e19ff2688 (patch)
treeea6312a3280966141e3bdf4c643f4ffad4506606 /arch/powerpc
parent79c5fcebfe4021f326a6715009f0b6b622d5df92 (diff)
powerpc: Give hypervisor decrementer interrupts their own handler
At the moment the handler for hypervisor decrementer interrupts is the same as for decrementer interrupts, i.e. timer_interrupt(). This is bogus; if we ever do get a hypervisor decrementer interrupt it won't have anything to do with the next timer event. In fact the only time we get hypervisor decrementer interrupts is when one is left pending on exit from a KVM guest. When we get a hypervisor decrementer interrupt we don't need to do anything special to clear it, since they are edge-triggered on the transition of HDEC from 0 to -1. Thus this adds an empty handler function for them. We don't need to have them masked when interrupts are soft-disabled, so we use STD_EXCEPTION_HV instead of MASKABLE_EXCEPTION_HV. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S3
-rw-r--r--arch/powerpc/kernel/time.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index e894515e77bb..39aa97d3ff88 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -186,7 +186,7 @@ hardware_interrupt_hv:
186 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800) 186 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800)
187 187
188 MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer) 188 MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer)
189 MASKABLE_EXCEPTION_HV(0x980, 0x982, decrementer) 189 STD_EXCEPTION_HV(0x980, 0x982, hdecrementer)
190 190
191 STD_EXCEPTION_PSERIES(0xa00, 0xa00, trap_0a) 191 STD_EXCEPTION_PSERIES(0xa00, 0xa00, trap_0a)
192 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00) 192 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00)
@@ -486,6 +486,7 @@ machine_check_common:
486 486
487 STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ) 487 STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ)
488 STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt) 488 STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt)
489 STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt)
489 STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception) 490 STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
490 STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception) 491 STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
491 STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception) 492 STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index be171ee73bf8..e49e93191b69 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -535,6 +535,15 @@ void timer_interrupt(struct pt_regs * regs)
535 trace_timer_interrupt_exit(regs); 535 trace_timer_interrupt_exit(regs);
536} 536}
537 537
538/*
539 * Hypervisor decrementer interrupts shouldn't occur but are sometimes
540 * left pending on exit from a KVM guest. We don't need to do anything
541 * to clear them, as they are edge-triggered.
542 */
543void hdec_interrupt(struct pt_regs *regs)
544{
545}
546
538#ifdef CONFIG_SUSPEND 547#ifdef CONFIG_SUSPEND
539static void generic_suspend_disable_irqs(void) 548static void generic_suspend_disable_irqs(void)
540{ 549{