Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm/xen: don't check for xen_initial_domain() in xen_create_contiguous_region

It used to be that Linux enabled swiotlb-xen when running a dom0 on ARM.
Since f5079a9a2a31 "xen/arm: introduce XENFEAT_direct_mapped and
XENFEAT_not_direct_mapped", Linux detects whether to enable or disable
swiotlb-xen based on the new feature flags: XENFEAT_direct_mapped and
XENFEAT_not_direct_mapped.

However, there is still a leftover xen_initial_domain() check in
xen_create_contiguous_region. Remove the check as
xen_create_contiguous_region is only called by swiotlb-xen during
initialization. If xen_create_contiguous_region is called, we know Linux
is running 1:1 mapped so there is no need for additional checks.

Also update the in-code comment.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

authored by

Stefano Stabellini and committed by
Christoph Hellwig
9bbe7a7f 0d5ffd9a

+1 -4
+1 -4
arch/arm/xen/mm.c
··· 122 122 unsigned int address_bits, 123 123 dma_addr_t *dma_handle) 124 124 { 125 - if (!xen_initial_domain()) 126 - return -EINVAL; 127 - 128 - /* we assume that dom0 is mapped 1:1 for now */ 125 + /* the domain is 1:1 mapped to use swiotlb-xen */ 129 126 *dma_handle = pstart; 130 127 return 0; 131 128 }