[PATCH] alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering #2

Sinan Kaya okaya at codeaurora.org
Tue Apr 17 11:43:01 PDT 2018


On 4/16/2018 6:16 PM, Sinan Kaya wrote:
> memory-barriers.txt has been updated with the following requirement.
> 
> "When using writel(), a prior wmb() is not needed to guarantee that the
> cache coherent memory writes have completed before writing to the MMIO
> region."
> 
> Current writeX() and iowriteX() implementations on alpha are not
> satisfying this requirement as the barrier is after the register write.
> 
> Move mb() in writeX() and iowriteX() functions to guarantee that HW
> observes memory changes before performing register operations.
> 
> Signed-off-by: Sinan Kaya <okaya at codeaurora.org>
> Reported-by: Arnd Bergmann <arnd at arndb.de>
> ---
>  arch/alpha/kernel/io.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Sorry for catching this late but this also needs to go to 4.17 after
review.

I missed the writel() implementation on arch/alpha/kernel/io.c file
on my first patch.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.



More information about the linux-arm-kernel mailing list