powerpc: Change the doorbell IPI calling convention

Change the doorbell callers to know about their msgsnd addressing,
rather than have them set a per-cpu target data tag at boot that gets
sent to the cause_ipi functions. The data is only used for doorbell IPI
functions, no other IPI types, so it makes sense to keep that detail
local to doorbell.

Have the platform code understand doorbell IPIs, rather than the
interrupt controller code understand them. Platform code can look at
capabilities it has available and decide which to use.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
此提交包含在:
Nicholas Piggin
2017-04-13 20:16:21 +10:00
提交者 Michael Ellerman
父節點 9b7ff0c658
當前提交 b866cc2199
共有 14 個檔案被更改,包括 95 行新增82 行删除

查看文件

@@ -55,11 +55,6 @@
*/
static cpumask_var_t of_spin_mask;
/*
* If we multiplex IPI mechanisms, store the appropriate XICS IPI mechanism here
*/
static void (*xics_cause_ipi)(int cpu, unsigned long data);
/* Query where a cpu is now. Return codes #defined in plpar_wrappers.h */
int smp_query_cpu_stopped(unsigned int pcpu)
{
@@ -143,8 +138,6 @@ static void smp_setup_cpu(int cpu)
{
if (cpu != boot_cpuid)
xics_setup_cpu();
if (cpu_has_feature(CPU_FTR_DBELL))
doorbell_setup_this_cpu();
if (firmware_has_feature(FW_FEATURE_SPLPAR))
vpa_init(cpu);
@@ -187,23 +180,23 @@ static int smp_pSeries_kick_cpu(int nr)
return 0;
}
/* Only used on systems that support multiple IPI mechanisms */
static void pSeries_cause_ipi_mux(int cpu, unsigned long data)
static void smp_pseries_cause_ipi(int cpu)
{
if (cpumask_test_cpu(cpu, cpu_sibling_mask(smp_processor_id())))
doorbell_cause_ipi(cpu, data);
else
xics_cause_ipi(cpu, data);
/* POWER9 should not use this handler */
if (doorbell_try_core_ipi(cpu))
return;
icp_ops->cause_ipi(cpu);
}
static __init void pSeries_smp_probe(void)
{
xics_smp_probe();
if (cpu_has_feature(CPU_FTR_DBELL)) {
xics_cause_ipi = smp_ops->cause_ipi;
smp_ops->cause_ipi = pSeries_cause_ipi_mux;
}
if (cpu_has_feature(CPU_FTR_DBELL))
smp_ops->cause_ipi = smp_pseries_cause_ipi;
else
smp_ops->cause_ipi = icp_ops->cause_ipi;
}
static struct smp_ops_t pseries_smp_ops = {