Thread (7 messages) 7 messages, 4 authors, 2011-10-13

Re: [PATCH][v2] uio: Support 36-bit physical addresses on 32-bit systems

From: Tabi Timur-B04825 <hidden>
Date: 2011-10-13 14:37:23
Also in: lkml

On Wed, Oct 12, 2011 at 3:57 PM, Kumar Gala [off-list ref] wro=
te:
From: Kai Jiang <redacted>

To support >32-bit physical addresses for UIO_MEM_PHYS type we need to
extend the width of 'addr' in struct uio_mem. =A0Numerous platforms like
embedded PPC, ARM, and X86 have support for systems with larger physical
address than logical.

Since 'addr' may contain a physical, logical, or virtual address the
easiest solution is to just change the type to 'unsigned long long'
regardless of which type is utilized.
You forgot to update this description.
=A0struct uio_mem {
=A0 =A0 =A0 =A0const char =A0 =A0 =A0 =A0 =A0 =A0 =A0*name;
- =A0 =A0 =A0 unsigned long =A0 =A0 =A0 =A0 =A0 addr;
+ =A0 =A0 =A0 phys_addr_t =A0 =A0 =A0 =A0 =A0 =A0 addr;
Please add a comment here saying:

1) That 'addr' can be a virtual or physical address
2) That the kernel guarantees that sizeof(phys_addr_t) >=3D sizeof(void
*), so it's safe to use phys_addr_t for a virtual pointer.

--=20
Timur Tabi
Linux kernel developer at Freescale=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help