lkml.org 
[lkml]   [2011]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][v2] uio: Support 36-bit physical addresses on 32-bit systems
From
Date

On Oct 13, 2011, at 9:37 AM, Tabi Timur-B04825 wrote:

> On Wed, Oct 12, 2011 at 3:57 PM, Kumar Gala <galak@kernel.crashing.org> wrote:
>> From: Kai Jiang <Kai.Jiang@freescale.com>
>>
>> To support >32-bit physical addresses for UIO_MEM_PHYS type we need to
>> extend the width of 'addr' in struct uio_mem. Numerous 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.

will fix and update commit message

>
>> struct uio_mem {
>> const char *name;
>> - unsigned long addr;
>> + phys_addr_t addr;
>
> Please add a comment here saying:
>
> 1) That 'addr' can be a virtual or physical address

The code and everything else makes that clear

> 2) That the kernel guarantees that sizeof(phys_addr_t) >= sizeof(void
> *), so it's safe to use phys_addr_t for a virtual pointer.

The commit message will cover that so I don't plan on add it.

- k

\
 
 \ /
  Last update: 2011-10-13 17:35    [W:0.207 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site