On 27 February 2014 12:21, Pranavkumar Sawargaonkar
<pranavku...@linaro.org> wrote:
> Provide versions of the KVM PSCI v0.2 constants to non-KVM code;
> this will allow us to avoid an ifdef in boards which set up a
> PSCI v0.2 node in the device tree.
>
> Signed-off-by: Pranavkumar Sawargaonkar <pranavku...@linaro.org>
> Signed-off-by: Anup Patel <anup.pa...@linaro.org>
> ---
>  target-arm/kvm-consts.h |   41 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>
> diff --git a/target-arm/kvm-consts.h b/target-arm/kvm-consts.h
> index 0e7f889..0f3f0ff 100644
> --- a/target-arm/kvm-consts.h
> +++ b/target-arm/kvm-consts.h
> @@ -38,6 +38,7 @@ MISMATCH_CHECK(CP_REG_SIZE_U64, KVM_REG_SIZE_U64)
>  MISMATCH_CHECK(CP_REG_ARM, KVM_REG_ARM)
>  MISMATCH_CHECK(CP_REG_ARCH_MASK, KVM_REG_ARCH_MASK)
>
> +/* PSCI v0.1 interface */
>  #define PSCI_FN_BASE 0x95c1ba5e
>  #define PSCI_FN(n) (PSCI_FN_BASE + (n))
>  #define PSCI_FN_CPU_SUSPEND PSCI_FN(0)
> @@ -50,6 +51,46 @@ MISMATCH_CHECK(PSCI_FN_CPU_OFF, KVM_PSCI_FN_CPU_OFF)
>  MISMATCH_CHECK(PSCI_FN_CPU_ON, KVM_PSCI_FN_CPU_ON)
>  MISMATCH_CHECK(PSCI_FN_MIGRATE, KVM_PSCI_FN_MIGRATE)
>
> +/* PSCI v0.2 interface */
> +#define PSCI_0_2_FN_BASE 0x84000000
> +#define PSCI_0_2_FN(n) (PSCI_0_2_FN_BASE + (n))
> +#define PSCI_0_2_FN64_BASE 0xC4000000
> +#define PSCI_0_2_FN64(n) (PSCI_0_2_FN64_BASE + (n))
> +#define PSCI_0_2_FN_PSCI_VERSION PSCI_0_2_FN(0)
> +#define PSCI_0_2_FN_CPU_SUSPEND PSCI_0_2_FN(1)
> +#define PSCI_0_2_FN_CPU_OFF PSCI_0_2_FN(2)
> +#define PSCI_0_2_FN_CPU_ON PSCI_0_2_FN(3)
> +#define PSCI_0_2_FN_AFFINITY_INFO PSCI_0_2_FN(4)
> +#define PSCI_0_2_FN_MIGRATE PSCI_0_2_FN(5)
> +#define PSCI_0_2_FN_MIGRATE_INFO_TYPE PSCI_0_2_FN(6)
> +#define PSCI_0_2_FN_MIGRATE_INFO_UP_CPU PSCI_0_2_FN(7)
> +#define PSCI_0_2_FN_SYSTEM_OFF PSCI_0_2_FN(8)
> +#define PSCI_0_2_FN_SYSTEM_RESET PSCI_0_2_FN(9)
> +#define PSCI_0_2_FN64_CPU_SUSPEND PSCI_0_2_FN64(1)
> +#define PSCI_0_2_FN64_CPU_ON PSCI_0_2_FN64(3)
> +#define PSCI_0_2_FN64_AFFINITY_INFO PSCI_0_2_FN64(4)
> +#define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5)
> +#define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7)
> +
> +MISMATCH_CHECK(PSCI_0_2_FN_PSCI_VERSION, KVM_PSCI_0_2_FN_PSCI_VERSION)
> +MISMATCH_CHECK(PSCI_0_2_FN_CPU_SUSPEND, KVM_PSCI_0_2_FN_CPU_SUSPEND)
> +MISMATCH_CHECK(PSCI_0_2_FN_CPU_OFF, KVM_PSCI_0_2_FN_CPU_OFF)
> +MISMATCH_CHECK(PSCI_0_2_FN_CPU_ON, KVM_PSCI_0_2_FN_CPU_ON)
> +MISMATCH_CHECK(PSCI_0_2_FN_AFFINITY_INFO, KVM_PSCI_0_2_FN_AFFINITY_INFO)
> +MISMATCH_CHECK(PSCI_0_2_FN_MIGRATE, KVM_PSCI_0_2_FN_MIGRATE)
> +MISMATCH_CHECK(PSCI_0_2_FN_MIGRATE_INFO_TYPE, \
> +               KVM_PSCI_0_2_FN_MIGRATE_INFO_TYPE)
> +MISMATCH_CHECK(PSCI_0_2_FN_MIGRATE_INFO_UP_CPU, \
> +               KVM_PSCI_0_2_FN_MIGRATE_INFO_UP_CPU)
> +MISMATCH_CHECK(PSCI_0_2_FN_SYSTEM_OFF, KVM_PSCI_0_2_FN_SYSTEM_OFF)
> +MISMATCH_CHECK(PSCI_0_2_FN_SYSTEM_RESET, KVM_PSCI_0_2_FN_SYSTEM_RESET)
> +MISMATCH_CHECK(PSCI_0_2_FN64_CPU_SUSPEND, KVM_PSCI_0_2_FN64_CPU_SUSPEND)
> +MISMATCH_CHECK(PSCI_0_2_FN64_CPU_ON, KVM_PSCI_0_2_FN64_CPU_ON)
> +MISMATCH_CHECK(PSCI_0_2_FN64_AFFINITY_INFO, KVM_PSCI_0_2_FN64_AFFINITY_INFO)
> +MISMATCH_CHECK(PSCI_0_2_FN64_MIGRATE, KVM_PSCI_0_2_FN64_MIGRATE)
> +MISMATCH_CHECK(PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU, \
> +               KVM_PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU)
> +
>  #define QEMU_KVM_ARM_TARGET_CORTEX_A15 0
>
>  /* There's no kernel define for this: sentinel value which
> --
> 1.7.9.5
>

Sorry for mentioning wrong qemu devel mail id in my previous mail.
Correcting correct qemu-devel  id.

Thanks,
Pranav

Reply via email to