Commit e0f1147c authored by Cristian Stoica's avatar Cristian Stoica Committed by Greg Kroah-Hartman

uio: support memory sizes larger than 32 bits

This is a completion to 27a90700
The size field is also increased to allow values larger than 32 bits
on platforms that have more than 32 bit physical addresses.
Signed-off-by: default avatarCristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5559b7bc
...@@ -540,7 +540,7 @@ appears in sysfs. ...@@ -540,7 +540,7 @@ appears in sysfs.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<varname>unsigned long size</varname>: Fill in the size of the <varname>resource_size_t size</varname>: Fill in the size of the
memory block that <varname>addr</varname> points to. If <varname>size</varname> memory block that <varname>addr</varname> points to. If <varname>size</varname>
is zero, the mapping is considered unused. Note that you is zero, the mapping is considered unused. Note that you
<emphasis>must</emphasis> initialize <varname>size</varname> with zero for <emphasis>must</emphasis> initialize <varname>size</varname> with zero for
......
...@@ -56,12 +56,12 @@ static ssize_t map_name_show(struct uio_mem *mem, char *buf) ...@@ -56,12 +56,12 @@ static ssize_t map_name_show(struct uio_mem *mem, char *buf)
static ssize_t map_addr_show(struct uio_mem *mem, char *buf) static ssize_t map_addr_show(struct uio_mem *mem, char *buf)
{ {
return sprintf(buf, "0x%llx\n", (unsigned long long)mem->addr); return sprintf(buf, "%pa\n", &mem->addr);
} }
static ssize_t map_size_show(struct uio_mem *mem, char *buf) static ssize_t map_size_show(struct uio_mem *mem, char *buf)
{ {
return sprintf(buf, "0x%lx\n", mem->size); return sprintf(buf, "%pa\n", &mem->size);
} }
static ssize_t map_offset_show(struct uio_mem *mem, char *buf) static ssize_t map_offset_show(struct uio_mem *mem, char *buf)
......
...@@ -35,7 +35,7 @@ struct uio_map; ...@@ -35,7 +35,7 @@ struct uio_map;
struct uio_mem { struct uio_mem {
const char *name; const char *name;
phys_addr_t addr; phys_addr_t addr;
unsigned long size; resource_size_t size;
int memtype; int memtype;
void __iomem *internal_addr; void __iomem *internal_addr;
struct uio_map *map; struct uio_map *map;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment