From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: gaosong <gaosong@loongson.cn>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
qemu-devel@nongnu.org
Cc: "Huacai Chen" <chenhuacai@kernel.org>,
maobibo <maobibo@loongson.cn>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 0/2] hw/intc/loongson_ipi: Fix for LoongArch
Date: Thu, 27 Jun 2024 14:55:12 +0200 [thread overview]
Message-ID: <c90d62bc-7a48-4cd5-b8fa-42257327eff4@linaro.org> (raw)
In-Reply-To: <0e42f372-26b8-b94a-80bb-6403062d2f1a@loongson.cn>
On 27/6/24 14:13, gaosong wrote:
>
>
> 在 2024/6/27 下午2:38, Philippe Mathieu-Daudé 写道:
>> On 27/6/24 06:13, Jiaxun Yang wrote:
>>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>> ---
>>> Jiaxun Yang (2):
>>> hw/intc/loongson_ipi: Gate MMIO regions creation with property
>>> MAINTAINERS: Add myself as a reviewer of LoongArch virt machine
>>
>> Maybe s/has-mmio/use-mmio/? Otherwise series:
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>
> Hi,
>
> If we had done a simple test, we should have found the following
> problem, but obviously we didn't .
>
> root@loongson-KVM:~/work/code/clean/github/qemu# . /kernel.sh
> Unexpected error in object_property_find_err() at . /qom/object.c:1357.
> qemu-system-loongarch64: Property 'loongson_ipi.unnamed-gpio-out[0]' not
> found
> . /kernel.sh: line 16: 117708 Aborted (core dumped) .
> /build/qemu-system-loongarch64 -machine virt -m 8G -cpu la464 -smp 8
> -kernel ~/vmlinux -initrd ramdisk -serial stdio -monitor
> telnet:localhost. 4418,server,nowait -net nic -net user -device
> virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device
> usb-tablet,id=tablet,bus=xhci.0, port=1 -device
> usb-tablet,id=tablet,bus=xhci.0, -device usb-tablet,id=tablet,bus=xhci.
> port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 -append
> "root=/dev/ram rdinit=/sbin/init console=ttyS0,115200
> earlycon=uart,mmio. 0x1fe001e0" --nographic
Works for me squashing:
-- >8 --
diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c
index 6e92a50349..ce845aecda 100644
--- a/hw/intc/loongson_ipi.c
+++ b/hw/intc/loongson_ipi.c
@@ -305,18 +305,18 @@ static void loongson_ipi_realize(DeviceState *dev,
Error **errp)
return;
}
- if (s->has_mmio) {
- for (i = 0; i < s->num_cpu; i++) {
- s->cpu[i].ipi = s;
+ for (i = 0; i < s->num_cpu; i++) {
+ s->cpu[i].ipi = s;
+ qdev_init_gpio_out(dev, &s->cpu[i].irq, 1);
+
+ if (s->has_mmio) {
+ g_autofree char *name =
g_strdup_printf("loongson_ipi_cpu%d_mmio", i);
s->cpu[i].ipi_mmio_mem = g_new0(MemoryRegion, 1);
- g_autofree char *name =
- g_strdup_printf("loongson_ipi_cpu%d_mmio", i);
memory_region_init_io(s->cpu[i].ipi_mmio_mem, OBJECT(dev),
&loongson_ipi_core_ops, &s->cpu[i],
name, 0x48);
sysbus_init_mmio(sbd, s->cpu[i].ipi_mmio_mem);
- qdev_init_gpio_out(dev, &s->cpu[i].irq, 1);
}
}
}
---
next prev parent reply other threads:[~2024-06-27 12:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 4:13 [PATCH 0/2] hw/intc/loongson_ipi: Fix for LoongArch Jiaxun Yang
2024-06-27 4:13 ` [PATCH 1/2] hw/intc/loongson_ipi: Gate MMIO regions creation with property Jiaxun Yang
2024-06-27 4:13 ` [PATCH 2/2] MAINTAINERS: Add myself as a reviewer of LoongArch virt machine Jiaxun Yang
2024-07-11 3:41 ` gaosong
2024-06-27 6:38 ` [PATCH 0/2] hw/intc/loongson_ipi: Fix for LoongArch Philippe Mathieu-Daudé
2024-06-27 12:13 ` gaosong
2024-06-27 12:55 ` Philippe Mathieu-Daudé [this message]
2024-06-27 15:12 ` Jiaxun Yang
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=c90d62bc-7a48-4cd5-b8fa-42257327eff4@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=chenhuacai@kernel.org \
--cc=gaosong@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=maobibo@loongson.cn \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).