lkml.org 
[lkml]   [2021]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [Question] Alignment requirement for readX() and writeX()
Date
From: Arnd Bergmann
> Sent: 30 July 2021 17:59
...
> I am not aware of any driver that requires unaligned access on __iomem
> pointers, and since it definitely doesn't work on most architectures, ...

Unaligned accesses into PCIe space can generate a TLP that requests
only some bytes of the first and last 32bit words be transferred.
The target is expected to honour such requests.

On the x86 systems where I've looked at a TLP trace misaligned
accesses are even atomic provided the target doesn't let a local
request interleave.

OTOH drivers are unlikely to make such requests.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2021-08-02 10:37    [W:0.072 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site