From: Frederic Barrat <fbarrat@linux.ibm.com>
To: "Joel Stanley" <joel@jms.id.au>,
"Cédric Le Goater" <clg@kaod.org>,
"Nicholas Piggin" <npiggin@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [PATCH v2 1/5] ppc/pnv: quad xscom callbacks are P9 specific
Date: Tue, 4 Jul 2023 11:59:32 +0200 [thread overview]
Message-ID: <96ee32ed-56d5-1e0b-9eeb-3ce130800b10@linux.ibm.com> (raw)
In-Reply-To: <20230704054204.168547-2-joel@jms.id.au>
On 04/07/2023 07:42, Joel Stanley wrote:
> Rename the functions to include P9 in the name in preparation for adding
> P10 versions.
>
> Correct the unimp read message while we're changing the function.
>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
> v2: Fix unimp print, and grammar in the commit message
> ---
> hw/ppc/pnv_core.c | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
> index 0bc3ad41c81c..0f451b3b6e1f 100644
> --- a/hw/ppc/pnv_core.c
> +++ b/hw/ppc/pnv_core.c
> @@ -360,8 +360,8 @@ DEFINE_TYPES(pnv_core_infos)
>
> #define P9X_EX_NCU_SPEC_BAR 0x11010
>
> -static uint64_t pnv_quad_xscom_read(void *opaque, hwaddr addr,
> - unsigned int width)
> +static uint64_t pnv_quad_power9_xscom_read(void *opaque, hwaddr addr,
> + unsigned int width)
> {
> uint32_t offset = addr >> 3;
> uint64_t val = -1;
> @@ -372,15 +372,15 @@ static uint64_t pnv_quad_xscom_read(void *opaque, hwaddr addr,
> val = 0;
> break;
> default:
> - qemu_log_mask(LOG_UNIMP, "%s: writing @0x%08x\n", __func__,
> + qemu_log_mask(LOG_UNIMP, "%s: reading @0x%08x\n", __func__,
> offset);
> }
>
> return val;
> }
>
> -static void pnv_quad_xscom_write(void *opaque, hwaddr addr, uint64_t val,
> - unsigned int width)
> +static void pnv_quad_power9_xscom_write(void *opaque, hwaddr addr, uint64_t val,
> + unsigned int width)
> {
> uint32_t offset = addr >> 3;
>
> @@ -394,9 +394,9 @@ static void pnv_quad_xscom_write(void *opaque, hwaddr addr, uint64_t val,
> }
> }
>
> -static const MemoryRegionOps pnv_quad_xscom_ops = {
> - .read = pnv_quad_xscom_read,
> - .write = pnv_quad_xscom_write,
> +static const MemoryRegionOps pnv_quad_power9_xscom_ops = {
> + .read = pnv_quad_power9_xscom_read,
> + .write = pnv_quad_power9_xscom_write,
> .valid.min_access_size = 8,
> .valid.max_access_size = 8,
> .impl.min_access_size = 8,
> @@ -410,7 +410,8 @@ static void pnv_quad_realize(DeviceState *dev, Error **errp)
> char name[32];
>
> snprintf(name, sizeof(name), "xscom-quad.%d", eq->quad_id);
> - pnv_xscom_region_init(&eq->xscom_regs, OBJECT(dev), &pnv_quad_xscom_ops,
> + pnv_xscom_region_init(&eq->xscom_regs, OBJECT(dev),
> + &pnv_quad_power9_xscom_ops,
> eq, name, PNV9_XSCOM_EQ_SIZE);
> }
>
next prev parent reply other threads:[~2023-07-04 10:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 5:41 [PATCH v2 0/5] ppc/pnv: Extend "quad" model for p10 Joel Stanley
2023-07-04 5:42 ` [PATCH v2 1/5] ppc/pnv: quad xscom callbacks are P9 specific Joel Stanley
2023-07-04 9:59 ` Frederic Barrat [this message]
2023-07-04 5:42 ` [PATCH v2 2/5] ppc/pnv: Subclass quad xscom callbacks Joel Stanley
2023-07-04 9:59 ` Frederic Barrat
2023-07-04 5:42 ` [PATCH v2 3/5] ppc/pnv: Add P10 quad xscom model Joel Stanley
2023-07-04 6:55 ` Cédric Le Goater
2023-07-04 10:11 ` Frederic Barrat
2023-07-04 5:42 ` [PATCH v2 4/5] ppc/pnv: Add P10 core " Joel Stanley
2023-07-04 6:55 ` Cédric Le Goater
2023-07-04 10:12 ` Frederic Barrat
2023-07-04 5:42 ` [PATCH v2 5/5] ppc/pnv: Return zero for core thread state xscom Joel Stanley
2023-07-04 10:12 ` Frederic Barrat
2023-07-04 23:12 ` [PATCH v2 0/5] ppc/pnv: Extend "quad" model for p10 Daniel Henrique Barboza
2023-07-05 1:15 ` Nicholas Piggin
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=96ee32ed-56d5-1e0b-9eeb-3ce130800b10@linux.ibm.com \
--to=fbarrat@linux.ibm.com \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=npiggin@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).