All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	kvm@vger.kernel.org, "Nicholas Piggin" <npiggin@gmail.com>
Subject: Re: [PATCH v3 3/6] target/ppc: Move CPU QOM definitions to cpu-qom.h
Date: Wed, 28 Jun 2023 17:05:31 +0200	[thread overview]
Message-ID: <20230628170531.09d2e648@bahia> (raw)
In-Reply-To: <20230627115124.19632-4-philmd@linaro.org>

On Tue, 27 Jun 2023 13:51:21 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/ppc/cpu-qom.h | 5 +++++
>  target/ppc/cpu.h     | 6 ------
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
> index 9666f54f65..c2bff349cc 100644
> --- a/target/ppc/cpu-qom.h
> +++ b/target/ppc/cpu-qom.h
> @@ -31,6 +31,11 @@
>  
>  OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU)
>  
> +#define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU
> +#define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX
> +#define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU
> +#define cpu_list ppc_cpu_list
> +
>  ObjectClass *ppc_cpu_class_by_name(const char *name);
>  
>  typedef struct CPUArchState CPUPPCState;
> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> index af12c93ebc..e91e1774e5 100644
> --- a/target/ppc/cpu.h
> +++ b/target/ppc/cpu.h
> @@ -1468,12 +1468,6 @@ static inline uint64_t ppc_dump_gpr(CPUPPCState *env, int gprn)
>  int ppc_dcr_read(ppc_dcr_t *dcr_env, int dcrn, uint32_t *valp);
>  int ppc_dcr_write(ppc_dcr_t *dcr_env, int dcrn, uint32_t val);
>  
> -#define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU
> -#define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX
> -#define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU
> -

These seem appropriate to be moved to "cpu-qom.h".

> -#define cpu_list ppc_cpu_list

This one is much older according to git blame :

c913706581460 target/ppc/cpu.h (Igor Mammedov                 2017-08-30 1469) #define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU
c913706581460 target/ppc/cpu.h (Igor Mammedov                 2017-08-30 1470) #define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX
0dacec874fa3b target/ppc/cpu.h (Igor Mammedov                 2018-02-07 1471) #define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU
c913706581460 target/ppc/cpu.h (Igor Mammedov                 2017-08-30 1472) 
c732abe222795 target-ppc/cpu.h (Jocelyn Mayer                 2007-10-12 1473) #define cpu_list ppc_cpu_list

It is some plumbing used for `-cpu help`, not exactly QOM stuff.
Maybe keep it in "cpu.h" as all other targets do ?

> -
>  /* MMU modes definitions */
>  #define MMU_USER_IDX 0
>  static inline int cpu_mmu_index(CPUPPCState *env, bool ifetch)



-- 
Greg


  reply	other threads:[~2023-06-28 15:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 11:51 [PATCH v3 0/6] target/ppc: Few cleanups in kvm_ppc.h Philippe Mathieu-Daudé
2023-06-27 11:51 ` [PATCH v3 1/6] target/ppc: Have 'kvm_ppc.h' include 'sysemu/kvm.h' Philippe Mathieu-Daudé
2023-06-28 14:09   ` Greg Kurz
2023-06-29  5:03   ` Cédric Le Goater
2023-06-27 11:51 ` [PATCH v3 2/6] target/ppc: Reorder #ifdef'ry in kvm_ppc.h Philippe Mathieu-Daudé
2023-06-28 14:32   ` Greg Kurz
2023-06-29  5:03   ` Cédric Le Goater
2023-06-27 11:51 ` [PATCH v3 3/6] target/ppc: Move CPU QOM definitions to cpu-qom.h Philippe Mathieu-Daudé
2023-06-28 15:05   ` Greg Kurz [this message]
2023-06-30 14:06     ` Daniel Henrique Barboza
2023-06-29  5:03   ` Cédric Le Goater
2023-06-27 11:51 ` [PATCH v3 4/6] target/ppc: Define TYPE_HOST_POWERPC_CPU in cpu-qom.h Philippe Mathieu-Daudé
2023-06-29  5:06   ` Cédric Le Goater
2023-06-29  6:36   ` Greg Kurz
2023-06-27 11:51 ` [PATCH v3 5/6] target/ppc: Restrict 'kvm_ppc.h' to sysemu in cpu_init.c Philippe Mathieu-Daudé
2023-06-29  5:06   ` Cédric Le Goater
2023-06-29  6:36   ` Greg Kurz
2023-06-27 11:51 ` [PATCH v3 6/6] target/ppc: Remove pointless checks of CONFIG_USER_ONLY in 'kvm_ppc.h' Philippe Mathieu-Daudé
2023-06-29  5:10   ` Cédric Le Goater
2023-06-29  6:37   ` Greg Kurz
2023-07-07  7:24 ` [PATCH v3 0/6] target/ppc: Few cleanups in kvm_ppc.h Daniel Henrique Barboza
2023-07-07  8:11   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230628170531.09d2e648@bahia \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=kvm@vger.kernel.org \
    --cc=npiggin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.