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 /drivers/xen/grant-table.c | |
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 'drivers/xen/grant-table.c')
-rw-r--r-- | drivers/xen/grant-table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 1ce1c40331f3..b84e3ab839aa 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
@@ -837,7 +837,7 @@ unsigned int gnttab_max_grant_frames(void) | |||
837 | } | 837 | } |
838 | EXPORT_SYMBOL_GPL(gnttab_max_grant_frames); | 838 | EXPORT_SYMBOL_GPL(gnttab_max_grant_frames); |
839 | 839 | ||
840 | int gnttab_setup_auto_xlat_frames(unsigned long addr) | 840 | int gnttab_setup_auto_xlat_frames(phys_addr_t addr) |
841 | { | 841 | { |
842 | xen_pfn_t *pfn; | 842 | xen_pfn_t *pfn; |
843 | unsigned int max_nr_gframes = __max_nr_grant_frames(); | 843 | unsigned int max_nr_gframes = __max_nr_grant_frames(); |
@@ -849,8 +849,8 @@ int gnttab_setup_auto_xlat_frames(unsigned long addr) | |||
849 | 849 | ||
850 | vaddr = xen_remap(addr, PAGE_SIZE * max_nr_gframes); | 850 | vaddr = xen_remap(addr, PAGE_SIZE * max_nr_gframes); |
851 | if (vaddr == NULL) { | 851 | if (vaddr == NULL) { |
852 | pr_warn("Failed to ioremap gnttab share frames (addr=0x%08lx)!\n", | 852 | pr_warn("Failed to ioremap gnttab share frames (addr=%pa)!\n", |
853 | addr); | 853 | &addr); |
854 | return -ENOMEM; | 854 | return -ENOMEM; |
855 | } | 855 | } |
856 | pfn = kcalloc(max_nr_gframes, sizeof(pfn[0]), GFP_KERNEL); | 856 | pfn = kcalloc(max_nr_gframes, sizeof(pfn[0]), GFP_KERNEL); |