Skip to content

Commit

Permalink
powerpc/xive: Remove xive_kexec_teardown_cpu()
Browse files Browse the repository at this point in the history
It's identical to xive_teardown_cpu() so just use the latter

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
ozbenh authored and mpe committed Aug 7, 2018
1 parent dbc5740 commit e27e0a9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 25 deletions.
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/xive.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ extern int xive_smp_prepare_cpu(unsigned int cpu);
extern void xive_smp_setup_cpu(void);
extern void xive_smp_disable_cpu(void);
extern void xive_teardown_cpu(void);
extern void xive_kexec_teardown_cpu(int secondary);
extern void xive_shutdown(void);
extern void xive_flush_interrupt(void);

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/powernv/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
u64 reinit_flags;

if (xive_enabled())
xive_kexec_teardown_cpu(secondary);
xive_teardown_cpu();
else
xics_kexec_teardown_cpu(secondary);

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
}

if (xive_enabled()) {
xive_kexec_teardown_cpu(secondary);
xive_teardown_cpu();

if (!secondary)
xive_shutdown();
Expand Down
22 changes: 0 additions & 22 deletions arch/powerpc/sysdev/xive/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1408,28 +1408,6 @@ void xive_teardown_cpu(void)
xive_cleanup_cpu_queues(cpu, xc);
}

void xive_kexec_teardown_cpu(int secondary)
{
struct xive_cpu *xc = __this_cpu_read(xive_cpu);
unsigned int cpu = smp_processor_id();

/* Set CPPR to 0 to disable flow of interrupts */
xc->cppr = 0;
out_8(xive_tima + xive_tima_offset + TM_CPPR, 0);

/* Backend cleanup if any */
if (xive_ops->teardown_cpu)
xive_ops->teardown_cpu(cpu, xc);

#ifdef CONFIG_SMP
/* Get rid of IPI */
xive_cleanup_cpu_ipi(cpu, xc);
#endif

/* Disable and free the queues */
xive_cleanup_cpu_queues(cpu, xc);
}

void xive_shutdown(void)
{
xive_ops->shutdown();
Expand Down

0 comments on commit e27e0a9

Please sign in to comment.