mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
d739d2caa3
MPIC was only used by Power3 which is now unsupported, so remove MPIC code. XICS is now the only supported interrupt controller for pSeries so do some cleanups too. Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
56 lines
1.4 KiB
C
56 lines
1.4 KiB
C
/*
|
|
* Copyright 2006 Michael Ellerman, IBM Corporation
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <asm/machdep.h>
|
|
#include <asm/page.h>
|
|
#include <asm/firmware.h>
|
|
#include <asm/kexec.h>
|
|
#include <asm/xics.h>
|
|
#include <asm/smp.h>
|
|
#include <asm/plpar_wrappers.h>
|
|
|
|
#include "pseries.h"
|
|
|
|
void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
|
|
{
|
|
/* Don't risk a hypervisor call if we're crashing */
|
|
if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
|
|
int ret;
|
|
int cpu = smp_processor_id();
|
|
int hwcpu = hard_smp_processor_id();
|
|
|
|
if (get_lppaca()->dtl_enable_mask) {
|
|
ret = unregister_dtl(hwcpu);
|
|
if (ret) {
|
|
pr_err("WARNING: DTL deregistration for cpu "
|
|
"%d (hw %d) failed with %d\n",
|
|
cpu, hwcpu, ret);
|
|
}
|
|
}
|
|
|
|
ret = unregister_slb_shadow(hwcpu);
|
|
if (ret) {
|
|
pr_err("WARNING: SLB shadow buffer deregistration "
|
|
"for cpu %d (hw %d) failed with %d\n",
|
|
cpu, hwcpu, ret);
|
|
}
|
|
|
|
ret = unregister_vpa(hwcpu);
|
|
if (ret) {
|
|
pr_err("WARNING: VPA deregistration for cpu %d "
|
|
"(hw %d) failed with %d\n", cpu, hwcpu, ret);
|
|
}
|
|
}
|
|
|
|
xics_kexec_teardown_cpu(secondary);
|
|
}
|