diff mbox series

[Xen-devel,1/3] xen/arm: vpsci: Removing dummy MIGRATE and MIGRATE_INFO_UP_CPU

Message ID 20180124183445.23705-2-julien.grall@linaro.org
State Superseded
Headers show
Series xen/arm: SMCCC fixes and PSCI clean-up | expand

Commit Message

Julien Grall Jan. 24, 2018, 6:34 p.m. UTC
The PSCI call MIGRATE and MIGRATE_INFO_UP_CPU are optional and
implemented as just returning PSCI_NOT_SUPPORTED (aka UNKNOWN_FUNCTION
for SMCCC).

The new SMCCC framework is able to deal with unimplemented function and
return the proper error code. So remove the implementations for both
function.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/vpsci.c             | 10 ----------
 xen/arch/arm/vsmc.c              | 14 --------------
 xen/include/asm-arm/perfc_defn.h |  2 --
 xen/include/asm-arm/psci.h       |  2 --
 4 files changed, 28 deletions(-)

Comments

Julien Grall Jan. 26, 2018, 4:37 p.m. UTC | #1
Hi,

On 24/01/18 18:34, Julien Grall wrote:
> The PSCI call MIGRATE and MIGRATE_INFO_UP_CPU are optional and
> implemented as just returning PSCI_NOT_SUPPORTED (aka UNKNOWN_FUNCTION
> for SMCCC).
> 
> The new SMCCC framework is able to deal with unimplemented function and
> return the proper error code. So remove the implementations for both
> function.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> ---
>   xen/arch/arm/vpsci.c             | 10 ----------
>   xen/arch/arm/vsmc.c              | 14 --------------
>   xen/include/asm-arm/perfc_defn.h |  2 --
>   xen/include/asm-arm/psci.h       |  2 --

I should have probably remove the PSCI_0_2_FN_MIGRATE_* define in psci.h 
as well.

I will resend a series for that once I get feedback.

Cheers,

>   4 files changed, 28 deletions(-)
> 
> diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c
> index cd724904ef..979d32ed6d 100644
> --- a/xen/arch/arm/vpsci.c
> +++ b/xen/arch/arm/vpsci.c
> @@ -172,21 +172,11 @@ int32_t do_psci_0_2_affinity_info(register_t target_affinity,
>       return PSCI_0_2_AFFINITY_LEVEL_OFF;
>   }
>   
> -int32_t do_psci_0_2_migrate(uint32_t target_cpu)
> -{
> -    return PSCI_NOT_SUPPORTED;
> -}
> -
>   uint32_t do_psci_0_2_migrate_info_type(void)
>   {
>       return PSCI_0_2_TOS_MP_OR_NOT_PRESENT;
>   }
>   
> -register_t do_psci_0_2_migrate_info_up_cpu(void)
> -{
> -    return PSCI_NOT_SUPPORTED;
> -}
> -
>   void do_psci_0_2_system_off( void )
>   {
>       struct domain *d = current->domain;
> diff --git a/xen/arch/arm/vsmc.c b/xen/arch/arm/vsmc.c
> index c9064de37a..563c2d8dda 100644
> --- a/xen/arch/arm/vsmc.c
> +++ b/xen/arch/arm/vsmc.c
> @@ -157,11 +157,6 @@ static bool handle_sssc(struct cpu_user_regs *regs)
>           PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_type());
>           return true;
>   
> -    case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU:
> -        perfc_incr(vpsci_migrate_info_up_cpu);
> -        PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_up_cpu());
> -        return true;
> -
>       case PSCI_0_2_FN_SYSTEM_OFF:
>           perfc_incr(vpsci_system_off);
>           do_psci_0_2_system_off();
> @@ -206,15 +201,6 @@ static bool handle_sssc(struct cpu_user_regs *regs)
>           return true;
>       }
>   
> -    case PSCI_0_2_FN_MIGRATE:
> -    {
> -        uint32_t tcpu = PSCI_ARG32(regs, 1);
> -
> -        perfc_incr(vpsci_cpu_migrate);
> -        PSCI_SET_RESULT(regs, do_psci_0_2_migrate(tcpu));
> -        return true;
> -    }
> -
>       case ARM_SMCCC_FUNC_CALL_COUNT:
>           return fill_function_call_count(regs, SSSC_SMCCC_FUNCTION_COUNT);
>   
> diff --git a/xen/include/asm-arm/perfc_defn.h b/xen/include/asm-arm/perfc_defn.h
> index 5f957ee6ec..a7acb7d21c 100644
> --- a/xen/include/asm-arm/perfc_defn.h
> +++ b/xen/include/asm-arm/perfc_defn.h
> @@ -27,12 +27,10 @@ PERFCOUNTER(vpsci_cpu_on,              "vpsci: cpu_on")
>   PERFCOUNTER(vpsci_cpu_off,             "vpsci: cpu_off")
>   PERFCOUNTER(vpsci_version,             "vpsci: version")
>   PERFCOUNTER(vpsci_migrate_info_type,   "vpsci: migrate_info_type")
> -PERFCOUNTER(vpsci_migrate_info_up_cpu, "vpsci: migrate_info_up_cpu")
>   PERFCOUNTER(vpsci_system_off,          "vpsci: system_off")
>   PERFCOUNTER(vpsci_system_reset,        "vpsci: system_reset")
>   PERFCOUNTER(vpsci_cpu_suspend,         "vpsci: cpu_suspend")
>   PERFCOUNTER(vpsci_cpu_affinity_info,   "vpsci: cpu_affinity_info")
> -PERFCOUNTER(vpsci_cpu_migrate,         "vpsci: cpu_migrate")
>   
>   PERFCOUNTER(vgicd_reads,                "vgicd: read")
>   PERFCOUNTER(vgicd_writes,               "vgicd: write")
> diff --git a/xen/include/asm-arm/psci.h b/xen/include/asm-arm/psci.h
> index 635ea5dae4..f7e2139031 100644
> --- a/xen/include/asm-arm/psci.h
> +++ b/xen/include/asm-arm/psci.h
> @@ -37,9 +37,7 @@ int32_t do_psci_0_2_cpu_on(register_t target_cpu, register_t entry_point,
>                          register_t context_id);
>   int32_t do_psci_0_2_affinity_info(register_t target_affinity,
>                                 uint32_t lowest_affinity_level);
> -int32_t do_psci_0_2_migrate(uint32_t target_cpu);
>   uint32_t do_psci_0_2_migrate_info_type(void);
> -register_t do_psci_0_2_migrate_info_up_cpu(void);
>   void do_psci_0_2_system_off(void);
>   void do_psci_0_2_system_reset(void);
>   
>
Volodymyr Babchuk Jan. 26, 2018, 5:46 p.m. UTC | #2
Hi Julien,

On 24.01.18 20:34, Julien Grall wrote:
> The PSCI call MIGRATE and MIGRATE_INFO_UP_CPU are optional and 
> implemented as just returning PSCI_NOT_SUPPORTED (aka
> UNKNOWN_FUNCTION for SMCCC).
> 
> The new SMCCC framework is able to deal with unimplemented function
> and return the proper error code. So remove the implementations for
> both function.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
`Reviewed-by: Volodymr Babchuk <volodymyr_babchuk@epam.com>`

> --- xen/arch/arm/vpsci.c             | 10 ---------- 
> xen/arch/arm/vsmc.c              | 14 -------------- 
> xen/include/asm-arm/perfc_defn.h |  2 -- xen/include/asm-arm/psci.h
> |  2 -- 4 files changed, 28 deletions(-)
> 
> diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c index
> cd724904ef..979d32ed6d 100644 --- a/xen/arch/arm/vpsci.c +++
> b/xen/arch/arm/vpsci.c @@ -172,21 +172,11 @@ int32_t
> do_psci_0_2_affinity_info(register_t target_affinity, return
> PSCI_0_2_AFFINITY_LEVEL_OFF; }
> 
> -int32_t do_psci_0_2_migrate(uint32_t target_cpu) -{ -    return
> PSCI_NOT_SUPPORTED; -} - uint32_t
> do_psci_0_2_migrate_info_type(void) { return
> PSCI_0_2_TOS_MP_OR_NOT_PRESENT; }
> 
> -register_t do_psci_0_2_migrate_info_up_cpu(void) -{ -    return
> PSCI_NOT_SUPPORTED; -} - void do_psci_0_2_system_off( void ) { struct
> domain *d = current->domain; diff --git a/xen/arch/arm/vsmc.c
> b/xen/arch/arm/vsmc.c index c9064de37a..563c2d8dda 100644 ---
> a/xen/arch/arm/vsmc.c +++ b/xen/arch/arm/vsmc.c @@ -157,11 +157,6 @@
> static bool handle_sssc(struct cpu_user_regs *regs) 
> PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_type()); return true;
> 
> -    case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU: -
> perfc_incr(vpsci_migrate_info_up_cpu); -        PSCI_SET_RESULT(regs,
> do_psci_0_2_migrate_info_up_cpu()); -        return true; - case
> PSCI_0_2_FN_SYSTEM_OFF: perfc_incr(vpsci_system_off); 
> do_psci_0_2_system_off(); @@ -206,15 +201,6 @@ static bool
> handle_sssc(struct cpu_user_regs *regs) return true; }
> 
> -    case PSCI_0_2_FN_MIGRATE: -    { -        uint32_t tcpu =
> PSCI_ARG32(regs, 1); - -        perfc_incr(vpsci_cpu_migrate); -
> PSCI_SET_RESULT(regs, do_psci_0_2_migrate(tcpu)); -        return
> true; -    } - case ARM_SMCCC_FUNC_CALL_COUNT: return
> fill_function_call_count(regs, SSSC_SMCCC_FUNCTION_COUNT);
> 
> diff --git a/xen/include/asm-arm/perfc_defn.h
> b/xen/include/asm-arm/perfc_defn.h index 5f957ee6ec..a7acb7d21c
> 100644 --- a/xen/include/asm-arm/perfc_defn.h +++
> b/xen/include/asm-arm/perfc_defn.h @@ -27,12 +27,10 @@
> PERFCOUNTER(vpsci_cpu_on,              "vpsci: cpu_on") 
> PERFCOUNTER(vpsci_cpu_off,             "vpsci: cpu_off") 
> PERFCOUNTER(vpsci_version,             "vpsci: version") 
> PERFCOUNTER(vpsci_migrate_info_type,   "vpsci: migrate_info_type") 
> -PERFCOUNTER(vpsci_migrate_info_up_cpu, "vpsci:
> migrate_info_up_cpu") PERFCOUNTER(vpsci_system_off,          "vpsci:
> system_off") PERFCOUNTER(vpsci_system_reset,        "vpsci:
> system_reset") PERFCOUNTER(vpsci_cpu_suspend,         "vpsci:
> cpu_suspend") PERFCOUNTER(vpsci_cpu_affinity_info,   "vpsci:
> cpu_affinity_info") -PERFCOUNTER(vpsci_cpu_migrate,         "vpsci:
> cpu_migrate")
> 
> PERFCOUNTER(vgicd_reads,                "vgicd: read") 
> PERFCOUNTER(vgicd_writes,               "vgicd: write") diff --git
> a/xen/include/asm-arm/psci.h b/xen/include/asm-arm/psci.h index
> 635ea5dae4..f7e2139031 100644 --- a/xen/include/asm-arm/psci.h +++
> b/xen/include/asm-arm/psci.h @@ -37,9 +37,7 @@ int32_t
> do_psci_0_2_cpu_on(register_t target_cpu, register_t entry_point, 
> register_t context_id); int32_t do_psci_0_2_affinity_info(register_t
> target_affinity, uint32_t lowest_affinity_level); -int32_t
> do_psci_0_2_migrate(uint32_t target_cpu); uint32_t
> do_psci_0_2_migrate_info_type(void); -register_t
> do_psci_0_2_migrate_info_up_cpu(void); void
> do_psci_0_2_system_off(void); void do_psci_0_2_system_reset(void);
> 
>
diff mbox series

Patch

diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c
index cd724904ef..979d32ed6d 100644
--- a/xen/arch/arm/vpsci.c
+++ b/xen/arch/arm/vpsci.c
@@ -172,21 +172,11 @@  int32_t do_psci_0_2_affinity_info(register_t target_affinity,
     return PSCI_0_2_AFFINITY_LEVEL_OFF;
 }
 
-int32_t do_psci_0_2_migrate(uint32_t target_cpu)
-{
-    return PSCI_NOT_SUPPORTED;
-}
-
 uint32_t do_psci_0_2_migrate_info_type(void)
 {
     return PSCI_0_2_TOS_MP_OR_NOT_PRESENT;
 }
 
-register_t do_psci_0_2_migrate_info_up_cpu(void)
-{
-    return PSCI_NOT_SUPPORTED;
-}
-
 void do_psci_0_2_system_off( void )
 {
     struct domain *d = current->domain;
diff --git a/xen/arch/arm/vsmc.c b/xen/arch/arm/vsmc.c
index c9064de37a..563c2d8dda 100644
--- a/xen/arch/arm/vsmc.c
+++ b/xen/arch/arm/vsmc.c
@@ -157,11 +157,6 @@  static bool handle_sssc(struct cpu_user_regs *regs)
         PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_type());
         return true;
 
-    case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU:
-        perfc_incr(vpsci_migrate_info_up_cpu);
-        PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_up_cpu());
-        return true;
-
     case PSCI_0_2_FN_SYSTEM_OFF:
         perfc_incr(vpsci_system_off);
         do_psci_0_2_system_off();
@@ -206,15 +201,6 @@  static bool handle_sssc(struct cpu_user_regs *regs)
         return true;
     }
 
-    case PSCI_0_2_FN_MIGRATE:
-    {
-        uint32_t tcpu = PSCI_ARG32(regs, 1);
-
-        perfc_incr(vpsci_cpu_migrate);
-        PSCI_SET_RESULT(regs, do_psci_0_2_migrate(tcpu));
-        return true;
-    }
-
     case ARM_SMCCC_FUNC_CALL_COUNT:
         return fill_function_call_count(regs, SSSC_SMCCC_FUNCTION_COUNT);
 
diff --git a/xen/include/asm-arm/perfc_defn.h b/xen/include/asm-arm/perfc_defn.h
index 5f957ee6ec..a7acb7d21c 100644
--- a/xen/include/asm-arm/perfc_defn.h
+++ b/xen/include/asm-arm/perfc_defn.h
@@ -27,12 +27,10 @@  PERFCOUNTER(vpsci_cpu_on,              "vpsci: cpu_on")
 PERFCOUNTER(vpsci_cpu_off,             "vpsci: cpu_off")
 PERFCOUNTER(vpsci_version,             "vpsci: version")
 PERFCOUNTER(vpsci_migrate_info_type,   "vpsci: migrate_info_type")
-PERFCOUNTER(vpsci_migrate_info_up_cpu, "vpsci: migrate_info_up_cpu")
 PERFCOUNTER(vpsci_system_off,          "vpsci: system_off")
 PERFCOUNTER(vpsci_system_reset,        "vpsci: system_reset")
 PERFCOUNTER(vpsci_cpu_suspend,         "vpsci: cpu_suspend")
 PERFCOUNTER(vpsci_cpu_affinity_info,   "vpsci: cpu_affinity_info")
-PERFCOUNTER(vpsci_cpu_migrate,         "vpsci: cpu_migrate")
 
 PERFCOUNTER(vgicd_reads,                "vgicd: read")
 PERFCOUNTER(vgicd_writes,               "vgicd: write")
diff --git a/xen/include/asm-arm/psci.h b/xen/include/asm-arm/psci.h
index 635ea5dae4..f7e2139031 100644
--- a/xen/include/asm-arm/psci.h
+++ b/xen/include/asm-arm/psci.h
@@ -37,9 +37,7 @@  int32_t do_psci_0_2_cpu_on(register_t target_cpu, register_t entry_point,
                        register_t context_id);
 int32_t do_psci_0_2_affinity_info(register_t target_affinity,
                               uint32_t lowest_affinity_level);
-int32_t do_psci_0_2_migrate(uint32_t target_cpu);
 uint32_t do_psci_0_2_migrate_info_type(void);
-register_t do_psci_0_2_migrate_info_up_cpu(void);
 void do_psci_0_2_system_off(void);
 void do_psci_0_2_system_reset(void);