diff options
Diffstat (limited to 'drivers/xen/arm-device.c')
-rw-r--r-- | drivers/xen/arm-device.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/xen/arm-device.c b/drivers/xen/arm-device.c index 778acf80aacb..85dd20e05726 100644 --- a/drivers/xen/arm-device.c +++ b/drivers/xen/arm-device.c | |||
@@ -58,9 +58,13 @@ static int xen_map_device_mmio(const struct resource *resources, | |||
58 | xen_pfn_t *gpfns; | 58 | xen_pfn_t *gpfns; |
59 | xen_ulong_t *idxs; | 59 | xen_ulong_t *idxs; |
60 | int *errs; | 60 | int *errs; |
61 | struct xen_add_to_physmap_range xatp; | ||
62 | 61 | ||
63 | for (i = 0; i < count; i++) { | 62 | for (i = 0; i < count; i++) { |
63 | struct xen_add_to_physmap_range xatp = { | ||
64 | .domid = DOMID_SELF, | ||
65 | .space = XENMAPSPACE_dev_mmio | ||
66 | }; | ||
67 | |||
64 | r = &resources[i]; | 68 | r = &resources[i]; |
65 | nr = DIV_ROUND_UP(resource_size(r), XEN_PAGE_SIZE); | 69 | nr = DIV_ROUND_UP(resource_size(r), XEN_PAGE_SIZE); |
66 | if ((resource_type(r) != IORESOURCE_MEM) || (nr == 0)) | 70 | if ((resource_type(r) != IORESOURCE_MEM) || (nr == 0)) |
@@ -87,9 +91,7 @@ static int xen_map_device_mmio(const struct resource *resources, | |||
87 | idxs[j] = XEN_PFN_DOWN(r->start) + j; | 91 | idxs[j] = XEN_PFN_DOWN(r->start) + j; |
88 | } | 92 | } |
89 | 93 | ||
90 | xatp.domid = DOMID_SELF; | ||
91 | xatp.size = nr; | 94 | xatp.size = nr; |
92 | xatp.space = XENMAPSPACE_dev_mmio; | ||
93 | 95 | ||
94 | set_xen_guest_handle(xatp.gpfns, gpfns); | 96 | set_xen_guest_handle(xatp.gpfns, gpfns); |
95 | set_xen_guest_handle(xatp.idxs, idxs); | 97 | set_xen_guest_handle(xatp.idxs, idxs); |