Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Anup Patel" <anup.patel@oss.qualcomm.com>
Cc: linux-clk@vger.kernel.org
Subject: Re: [PATCH v3 1/5] RISC-V: Move common MPXY helper routines to arch/riscv
Date: Fri, 04 Dec 2026 11:47:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-249718@kernel.org> (raw)
In-Reply-To: <20261204111504.3362889-2-anup.patel@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] riscv: incomplete sbi_mpxy_notification_data under
  !CONFIG_RISCV_SBI
--

commit 5bd5847f95f6e9d63b1019e2427257b59d50c5e4
Author: Anup Patel <anup.patel@oss.qualcomm.com>

RISC-V: Move common MPXY helper routines to arch/riscv

This commit moves the SBI MPXY helper routines and per-CPU shared memory
management from the SBI MPXY mailbox driver into arch/riscv so other
in-kernel callers can use them directly.

> diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h
> index fd6266a7b3395..1ba1f66af02ce 100644
> --- a/arch/riscv/include/asm/sbi.h
> +++ b/arch/riscv/include/asm/sbi.h
> @@ -693,6 +693,37 @@ static inline int sbi_fwft_set_online_cpus(u32 feature, unsigned long value,
>  	return sbi_fwft_set_cpumask(cpu_online_mask, feature, value, flags);
>  }
>  
> +/* SBI MPXY notification data in shared memory */
> +struct sbi_mpxy_notification_data {
> +	/* Remaining number of notification events */
> +	__le32 remaining;
> +	/* Number of notification events returned */
> +	__le32 returned;
> +	/* Number of notification events lost */
> +	__le32 lost;
> +	/* Reserved for future use */
> +	__le32 reserved;
> +	/* Returned channel id array */
> +	u8 events_data[];
> +};

[ ... ]

> @@ -754,7 +785,60 @@ int sbi_debug_console_read(char *bytes, unsigned int num_bytes);
>  
>  #else /* CONFIG_RISCV_SBI */
>  static inline int sbi_remote_fence_i(const struct cpumask *cpu_mask) { return -1; }
> -static inline void sbi_init(void) {}
> +static inline void sbi_init(void)
> +{
> +}
> +
> +struct sbi_mpxy_notification_data;

[Severity: Low]
Should struct sbi_mpxy_notification_data be defined outside
CONFIG_RISCV_SBI?

With only a forward declaration here, a caller of the
sbi_mpxy_get_notifications() stub built with CONFIG_RISCV_SBI=n that
accesses its fields or takes sizeof(*notif_data) will fail to compile
with an incomplete type error.

Since the struct only uses __le32 and u8 from linux/types.h, moving its
definition outside #ifdef CONFIG_RISCV_SBI makes the stub usable.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204111504.3362889-1-anup.patel@oss.qualcomm.com?part=1

  reply	other threads:[~2026-12-04 11:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 11:14 [PATCH v3 0/5] Parallel message send using SBI MPXY Anup Patel
2026-12-04 11:15 ` [PATCH v3 1/5] RISC-V: Move common MPXY helper routines to arch/riscv Anup Patel
2026-12-04 11:47   ` sashiko-bot [this message]
2026-12-04 11:15 ` [PATCH v3 2/5] RISC-V: Prevent interrupt when accessing MPXY shared memory Anup Patel
2026-12-04 12:06   ` sashiko-bot
2026-12-04 11:15 ` [PATCH v3 3/5] mailbox: add direct synchronous transmit API Anup Patel
2026-12-04 12:26   ` sashiko-bot
2026-12-04 11:15 ` [PATCH v3 4/5] mailbox: document direct synchronous transmit Anup Patel
2026-12-04 12:34   ` sashiko-bot
2026-12-04 11:15 ` [PATCH v3 5/5] mailbox: convert RISC-V SBI MPXY to direct transmit Anup Patel
2026-12-04 13:30   ` sashiko-bot

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=sashiko-outbox-249718@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=anup.patel@oss.qualcomm.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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