Re: spi: race in spi_finalize_current_message starting queue_kthread_work before the message is unmapped

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

 



> On 11.05.2015, at 20:00, Mark Brown <broonie@xxxxxxxxxx> wrote:
> 
>> * dummy_RX/TX get allocated/released even when can_dma returns false
>>  should only run this “mapping if necessary. I guess that it is mostly
>>  usefull for DMA transfers - PIO drivers typically implement this via
>>  a simple if when tx/rx_buf is NULL.
> 
> No, it's supposed to be usable for PIO too - it can keep logic simpler.
but only slightly - it is a simple
  (xfer->tx_buf) ? xfer->tx_buf[i] : 0
so I do not see a huge difference.

> Indeed, just having a page that gets reused would be better.  I'm hoping
> that someone who needs this will get around to optimizing it at some
> point.

I could possibly look into that, but it goes against the point you
made above about PIO.
Either we allocate the memory completely and make it work for PIO.
Or we only create a scatter/gather list of the same page and leave
tx_buf == NULL.

So unless we have a separate flag to say we only need it for DMA,
then we have to keep the the current logic with allocation or we break
other drivers.

Martin

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux