All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] target-ppc: Add pvr_match() callback
Date: Thu, 03 Jul 2014 15:54:47 +0200	[thread overview]
Message-ID: <53B560A7.9020403@suse.de> (raw)
In-Reply-To: <1404394327-21481-1-git-send-email-aik@ozlabs.ru>


On 03.07.14 15:32, Alexey Kardashevskiy wrote:
> So far it was enough to have a base PVR value and mask per CPU
> family such as POWER7 or POWER8. However there CPUs which are
> completely architecturally compatible but have different PVRs such
> as POWER7/POWER7+ and POWER8/POWER8E. For these CPUs, top 16 bits
> are CPU family and low 16 bits are the version. The families have
> PVR base values different enough so defining a mask which
> would cover both (or potentially more) CPUs within the family is
> not possible.
>
> This adds a pvr_match() callback to PowerPCCPUClass. The default
> handler simply compares PVR defined in the class.
>
> This implements ppc_pvr_match_power7/ppc_pvr_match_power8 callbacks
> for POWER7/8 families. These check for POWER7/POWER7+ and POWER8/POWER8E.
>
> This changes ppc_cpu_compare_class_pvr_mask() not to check masks but
> use the pvr_match() callback.
>
> Since all server CPUs use the same mask, this defines one mask
> value - CPU_POWERPC_POWER_SERVER_MASK - which is used everywhere now.
> This removes other mask definitions.
>
> This removes pvr_mask from PowerPCCPUClass as it is not used anymore.
> This removes pvr initialization for POWER7/8 families as it is not used
> to find the class, the pvr_match() callback is used instead.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> Changes:
> v2:
> * do not check pvr_match==NULL as it is always define for PPC
> ---
>   target-ppc/cpu-models.c     |  1 -
>   target-ppc/cpu-models.h     |  5 +----
>   target-ppc/cpu-qom.h        |  2 +-
>   target-ppc/translate_init.c | 49 ++++++++++++++++++++++++++++++++-------------
>   4 files changed, 37 insertions(+), 20 deletions(-)
>
> diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c
> index 9a91af9..c9112e9 100644
> --- a/target-ppc/cpu-models.c
> +++ b/target-ppc/cpu-models.c
> @@ -44,7 +44,6 @@
>           PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);                       \
>                                                                               \
>           pcc->pvr          = _pvr;                                           \
> -        pcc->pvr_mask     = CPU_POWERPC_DEFAULT_MASK;                       \

I still don't see you removing the definition of CPU_POWERPC_DEFAULT_MASK.


Alex

  reply	other threads:[~2014-07-03 13:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 14:30 [Qemu-devel] [PATCH 0/2] target-ppc: Merge POWER7+ to POWER7 and POWER8E to POWER8 Alexey Kardashevskiy
2014-06-30 14:30 ` [Qemu-devel] [PATCH 1/2] target-ppc: Add pvr_match() callback Alexey Kardashevskiy
2014-07-03 12:44   ` Alexander Graf
2014-07-03 13:32     ` [Qemu-devel] [PATCH v2] " Alexey Kardashevskiy
2014-07-03 13:54       ` Alexander Graf [this message]
2014-07-03 14:48         ` [Qemu-devel] [PATCH v3] " Alexey Kardashevskiy
2014-06-30 14:30 ` [Qemu-devel] [PATCH 2/2] target-ppc: Remove POWER7+ and POWER8E families Alexey Kardashevskiy
2014-07-03 12:46 ` [Qemu-devel] [PATCH 0/2] target-ppc: Merge POWER7+ to POWER7 and POWER8E to POWER8 Alexander Graf
2014-07-03 14:53 ` Alexander Graf

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=53B560A7.9020403@suse.de \
    --to=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --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.