xen: arm: consolidate mmio and irq mapping to dom0
authorIan Campbell <ian.campbell@citrix.com>
Tue, 7 Jul 2015 08:46:18 +0000 (09:46 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 7 Jul 2015 14:10:45 +0000 (15:10 +0100)
commit467e5cbb2ffc5e0994c4cb584b7ace6a01a727af
treeee1eb8a9a13a19c9504ae14884f51db8cc157fc1
parentf65399fdfd3e6d5eb731b52b10a187e7007bddef
xen: arm: consolidate mmio and irq mapping to dom0

The code in the callbacks for dt_for_each_irq_map and
dt_for_each_range is very similar to the code in handle_device for
each non-pci device.

In fact the only major difference is that the irq callback needs to
call irq_set_spi_type in the PCI case. Refactor into a
map_dt_irq_to_domain callback which does the irq_set_spi_type and then
calls map_irq_to_domain which is also used from handle_device.

For mmio map_range_to_domain can already be used directly from
handle_device too. Note that the uses of PAGE_MASK in the
handle_device code here were unnecessary (and already removed from the
map_range_to_domain variant).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
xen/arch/arm/domain_build.c