[Skiboot] [PATCH] libflash/mbox-flash: only wait for MBOX_DEFAULT_POLL_MS if busy
Stewart Smith
stewart at linux.vnet.ibm.com
Mon Dec 18 16:31:26 AEDT 2017
This makes the mbox unit test run 300x quicker and seems to
shave about 6 seconds from boot time on Witherspoon.
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
libflash/mbox-flash.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libflash/mbox-flash.c b/libflash/mbox-flash.c
index e15fecf033fb..d33a52c0ebf0 100644
--- a/libflash/mbox-flash.c
+++ b/libflash/mbox-flash.c
@@ -348,8 +348,9 @@ static int wait_for_bmc(struct mbox_flash_data *mbox_flash, unsigned int timeout
* Both functions are important.
* Well time_wait_ms() relaxes the spin... so... its nice
*/
- time_wait_ms(MBOX_DEFAULT_POLL_MS);
check_timers(false);
+ if (mbox_flash->busy)
+ time_wait_ms(MBOX_DEFAULT_POLL_MS);
asm volatile ("" ::: "memory");
}
--
2.14.3
More information about the Skiboot
mailing list