提交 bc907113 编写于 作者: N Nicholas Piggin 提交者: Michael Ellerman

powerpc: move timer broadcast code under GENERIC_CLOCKEVENTS_BROADCAST ifdef

Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 a7cba02d
...@@ -156,11 +156,13 @@ static irqreturn_t reschedule_action(int irq, void *data) ...@@ -156,11 +156,13 @@ static irqreturn_t reschedule_action(int irq, void *data)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
static irqreturn_t tick_broadcast_ipi_action(int irq, void *data) static irqreturn_t tick_broadcast_ipi_action(int irq, void *data)
{ {
timer_broadcast_interrupt(); timer_broadcast_interrupt();
return IRQ_HANDLED; return IRQ_HANDLED;
} }
#endif
#ifdef CONFIG_NMI_IPI #ifdef CONFIG_NMI_IPI
static irqreturn_t nmi_ipi_action(int irq, void *data) static irqreturn_t nmi_ipi_action(int irq, void *data)
...@@ -173,7 +175,9 @@ static irqreturn_t nmi_ipi_action(int irq, void *data) ...@@ -173,7 +175,9 @@ static irqreturn_t nmi_ipi_action(int irq, void *data)
static irq_handler_t smp_ipi_action[] = { static irq_handler_t smp_ipi_action[] = {
[PPC_MSG_CALL_FUNCTION] = call_function_action, [PPC_MSG_CALL_FUNCTION] = call_function_action,
[PPC_MSG_RESCHEDULE] = reschedule_action, [PPC_MSG_RESCHEDULE] = reschedule_action,
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
[PPC_MSG_TICK_BROADCAST] = tick_broadcast_ipi_action, [PPC_MSG_TICK_BROADCAST] = tick_broadcast_ipi_action,
#endif
#ifdef CONFIG_NMI_IPI #ifdef CONFIG_NMI_IPI
[PPC_MSG_NMI_IPI] = nmi_ipi_action, [PPC_MSG_NMI_IPI] = nmi_ipi_action,
#endif #endif
...@@ -187,7 +191,9 @@ static irq_handler_t smp_ipi_action[] = { ...@@ -187,7 +191,9 @@ static irq_handler_t smp_ipi_action[] = {
const char *smp_ipi_name[] = { const char *smp_ipi_name[] = {
[PPC_MSG_CALL_FUNCTION] = "ipi call function", [PPC_MSG_CALL_FUNCTION] = "ipi call function",
[PPC_MSG_RESCHEDULE] = "ipi reschedule", [PPC_MSG_RESCHEDULE] = "ipi reschedule",
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
[PPC_MSG_TICK_BROADCAST] = "ipi tick-broadcast", [PPC_MSG_TICK_BROADCAST] = "ipi tick-broadcast",
#endif
[PPC_MSG_NMI_IPI] = "nmi ipi", [PPC_MSG_NMI_IPI] = "nmi ipi",
}; };
...@@ -278,8 +284,10 @@ irqreturn_t smp_ipi_demux_relaxed(void) ...@@ -278,8 +284,10 @@ irqreturn_t smp_ipi_demux_relaxed(void)
generic_smp_call_function_interrupt(); generic_smp_call_function_interrupt();
if (all & IPI_MESSAGE(PPC_MSG_RESCHEDULE)) if (all & IPI_MESSAGE(PPC_MSG_RESCHEDULE))
scheduler_ipi(); scheduler_ipi();
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
if (all & IPI_MESSAGE(PPC_MSG_TICK_BROADCAST)) if (all & IPI_MESSAGE(PPC_MSG_TICK_BROADCAST))
timer_broadcast_interrupt(); timer_broadcast_interrupt();
#endif
#ifdef CONFIG_NMI_IPI #ifdef CONFIG_NMI_IPI
if (all & IPI_MESSAGE(PPC_MSG_NMI_IPI)) if (all & IPI_MESSAGE(PPC_MSG_NMI_IPI))
nmi_ipi_action(0, NULL); nmi_ipi_action(0, NULL);
......
...@@ -643,6 +643,7 @@ void timer_interrupt(struct pt_regs *regs) ...@@ -643,6 +643,7 @@ void timer_interrupt(struct pt_regs *regs)
} }
EXPORT_SYMBOL(timer_interrupt); EXPORT_SYMBOL(timer_interrupt);
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
void timer_broadcast_interrupt(void) void timer_broadcast_interrupt(void)
{ {
u64 *next_tb = this_cpu_ptr(&decrementers_next_tb); u64 *next_tb = this_cpu_ptr(&decrementers_next_tb);
...@@ -654,6 +655,7 @@ void timer_broadcast_interrupt(void) ...@@ -654,6 +655,7 @@ void timer_broadcast_interrupt(void)
__this_cpu_inc(irq_stat.timer_irqs_event); __this_cpu_inc(irq_stat.timer_irqs_event);
trace_timer_interrupt_exit(regs); trace_timer_interrupt_exit(regs);
} }
#endif
/* /*
* Hypervisor decrementer interrupts shouldn't occur but are sometimes * Hypervisor decrementer interrupts shouldn't occur but are sometimes
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册