diff options
author | Julien Grall <julien.grall@linaro.org> | 2014-01-30 07:56:34 -0500 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2014-01-30 07:56:34 -0500 |
commit | 47c542050d306e50f09512eb6339dbf2fc02fddd (patch) | |
tree | 581ba02825b2cc2bdd36569d50ebfcaa3b83f4e8 /arch/arm/xen | |
parent | e17b2f114cba5420fb28fa4bfead57d406a16533 (diff) |
xen/gnttab: Use phys_addr_t to describe the grant frame base address
On ARM, address size can be 32 bits or 64 bits (if CONFIG_ARCH_PHYS_ADDR_T_64BIT
is enabled).
We can't assume that the grant frame base address will always fits in an
unsigned long. Use phys_addr_t instead of unsigned long as argument for
gnttab_setup_auto_xlat_frames.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/arm/xen')
-rw-r--r-- | arch/arm/xen/enlighten.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 3465f25d7702..b96723e258a0 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c | |||
@@ -234,7 +234,7 @@ static int __init xen_guest_init(void) | |||
234 | const char *version = NULL; | 234 | const char *version = NULL; |
235 | const char *xen_prefix = "xen,xen-"; | 235 | const char *xen_prefix = "xen,xen-"; |
236 | struct resource res; | 236 | struct resource res; |
237 | unsigned long grant_frames; | 237 | phys_addr_t grant_frames; |
238 | 238 | ||
239 | node = of_find_compatible_node(NULL, NULL, "xen,xen"); | 239 | node = of_find_compatible_node(NULL, NULL, "xen,xen"); |
240 | if (!node) { | 240 | if (!node) { |
@@ -253,8 +253,8 @@ static int __init xen_guest_init(void) | |||
253 | return 0; | 253 | return 0; |
254 | grant_frames = res.start; | 254 | grant_frames = res.start; |
255 | xen_events_irq = irq_of_parse_and_map(node, 0); | 255 | xen_events_irq = irq_of_parse_and_map(node, 0); |
256 | pr_info("Xen %s support found, events_irq=%d gnttab_frame_pfn=%lx\n", | 256 | pr_info("Xen %s support found, events_irq=%d gnttab_frame=%pa\n", |
257 | version, xen_events_irq, (grant_frames >> PAGE_SHIFT)); | 257 | version, xen_events_irq, &grant_frames); |
258 | 258 | ||
259 | if (xen_events_irq < 0) | 259 | if (xen_events_irq < 0) |
260 | return -ENODEV; | 260 | return -ENODEV; |