Subject: Re: [PATCH 2/2] mtd: powernv_flash: Lock around concurrent access to OPAL

From: Stewart Smith <[email-masked]>
Date: Tue, 18 Jul 2017 15:01:03 +1000

Cyril Bur <[email-masked]> writes:
> OPAL can only manage one flash access at a time and will return an
> OPAL_BUSY error for each concurrent access to the flash. The simplest
> way to prevent this from happening is with a mutex.
>
> Signed-off-by: Cyril Bur <[email-masked]>
> ---
> This is to address https://github.com/open-power/skiboot/issues/80

part of me wants to say "let's only take the lock if we ever get back
OPAL_BUSY" or something like that (have a DT property to say the flash
supports concurrent ops?)

Although the other part of me says "you're overthinking this, get back
to the work you're meant to be doing" :)

-- 
Stewart Smith
OPAL Architect, IBM.