qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Luc Michel" <luc.michel@amd.com>,
	qemu-stable@nongnu.org,
	"Francisco Iglesias" <francisco.iglesias@amd.com>,
	"Sai Pavan Boddu" <sai.pavan.boddu@amd.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Jason Wang" <jasowang@redhat.com>,
	qemu-arm@nongnu.org
Subject: [PULL 5/9] hw/net/cadence_gem: fix register mask initialization
Date: Tue, 29 Jul 2025 13:57:30 +0200	[thread overview]
Message-ID: <20250729115735.33619-6-philmd@linaro.org> (raw)
In-Reply-To: <20250729115735.33619-1-philmd@linaro.org>

From: Luc Michel <luc.michel@amd.com>

The gem_init_register_masks function was called at init time but it
relies on the num-priority-queues property. Call it at realize time
instead.

Cc: qemu-stable@nongnu.org
Fixes: 4c70e32f05f ("net: cadence_gem: Define access permission for interrupt registers")
Signed-off-by: Luc Michel <luc.michel@amd.com>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Sai Pavan Boddu <sai.pavan.boddu@amd.com>
Message-ID: <20250716095432.81923-2-luc.michel@amd.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/net/cadence_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index 50025d5a6f2..44446666deb 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -1756,6 +1756,7 @@ static void gem_realize(DeviceState *dev, Error **errp)
         sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->irq[i]);
     }
 
+    gem_init_register_masks(s);
     qemu_macaddr_default_if_unset(&s->conf.macaddr);
 
     s->nic = qemu_new_nic(&net_gem_info, &s->conf,
@@ -1776,7 +1777,6 @@ static void gem_init(Object *obj)
 
     DB_PRINT("\n");
 
-    gem_init_register_masks(s);
     memory_region_init_io(&s->iomem, OBJECT(s), &gem_ops, s,
                           "enet", sizeof(s->regs));
 
-- 
2.49.0



  parent reply	other threads:[~2025-07-29 11:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 11:57 [PULL 0/9] Misc HW patches for 2025-07-29 Philippe Mathieu-Daudé
2025-07-29 11:57 ` [PULL 1/9] target/mips: Only update MVPControl.EVP bit if executed by master VPE Philippe Mathieu-Daudé
2025-07-29 11:57 ` [PULL 2/9] hw/display/qxl-render: fix qxl_unpack_chunks() chunk size calculation Philippe Mathieu-Daudé
2025-07-29 11:57 ` [PULL 3/9] hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include Philippe Mathieu-Daudé
2025-07-29 11:57 ` [PULL 4/9] migration: rename target.c to vfio.c Philippe Mathieu-Daudé
2025-07-29 11:57 ` Philippe Mathieu-Daudé [this message]
2025-07-29 11:57 ` [PULL 6/9] hw/xen/passthrough: add missing error-report include Philippe Mathieu-Daudé
2025-07-29 11:57 ` [PULL 7/9] system/physmem: fix use-after-free with dispatch Philippe Mathieu-Daudé
2025-07-29 11:57 ` [PULL 8/9] roms/Makefile: fix npcmNxx_bootrom build rules Philippe Mathieu-Daudé
2025-07-29 11:57 ` [PULL 9/9] hw/display/sm501: fix missing error-report.h Philippe Mathieu-Daudé
2025-07-29 16:59 ` [PULL 0/9] Misc HW patches for 2025-07-29 Stefan Hajnoczi

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=20250729115735.33619-6-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@gmail.com \
    --cc=francisco.iglesias@amd.com \
    --cc=jasowang@redhat.com \
    --cc=luc.michel@amd.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=sai.pavan.boddu@amd.com \
    /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).