qemu-riscv.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "yang.zhang" <gaoshanliukou@163.com>
To: "Alistair Francis" <alistair23@gmail.com>
Cc: qemu-devel@nongnu.org, dbarboza@ventanamicro.com,
	bin.meng@windriver.com,  liwei1518@gmail.com,
	zhiwei_liu@linux.alibaba.com,  qemu-riscv@nongnu.org,
	"yang.zhang" <yang.zhang@hexintek.com>
Subject: Re:Re: [PATCH] hw/intc/riscv_aplic: APLICs should add child earlier than realize
Date: Thu, 25 Apr 2024 15:43:27 +0800 (CST)	[thread overview]
Message-ID: <74e9f44a.a02d.18f14359617.Coremail.gaoshanliukou@163.com> (raw)
In-Reply-To: <CAKmqyKM-0P+qbLZ0AB_NUOQEW5ypE8u=40ggi_=smtJjh8pYkg@mail.gmail.com>


At 2024-04-23 14:04:29, "Alistair Francis" <alistair23@gmail.com> wrote:
>On Tue, Apr 9, 2024 at 11:46 AM yang.zhang <gaoshanliukou@163.com> wrote:
>>
>> From: "yang.zhang" <yang.zhang@hexintek.com>
>>
>> Since only root APLICs can have hw IRQ lines, aplic->parent should
>> be initialized first.
>>
>> Fixes: e8f79343cf ("hw/intc: Add RISC-V AIA APLIC device emulation")
>> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
>> Signed-off-by: yang.zhang <yang.zhang@hexintek.com>
>
>Thanks!
>
>Applied to riscv-to-apply.next
>

>Alistair
Thanks.
>> ---
>>  hw/intc/riscv_aplic.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c
>> index fc5df0d598..32edd6d07b 100644
>> --- a/hw/intc/riscv_aplic.c
>> +++ b/hw/intc/riscv_aplic.c
>> @@ -1000,16 +1000,16 @@ DeviceState *riscv_aplic_create(hwaddr addr, hwaddr size,
>>      qdev_prop_set_bit(dev, "msimode", msimode);
>>      qdev_prop_set_bit(dev, "mmode", mmode);
>>
>> +    if (parent) {
>> +        riscv_aplic_add_child(parent, dev);
>> +    }
>> +
>>      sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>
>>      if (!is_kvm_aia(msimode)) {
>>          sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, addr);
>>      }
>>
>> -    if (parent) {
>> -        riscv_aplic_add_child(parent, dev);
>> -    }
>> -
>>      if (!msimode) {
>>          for (i = 0; i < num_harts; i++) {
>>              CPUState *cpu = cpu_by_arch_id(hartid_base + i);
>> --
>> 2.25.1
>>
>>

  reply	other threads:[~2024-04-25  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  1:44 [PATCH] hw/intc/riscv_aplic: APLICs should add child earlier than realize yang.zhang
2024-04-23  6:04 ` Alistair Francis
2024-04-25  7:43   ` yang.zhang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-07  3:46 yang.zhang
2024-04-08 22:33 ` Daniel Henrique Barboza
2024-04-09  1:46   ` yang.zhang

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=74e9f44a.a02d.18f14359617.Coremail.gaoshanliukou@163.com \
    --to=gaoshanliukou@163.com \
    --cc=alistair23@gmail.com \
    --cc=bin.meng@windriver.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=liwei1518@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=yang.zhang@hexintek.com \
    --cc=zhiwei_liu@linux.alibaba.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 read-only IMAP folder(s) and NNTP newsgroup(s).