Re: [PATCH] tty: serial: msm: Move request_irq to the end of startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/07, Neeraj Upadhyay wrote:
> Move the request_irq() call to the end of the msm_startup(),
> so that we don't handle interrupts while msm_startup() is
> running. This avoids potential races while initialization
> is in progress. For example, consider below scenario
> where rx handler reads the intermediate value of dma->chan,
> set in msm_request_rx_dma(), and tries to do dma mapping,
> which results in data abort.
> 
> uart_port_startup()
>   msm_startup()
>    request_irq()
>    ...
>    msm_request_rx_dma()
>     ...
>     dma->chan = dma_request_slave_channel_reason(dev, "rx");
>     <UART RX IRQ>
>      msm_uart_irq()
>       msm_handle_rx_dm()
>        msm_start_rx_dma()
>         dma->desc = dma_map_single()
>          <data abort>
> 
> Signed-off-by: Neeraj Upadhyay <neeraju@xxxxxxxxxxxxxx>
> ---

Or we can write the IMR register with 0 to mask all irqs before
requesting the irq handler be setup? We will unmask the
interrupts we care about anyway when we setup termios.

If not, this change is ok, but I would guess it doesn't fix
spurious irqs from happening while we keep configuring the
hardware.

Feel free to take my reviewed-by though.

Reviewed-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux