Skip to contentSkip to conversation

spi/pl022: use cpu_relax in the busy loop

PATCH New Linus Walleij 2 participants 2 messages May 19, 2011 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi/pl022: use cpu_relax in the busy loop

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

---
 drivers/spi/amba-pl022.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/spi/amba-pl022.c +1 -0
index 18667de..8a2b88a 100644
@@ -1424,6 +1424,7 @@ static void do_polling_transfer(struct pl022 *pl022)
 				message->state = STATE_ERROR;
 				goto out;
 			}
+			cpu_relax();
 		}
 
 		/* Update total byte transferred */
Signature · 1 line
1.7.3.2
Applied
#1 lore raw

PATCH 1/1 spi/pl022: use cpu_relax in the busy loop

Quoted 4 lines · Linus Walleij

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

Applied, thanks.

g.

Quoted 19 lines
---
 drivers/spi/amba-pl022.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/spi/amba-pl022.c +1 -0
index 18667de..8a2b88a 100644
@@ -1424,6 +1424,7 @@ static void do_polling_transfer(struct pl022 *pl022)
 				message->state = STATE_ERROR;
 				goto out;
 			}
+			cpu_relax();
 		}
 
 		/* Update total byte transferred */
Signature · 1 line
1.7.3.2