[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOZdJXWd_u_EWXNhh3-t258+Y8mx=JuJhU93CeZfaocPZvhOFA@mail.gmail.com>
Date: Thu, 13 Oct 2011 14:37:17 +0000
From: Tabi Timur-B04825 <B04825@...escale.com>
To: Kumar Gala <galak@...nel.crashing.org>
CC: "hjk@...sjkoch.de" <hjk@...sjkoch.de>,
"linuxppc-dev@...abs.org" <linuxppc-dev@...abs.org>,
"gregkh@...e.de" <gregkh@...e.de>,
Jiang Kai-B18973 <B18973@...escale.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][v2] uio: Support 36-bit physical addresses on 32-bit
systems
On Wed, Oct 12, 2011 at 3:57 PM, Kumar Gala <galak@...nel.crashing.org> wrote:
> From: Kai Jiang <Kai.Jiang@...escale.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.
> 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
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.
--
Timur Tabi
Linux kernel developer at Freescale
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists