[PATCH 2/7] target/ppc: Define powerpc_pm_insn_t in 'internal.h'

Philippe Mathieu-Daudé posted 7 patches 2 years, 4 months ago
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Harsh Prateek Bora <harshpb@linux.ibm.com>
[PATCH 2/7] target/ppc: Define powerpc_pm_insn_t in 'internal.h'
Posted by Philippe Mathieu-Daudé 2 years, 4 months ago
PM instructions are only used by TCG helpers. No need to
expose to other hardware.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/ppc/cpu-qom.h  | 10 ----------
 target/ppc/internal.h |  9 +++++++++
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
index b5deef5ca5..b86fd46d25 100644
--- a/target/ppc/cpu-qom.h
+++ b/target/ppc/cpu-qom.h
@@ -115,16 +115,6 @@ enum powerpc_excp_t {
     POWERPC_EXCP_POWER10,
 };
 
-/*****************************************************************************/
-/* PM instructions */
-typedef enum {
-    PPC_PM_DOZE,
-    PPC_PM_NAP,
-    PPC_PM_SLEEP,
-    PPC_PM_RVWINKLE,
-    PPC_PM_STOP,
-} powerpc_pm_insn_t;
-
 /*****************************************************************************/
 /* Input pins model                                                          */
 typedef enum powerpc_input_t powerpc_input_t;
diff --git a/target/ppc/internal.h b/target/ppc/internal.h
index c881c67a8b..5b20ecbd33 100644
--- a/target/ppc/internal.h
+++ b/target/ppc/internal.h
@@ -20,6 +20,15 @@
 
 #include "hw/registerfields.h"
 
+/* PM instructions */
+typedef enum {
+    PPC_PM_DOZE,
+    PPC_PM_NAP,
+    PPC_PM_SLEEP,
+    PPC_PM_RVWINKLE,
+    PPC_PM_STOP,
+} powerpc_pm_insn_t;
+
 #define FUNC_MASK(name, ret_type, size, max_val)                  \
 static inline ret_type name(uint##size##_t start,                 \
                               uint##size##_t end)                 \
-- 
2.41.0


Re: [PATCH 2/7] target/ppc: Define powerpc_pm_insn_t in 'internal.h'
Posted by Cédric Le Goater 2 years, 4 months ago
On 10/13/23 14:56, Philippe Mathieu-Daudé wrote:
> PM instructions are only used by TCG helpers. No need to
> expose to other hardware.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.


> ---
>   target/ppc/cpu-qom.h  | 10 ----------
>   target/ppc/internal.h |  9 +++++++++
>   2 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
> index b5deef5ca5..b86fd46d25 100644
> --- a/target/ppc/cpu-qom.h
> +++ b/target/ppc/cpu-qom.h
> @@ -115,16 +115,6 @@ enum powerpc_excp_t {
>       POWERPC_EXCP_POWER10,
>   };
>   
> -/*****************************************************************************/
> -/* PM instructions */
> -typedef enum {
> -    PPC_PM_DOZE,
> -    PPC_PM_NAP,
> -    PPC_PM_SLEEP,
> -    PPC_PM_RVWINKLE,
> -    PPC_PM_STOP,
> -} powerpc_pm_insn_t;
> -
>   /*****************************************************************************/
>   /* Input pins model                                                          */
>   typedef enum powerpc_input_t powerpc_input_t;
> diff --git a/target/ppc/internal.h b/target/ppc/internal.h
> index c881c67a8b..5b20ecbd33 100644
> --- a/target/ppc/internal.h
> +++ b/target/ppc/internal.h
> @@ -20,6 +20,15 @@
>   
>   #include "hw/registerfields.h"
>   
> +/* PM instructions */
> +typedef enum {
> +    PPC_PM_DOZE,
> +    PPC_PM_NAP,
> +    PPC_PM_SLEEP,
> +    PPC_PM_RVWINKLE,
> +    PPC_PM_STOP,
> +} powerpc_pm_insn_t;
> +
>   #define FUNC_MASK(name, ret_type, size, max_val)                  \
>   static inline ret_type name(uint##size##_t start,                 \
>                                 uint##size##_t end)                 \


Re: [PATCH 2/7] target/ppc: Define powerpc_pm_insn_t in 'internal.h'
Posted by Richard Henderson 2 years, 4 months ago
On 10/13/23 05:56, Philippe Mathieu-Daudé wrote:
> PM instructions are only used by TCG helpers. No need to
> expose to other hardware.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/ppc/cpu-qom.h  | 10 ----------
>   target/ppc/internal.h |  9 +++++++++
>   2 files changed, 9 insertions(+), 10 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~