From: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
To: Andrew Jones <ajones@ventanamicro.com>,
qemu-riscv@nongnu.org, qemu-devel@nongnu.org
Cc: palmer@dabbelt.com, alistair.francis@wdc.com, bmeng.cn@gmail.com,
liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com
Subject: Re: [PATCH] hw/riscv/virt: Comment absence of #msi-cells
Date: Wed, 25 Sep 2024 14:53:11 -0300 [thread overview]
Message-ID: <1ed85a7b-dbab-4fa5-bc98-24b46d1d9845@ventanamicro.com> (raw)
In-Reply-To: <20240925163908.215456-2-ajones@ventanamicro.com>
On 9/25/24 1:39 PM, Andrew Jones wrote:
> commit 6df664f87c73 ("Revert "hw/riscv/virt.c: imsics DT: add
> '#msi-cells'"") removed #msi-cells. Now that we have a Linux
> commit to reference add a comment explaining why it was removed
> to avoid it getting added back due to DT validation failures.
>
> Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
> ---
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> hw/riscv/virt.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
> index cef41c150aaf..4fd9c0edf038 100644
> --- a/hw/riscv/virt.c
> +++ b/hw/riscv/virt.c
> @@ -552,6 +552,16 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr,
> FDT_IMSIC_INT_CELLS);
> qemu_fdt_setprop(ms->fdt, imsic_name, "interrupt-controller", NULL, 0);
> qemu_fdt_setprop(ms->fdt, imsic_name, "msi-controller", NULL, 0);
> + /*
> + * Per the DT binding, we should also add #msi-cells with a value of zero.
> + * But, Linux which does not include commit db8e81132cf0 ("of/irq: Support
> + * #msi-cells=<0> in of_msi_get_domain") does not properly handle #msi-cells
> + * with a value of zero. For this reason, the property has intentionally
> + * been left out. It's harmless to not add it since the absence of the
> + * property and a value of zero for the property mean the same thing.
> + * However, since the DT binding requires the property, DT validation may
> + * fail.
> + */
> qemu_fdt_setprop(ms->fdt, imsic_name, "interrupts-extended",
> imsic_cells, ms->smp.cpus * sizeof(uint32_t) * 2);
> qemu_fdt_setprop(ms->fdt, imsic_name, "reg", imsic_regs,
prev parent reply other threads:[~2024-09-25 17:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 16:39 [PATCH] hw/riscv/virt: Comment absence of #msi-cells Andrew Jones
2024-09-25 17:53 ` Daniel Henrique Barboza [this message]
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=1ed85a7b-dbab-4fa5-bc98-24b46d1d9845@ventanamicro.com \
--to=dbarboza@ventanamicro.com \
--cc=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=bmeng.cn@gmail.com \
--cc=liwei1518@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--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 NNTP newsgroup(s).