From 7d20aac37062d93e15a96008158e51b9bbb34684 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 29 Jul 2014 08:45:10 +1000 Subject: lpc: Don't poll in spin loops The LPC code is called from deep into various call stacks such as the UART one, polling from there could cause nasty recursions, so use a _nopoll variant of wait. Signed-off-by: Benjamin Herrenschmidt --- hw/lpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/lpc.c') diff --git a/hw/lpc.c b/hw/lpc.c index 8dc533d..603d3af 100644 --- a/hw/lpc.c +++ b/hw/lpc.c @@ -139,7 +139,7 @@ static int64_t opb_write(struct proc_chip *chip, uint32_t addr, uint32_t data, } return OPAL_SUCCESS; } - time_wait(100); + time_wait_nopoll(100); } log_simple_error(&e_info(OPAL_RC_LPC_WRITE), "LPC: Write timeout !\n"); return OPAL_HARDWARE; @@ -194,7 +194,7 @@ static int64_t opb_read(struct proc_chip *chip, uint32_t addr, uint32_t *data, } return 0; } - time_wait(100); + time_wait_nopoll(100); } log_simple_error(&e_info(OPAL_RC_LPC_READ), "LPC: Read timeout !\n"); return OPAL_HARDWARE; -- cgit v1.1