[Skiboot] [PATCH 1/3] libflash/blocklevel: Smarten up blocklevel_smart_write()

Samuel Mendoza-Jonas sam.mj at au1.ibm.com
Fri Sep 4 10:18:24 AEST 2015


On 03/09/15 17:47, Cyril Bur wrote:
> Blocklevel_smart_write() can write in a smart fashion which avoids the need
> for the caller to erase the flash before writing, except it never actually
> does the erase if it needs to.
> 
> Furthermore, a very simple optimisation can be made where it should detect
> if it doesn't actually need to clear the flash, but still needs to write.
> This optimisation is from flash_smart_write(), which, for reasons, should
> continue to exist at least for now.
> 
> In the process, this also addresses a bug. blocklevel_smart_write()
> operates on erase block covered by the write, detects to see if an erase
> needs to be performed and if so, performs the erase and then performs the
> write.
> 
> Currently blocklevel_smart_write() won't detect that a write can span two
> erase blocks and that it should split this process in two. This patch fixes
> that.
> 
> Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>

Reviewed-by: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>

-- 
-----------
LTC Ozlabs
IBM



More information about the Skiboot mailing list