Thread (2 messages) 2 messages, 2 authors, 2012-10-22

Re: [PATCH] serial: ifx6x60: add_timer is not safe in the mrdy_assert function

From: Alan Cox <hidden>
Date: 2012-10-22 09:50:30

On Mon, 22 Oct 2012 10:23:07 -0400
Jun Chen [off-list ref] wrote:
This patch make use of mod_timer instead of add_timer in the mrdy_assert function.
Because the srdy interrupter can go high when we are running function mrdy_assert and mrdy_assert
can be called by multi-entry. In our medfield platform, spi stress test can encounter this
error logs triggered by the BUG_ON of add_timer function.This patch had been tested on
our medfield platform.

the scenario:
      CPU0							CPU1
mrdy_assert
set_bit(IFX_SPI_STATE_TIMER_PENDING)
								ifx_spi_handle_srdy
								...
								clear_bit(IFX_SPI_STATE_TIMER_PENDING)
								...
								mrdy_assert
								set_bit(IFX_SPI_STATE_TIMER_PENDING)
								...
								add_timer
...
add_timer

cc:liu chuansheng [off-list ref]
cc:Bi Chao [off-list ref]
Signed-off-by: Chen Jun <redacted>
Acked-by: Alan Cox <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help