All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Alistair Francis <alistair.francis@wdc.com>,
	Connor Davis <connojdavis@gmail.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Michal Orzel <michal.orzel@amd.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH for-4.22 v2 1/4] riscv/irq: define a per-arch irq_to_desc()
Date: Mon, 29 Jun 2026 12:01:09 +0200	[thread overview]
Message-ID: <d7abb999-2f68-495b-9d3f-2f7d672de537@gmail.com> (raw)
In-Reply-To: <20260629094531.55555-2-roger.pau@citrix.com>



On 6/29/26 11:45 AM, Roger Pau Monne wrote:
> RISCV declares irq_desc as a static array, opposed to x86 that uses a
> pointer allocated at boot time.  This creates issues when attempting to add
> an extern declaration for irq_desc, as asm/irq.h is included by xen/irq.h where
> the definition of struct irq_desc resides, and an empty forward declaration
> doesn't make the compiler happy because it doesn't know the type
> data-storage.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
>   xen/arch/riscv/include/asm/irq.h | 4 ++++
>   xen/arch/riscv/irq.c             | 5 +++++
>   2 files changed, 9 insertions(+)
> 
> diff --git a/xen/arch/riscv/include/asm/irq.h b/xen/arch/riscv/include/asm/irq.h
> index f633636dc308..b3e03117ac97 100644
> --- a/xen/arch/riscv/include/asm/irq.h
> +++ b/xen/arch/riscv/include/asm/irq.h
> @@ -35,6 +35,10 @@ struct arch_irq_desc {
>       unsigned int type;
>   };
>   
> +struct irq_desc;
> +struct irq_desc *irq_to_desc(unsigned int irq);
> +#define irq_to_desc irq_to_desc
> +
>   struct cpu_user_regs;
>   struct dt_device_node;
>   
> diff --git a/xen/arch/riscv/irq.c b/xen/arch/riscv/irq.c
> index 25d329500212..353e9246f15b 100644
> --- a/xen/arch/riscv/irq.c
> +++ b/xen/arch/riscv/irq.c
> @@ -19,6 +19,11 @@
>   
>   static irq_desc_t irq_desc[NR_IRQS];
>   
> +struct irq_desc *irq_to_desc(unsigned int irq)
> +{
> +    return &irq_desc[irq];
> +}
> +
>   static bool irq_validate_new_type(unsigned int curr, unsigned int new)
>   {
>       return curr == IRQ_TYPE_INVALID || curr == new;

Changes looks good to me.

There are similar changes in my dom0less enablement config for RISC-V 
but considering that likely this patch will be in staging faster then my 
patch series:
  Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
  Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Thanks.

~ Oleksii


  reply	other threads:[~2026-06-29 10:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29  9:45 [PATCH for-4.22 v2 0/4] ns16550: bound interrupt handler execution time Roger Pau Monne
2026-06-29  9:45 ` [PATCH for-4.22 v2 1/4] riscv/irq: define a per-arch irq_to_desc() Roger Pau Monne
2026-06-29 10:01   ` Oleksii Kurochko [this message]
2026-06-29 10:06   ` Jan Beulich
2026-06-29  9:45 ` [PATCH for-4.22 v2 2/4] xen/ppc: introduce a dummy irq_to_desc() Roger Pau Monne
2026-06-29 10:07   ` Jan Beulich
2026-06-29 10:09   ` Oleksii Kurochko
2026-06-29 14:26     ` Oleksii Kurochko
2026-06-29  9:45 ` [PATCH for-4.22 v2 3/4] xen/irq: handle IRQ being disabled while executing its handler Roger Pau Monne
2026-06-29 10:31   ` Jan Beulich
2026-06-29 14:29     ` Roger Pau Monné
2026-06-29 14:31       ` Jan Beulich
2026-06-29 13:37   ` Oleksii Kurochko
2026-06-29  9:45 ` [PATCH for-4.22 v2 4/4] char/ns16550: bound execution time of ns16550_interrupt() Roger Pau Monne
2026-06-29 10:39   ` Jan Beulich
2026-06-29 14:44     ` Roger Pau Monné
2026-06-29 13:49   ` Oleksii Kurochko

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=d7abb999-2f68-495b-9d3f-2f7d672de537@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=connojdavis@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.