This relaxes the cpu in the polling busy-wait loop.

Reported-by: Vitaly Wool <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
---
 drivers/spi/amba-pl022.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index 18667de..8a2b88a 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -1424,6 +1424,7 @@ static void do_polling_transfer(struct pl022 *pl022)
                                message->state = STATE_ERROR;
                                goto out;
                        }
+                       cpu_relax();
                }
 
                /* Update total byte transferred */
-- 
1.7.3.2


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to