mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 21:00:53 +07:00
powerpc/pseries: Implement NMI IPI with H_SIGNAL_SYS_RESET
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
c64af6458e
commit
102c05e8dc
@ -386,6 +386,10 @@ int pSeries_system_reset_exception(struct pt_regs *regs)
|
|||||||
}
|
}
|
||||||
fwnmi_release_errinfo();
|
fwnmi_release_errinfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (smp_handle_nmi_ipi(regs))
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0; /* need to perform reset */
|
return 0; /* need to perform reset */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +189,27 @@ static void smp_pseries_cause_ipi(int cpu)
|
|||||||
icp_ops->cause_ipi(cpu);
|
icp_ops->cause_ipi(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int pseries_cause_nmi_ipi(int cpu)
|
||||||
|
{
|
||||||
|
int hwcpu;
|
||||||
|
|
||||||
|
if (cpu == NMI_IPI_ALL_OTHERS) {
|
||||||
|
hwcpu = H_SIGNAL_SYS_RESET_ALL_OTHERS;
|
||||||
|
} else {
|
||||||
|
if (cpu < 0) {
|
||||||
|
WARN_ONCE(true, "incorrect cpu parameter %d", cpu);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hwcpu = get_hard_smp_processor_id(cpu);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plapr_signal_sys_reset(hwcpu) == H_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static __init void pSeries_smp_probe(void)
|
static __init void pSeries_smp_probe(void)
|
||||||
{
|
{
|
||||||
xics_smp_probe();
|
xics_smp_probe();
|
||||||
@ -202,7 +223,7 @@ static __init void pSeries_smp_probe(void)
|
|||||||
static struct smp_ops_t pseries_smp_ops = {
|
static struct smp_ops_t pseries_smp_ops = {
|
||||||
.message_pass = NULL, /* Use smp_muxed_ipi_message_pass */
|
.message_pass = NULL, /* Use smp_muxed_ipi_message_pass */
|
||||||
.cause_ipi = NULL, /* Filled at runtime by pSeries_smp_probe() */
|
.cause_ipi = NULL, /* Filled at runtime by pSeries_smp_probe() */
|
||||||
.cause_nmi_ipi = NULL,
|
.cause_nmi_ipi = pseries_cause_nmi_ipi,
|
||||||
.probe = pSeries_smp_probe,
|
.probe = pSeries_smp_probe,
|
||||||
.kick_cpu = smp_pSeries_kick_cpu,
|
.kick_cpu = smp_pSeries_kick_cpu,
|
||||||
.setup_cpu = smp_setup_cpu,
|
.setup_cpu = smp_setup_cpu,
|
||||||
|
Loading…
Reference in New Issue
Block a user