From: sashiko-bot@kernel.org
To: "Matt Turner" <mattst88@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 3/7] alpha: marvel: refresh environmental readings through the console
Date: Tue, 17 Nov 2026 03:08:09 +0000 [thread overview]
Message-ID: <sashiko-outbox-218125@kernel.org> (raw)
In-Reply-To: <20261116-marvel-env-v2-3-ef614eb2e7f1@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] alpha: marvel: undeclared srmcons_callback_lock when
CONFIG_TTY=n
--
commit ce2f678797ff92f9dca251780105ce8fac08a93f
Author: Matt Turner <mattst88@gmail.com>
alpha: marvel: refresh environmental readings through the console
This commit adds the CCB_CFGTREE SRM console callback and
marvel_cfgtree_partial_update() to refresh GCT environmental sensor
readings on the boot CPU while holding srmcons_callback_lock.
> diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
> index 92e3312e786ed..7525f3ed6b626 100644
> --- a/arch/alpha/kernel/core_marvel.c
> +++ b/arch/alpha/kernel/core_marvel.c
[ ... ]
> @@ -1094,3 +1097,45 @@ marvel_agp_info(void)
>
> return agp;
> }
> +
> +/*
> + * The console refreshes the environmental packets of a GCT node through
> + * config tree callback function 0x1f, returning -26 while it is busy. The
> + * callback runs for up to 300 ms with interrupts disabled. Hold the console
> + * callback lock: a concurrent callback from another CPU, such as SRM console
> + * output, kills that CPU. Make the call on the boot CPU, as Tru64 UNIX does
> + * for its config tree callbacks; the PAL TOY calls also work only there.
> + */
> +#define CFGTREE_PARTIAL_UPDATE 0x1f
> +#define CFGTREE_BUSY (-26)
> +
> +static long marvel_cfgtree_partial_update_local(void *arg)
> +{
> + unsigned long flags;
> + long status;
> +
> + spin_lock_irqsave(&srmcons_callback_lock, flags);
> + status = callback_cfgtree(CFGTREE_PARTIAL_UPDATE, (unsigned long)arg,
> + 0, 0, 0);
> + spin_unlock_irqrestore(&srmcons_callback_lock, flags);
> +
> + return status;
> +}
[ ... ]
> diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
> index c418333d0b89d..b54f4fd69a0fb 100644
> --- a/arch/alpha/kernel/proto.h
> +++ b/arch/alpha/kernel/proto.h
> @@ -112,6 +112,7 @@ extern struct screen_info vgacon_screen_info;
>
> /* srmcons.c */
> #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
> +extern spinlock_t srmcons_callback_lock;
> extern void register_srm_console(void);
> extern void unregister_srm_console(void);
> #else
[Severity: Medium]
Does this break the build when CONFIG_ALPHA_MARVEL=y and CONFIG_TTY=n?
In arch/alpha/Kconfig, ALPHA_SRM and ALPHA_GENERIC both depend on TTY,
whereas ALPHA_MARVEL does not. When CONFIG_TTY is disabled,
CONFIG_ALPHA_SRM is not enabled, so srmcons.o is not built and
srmcons_callback_lock is neither declared in proto.h nor defined, causing
marvel_cfgtree_partial_update_local() to fail to compile with an
undeclared identifier error.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-marvel-env-v2-0-ef614eb2e7f1@gmail.com?part=3
next prev parent reply other threads:[~2026-11-17 3:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 2:59 [PATCH v2 0/7] alpha: marvel: environmental sensors Matt Turner
2026-11-17 2:59 ` [PATCH v2 1/7] alpha: marvel: fix the environmental subpacket layout Matt Turner
2026-11-17 3:06 ` sashiko-bot
2026-11-17 2:59 ` [PATCH v2 2/7] alpha: marvel: report environmental events without VERBOSE_MCHECK Matt Turner
2026-11-17 3:03 ` sashiko-bot
2026-11-17 2:59 ` [PATCH v2 3/7] alpha: marvel: refresh environmental readings through the console Matt Turner
2026-11-17 3:08 ` sashiko-bot [this message]
2026-11-17 2:59 ` [PATCH v2 4/7] alpha: marvel: notify environmental events Matt Turner
2026-11-17 3:05 ` sashiko-bot
2026-11-17 2:59 ` [PATCH v2 5/7] alpha: marvel: register a platform device for the environmental sensors Matt Turner
2026-11-17 3:04 ` sashiko-bot
2026-11-17 2:59 ` [PATCH v2 6/7] hwmon: Add driver for Marvel AlphaServer " Matt Turner
2026-11-17 3:09 ` sashiko-bot
2026-11-17 2:59 ` [PATCH v2 7/7] hwmon: (marvel-env) Notify userspace of environmental events Matt Turner
2026-11-17 3:09 ` 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-218125@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=mattst88@gmail.com \
--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