All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
To: Casey Connolly <casey.connolly@linaro.org>,
	Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.u-boot-project.org,
	Sumit Garg <sumit.garg@kernel.org>,
	u-boot-qcom@groups.io,
	Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Johan Jonker <jbx6244@gmail.com>,
	Tien Fong Chee <tien.fong.chee@altera.com>,
	Michael Srba <Michael.Srba@seznam.cz>,
	Sumit Garg <sumit.garg@oss.qualcomm.com>,
	Aswin Murugan <aswin.murugan@oss.qualcomm.com>,
	Simon Glass <sjg@chromium.org>,
	Hongyang Zhao <hongyang.zhao@thundersoft.com>
Subject: Re: [PATCH v9 2/8] arm: snapdragon: Guard PSCI functions with CONFIG_ARM_SMCCC
Date: Thu, 12 Nov 2026 12:19:52 +0530	[thread overview]
Message-ID: <48b70a35-e65e-4cfd-b830-911874c45f4b@oss.qualcomm.com> (raw)
In-Reply-To: <fbc41e04-88de-4ac7-8267-dba976929fff@linaro.org>

Hi Casey,

On 11/6/2026 10:15 PM, Casey Connolly wrote:
>
> On 21/10/2026 19:35, Tom Rini wrote:
>> On Wed, Oct 21, 2026 at 09:48:21PM +0530, Balaji Selvanathan wrote:
>>
>>> In snagboot mode, U-Boot is loaded directly by XBL without PSCI
>>> firmware support. The functions show_psci_version() and
>>> qcom_psci_fixup() call arm_smccc_smc() which is unavailable when
>>> CONFIG_ARM_SMCCC is disabled, causing build failures.
>>>
>>> Hence, added CONFIG_ARM_SMCCC guards to both functions.
>>>
>>> Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
>>> ---
>>> Changes in v7:
>>> - No changes
>>>
>>> Changes in v5:
>>> - No changes
>>>
>>> Changes in v4:
>>> - No changes
>>>
>>> Changes in v3:
>>> - Added CONFIG_ARM_SMCCC guards
>>>
>>> Changes in v2:
>>> - Newly introduced in v2
>>> ---
>>>   arch/arm/mach-snapdragon/board.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
>>> index 87adb100edd..daee2ed4fa0 100644
>>> --- a/arch/arm/mach-snapdragon/board.c
>>> +++ b/arch/arm/mach-snapdragon/board.c
>>> @@ -35,6 +35,9 @@ static void show_psci_version(void)
>>>   {
>>>   	struct arm_smccc_res res;
>>>   
>>> +	if (!IS_ENABLED(CONFIG_ARM_SMCCC))
>>> +		return;
>>> +
>>>   	arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res);
>>>   
>>>   	/* Some older SoCs like MSM8916 don't always support PSCI */
>>> @@ -58,6 +61,9 @@ static void qcom_psci_fixup(void *fdt)
>>>   	int offset, ret;
>>>   	struct arm_smccc_res res;
>>>   
>>> +	if (!IS_ENABLED(CONFIG_ARM_SMCCC))
>>> +		return;
>>> +
>>>   	arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res);
>>>   
>>>   	if ((int)res.a0 != PSCI_RET_NOT_SUPPORTED)
>>>
>> Do we even need this, patch 1 of the series disables SYSRESET_PSCI when
>> you're doing this special snagboot mode so we shouldn't be calling
>> show_psci_version at all.
> Somehow this show_psci_version() function has managed to stick around
> mach-snapdragon since before I took over, I'm not sure why it's here, it
> can certainly be dropped.
>
> The second hunk unfortunately seems necessary still.>

We moved to v10 for this series: 
https://lore.kernel.org/u-boot/20261101-snagboot-v10-0-e73d5cfedb8a@oss.qualcomm.com/

In v10, this patch is removed as SYSRESET_PSCI is disabled if 
QCOM_SNAGBOOT_MODE is enabled (in patch1), so psci functions will not 
execute.

Thanks,

Balaji

>

  reply	other threads:[~2026-11-12  6:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 16:18 [PATCH v9 0/8] arm: snapdragon: Add snagboot support for Lemans-EVK Balaji Selvanathan
2026-10-21 16:18 ` [PATCH v9 1/8] arm: snapdragon: Make SYSRESET_PSCI optional Balaji Selvanathan
2026-10-21 16:18 ` [PATCH v9 2/8] arm: snapdragon: Guard PSCI functions with CONFIG_ARM_SMCCC Balaji Selvanathan
2026-10-21 17:35   ` Tom Rini
2026-11-01 10:27     ` Balaji Selvanathan
2026-11-06 16:45     ` Casey Connolly
2026-11-12  6:49       ` Balaji Selvanathan [this message]
2026-10-21 16:18 ` [PATCH v9 3/8] arm: snapdragon: Disable MMU early before U-Boot reset vector Balaji Selvanathan
2026-10-21 16:18 ` [PATCH v9 4/8] arm: snapdragon: Add CONFIG_QCOM_SNAGBOOT_MODE option Balaji Selvanathan
2026-10-21 17:47   ` Tom Rini
2026-11-01 10:33     ` Balaji Selvanathan
2026-10-21 16:18 ` [PATCH v9 5/8] soc: qcom: cmd-db: Allow boot without CMD DB data Balaji Selvanathan
2026-10-21 17:48   ` Tom Rini
2026-11-01 10:38     ` Balaji Selvanathan
2026-10-21 16:18 ` [PATCH v9 6/8] arch: arm: dts: remove Lemans EVK override DTS Balaji Selvanathan
2026-10-21 17:48   ` Tom Rini
2026-11-01 10:40     ` Balaji Selvanathan
2026-10-21 16:18 ` [PATCH v9 7/8] configs: add qcom_lemans_snagboot_defconfig for Lemans-EVK Balaji Selvanathan
2026-10-21 16:18 ` [PATCH v9 8/8] doc: qualcomm: Add snagboot mode documentation Balaji Selvanathan
2026-10-21 17:52   ` Tom Rini
2026-11-01 10:40     ` Balaji Selvanathan
2026-11-02 16:41       ` Tom Rini
2026-11-03 15:40         ` Balaji Selvanathan
2026-10-21 17:40 ` [PATCH v9 0/8] arm: snapdragon: Add snagboot support for Lemans-EVK Tom Rini
2026-11-01 10:25   ` Balaji Selvanathan

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=48b70a35-e65e-4cfd-b830-911874c45f4b@oss.qualcomm.com \
    --to=balaji.selvanathan@oss.qualcomm.com \
    --cc=Michael.Srba@seznam.cz \
    --cc=aswin.murugan@oss.qualcomm.com \
    --cc=casey.connolly@linaro.org \
    --cc=hongyang.zhao@thundersoft.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jbx6244@gmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=sjg@chromium.org \
    --cc=sumit.garg@kernel.org \
    --cc=sumit.garg@oss.qualcomm.com \
    --cc=tien.fong.chee@altera.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.u-boot-project.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.