Re: [PATCH v2] dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr()

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

 



> Requests the vchan lock before using xdma->stop_request.

Better wording alternative?:
  A data synchronisation construct was missing in this function implementation.
  Thus apply the vchan lock before checking the data structure
  member “xchan->stop_requested”.


> ---
>  drivers/dma/xilinx/xdma.c | 4 ++--

How do think about to avoid a duplicate marker line?


…
> +++ b/drivers/dma/xilinx/xdma.c
> @@ -885,11 +885,11 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
>  	u32 st;
>  	bool repeat_tx;
>
> +	spin_lock(&xchan->vchan.lock);
> +
>  	if (xchan->stop_requested)
>  		complete(&xchan->last_interrupt);
>
> -	spin_lock(&xchan->vchan.lock);
> -
>  	/* get submitted request */
…

Under which circumstances will development interests grow for the usage of
a statement like “guard(raw_spinlock)(&xchan->vchan.lock);”?
https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/cleanup.h#L124

Regards,
Markus





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux