[v2,3/9] powerpc/powernv: Add icp_native_cause_ipi_rm
Michael Ellerman
mpe at ellerman.id.au
Mon Dec 7 17:38:18 AEDT 2015
Subject would be better as "powerpc/xics".
On Wed, 2015-25-11 at 23:44:50 UTC, "Suresh E. Warrier" wrote:
> Function to cause an IPI. Requires kvm_hstate.xics_phys
> to be initialized with physical address of XICS.
Please expand the change log a bit, this is a bit terse.
> diff --git a/arch/powerpc/sysdev/xics/icp-native.c b/arch/powerpc/sysdev/xics/icp-native.c
> index eae3265..e39b18a 100644
> --- a/arch/powerpc/sysdev/xics/icp-native.c
> +++ b/arch/powerpc/sysdev/xics/icp-native.c
> @@ -159,6 +159,25 @@ static void icp_native_cause_ipi(int cpu, unsigned long data)
> icp_native_set_qirr(cpu, IPI_PRIORITY);
> }
>
> +void icp_native_cause_ipi_rm(int cpu)
> +{
> + /*
> + * Currently not used to send IPIs to another CPU
> + * on the same core. Only caller is KVM real mode.
> + * Need the physical address of the XICS to be
> + * previously saved in kvm_hstate in the paca.
> + */
> + unsigned long xics_phys;
> +
> + /*
> + * Just like the cause_ipi functions, it is required to
> + * include a full barrier (out8 includes a sync) before
> + * causing the IPI.
> + */
> + xics_phys = paca[cpu].kvm_hstate.xics_phys;
> + out_rm8((u8 *)(xics_phys + XICS_MFRR), IPI_PRIORITY);
> +}
This doesn't build without KVM:
arch/powerpc/sysdev/xics/icp-native.c:177:23: error: 'struct paca_struct' has no member named 'kvm_hstate'
Probably the whole function should be #ifdef CONFIG_KVM_BOOK3S_64_HV or
something.
cheers
More information about the Linuxppc-dev
mailing list