From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using
Date: Wed, 15 Sep 2021 12:25:28 +0530 [thread overview]
Message-ID: <b75d10ba-0974-d759-bdba-09c63064ffb6@linux.vnet.ibm.com> (raw)
In-Reply-To: <87ilz2jr1f.fsf@mpe.ellerman.id.au>
On 9/15/21 11:53 AM, Michael Ellerman wrote:
> Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
>> Currently only FSP based powernv systems supports firmware update
>> interfaces. Hence check that the token OPAL_FLASH_VALIDATE exists
>> before initalising the flash driver.
>>
>> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/platforms/powernv/opal-flash.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/powerpc/platforms/powernv/opal-flash.c b/arch/powerpc/platforms/powernv/opal-flash.c
>> index 7e7d38b17420..05490fc22fae 100644
>> --- a/arch/powerpc/platforms/powernv/opal-flash.c
>> +++ b/arch/powerpc/platforms/powernv/opal-flash.c
>> @@ -520,6 +520,10 @@ void __init opal_flash_update_init(void)
>> {
>> int ret;
>>
>> + /* Firmware update is not supported by firmware */
>> + if (!opal_check_token(OPAL_FLASH_VALIDATE))
>> + return;
>> +
>
Michael,
> That will mean the following files no longer appear on BMC systems:
>
> /sys/firmware/opal/image
> /sys/firmware/opal/validate_flash
> /sys/firmware/opal/manage_flash
> /sys/firmware/opal/update_flash
>
> Presumably those files don't actually work correctly, but are we sure
> their mere existence isn't used by anything at all?
That's correct. We never used these files/interfaces on BMC based systems.
>
> We've had trouble in the past where removing sysfs files breaks tools
> unexpectedly, see smt_snooze_delay.
AFAIK only update_flash uses these interfaces on baremetal systems.
This change shouldn't break update_flash as these interfaces never used/worked
on BMC based powernv systems.
-Vasant
next prev parent reply other threads:[~2021-09-15 6:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 10:16 [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using Vasant Hegde
2021-09-15 6:23 ` Michael Ellerman
2021-09-15 6:55 ` Vasant Hegde
2021-09-15 6:55 ` Vasant Hegde [this message]
2022-05-24 11:09 ` Michael Ellerman
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=b75d10ba-0974-d759-bdba-09c63064ffb6@linux.vnet.ibm.com \
--to=hegdevasant@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).