Re: [PATCH v2 09/16] PCI: epf-test: Improve handling of command and status registers

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

 



On Thu, Mar 16, 2023 at 04:25:58PM +0100, Arnd Bergmann wrote:
> On Wed, Mar 15, 2023, at 16:51, Manivannan Sadhasivam wrote:
> > On Wed, Mar 08, 2023 at 06:03:06PM +0900, Damien Le Moal wrote:
> >> +	/*
> >> +	 * Set the status before raising the IRQ to ensure that the host sees
> >> +	 * the updated value when it gets the IRQ.
> >> +	 */
> >> +	WRITE_ONCE(reg->status, status);
> >
> > For MMIO, it is not sufficient to use WRITE_ONCE() and expect that the write
> > has reached the memory (it could be stored in a write buffer). If you really
> > care about synchronization, then you should do a read back of the variable.
> 
> This is not MMIO, this is the local access to a variable that is accessed
> through MMIO from the remote host. Reading it back would not change anything
> here as far as I can tell, 
> 

Ah, sorry I got confused this with my EPF driver... Yeah for a variable
WRITE_ONCE is sufficient.

Thanks,
Mani

>       Arnd

-- 
மணிவண்ணன் சதாசிவம்



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux