]> git.baikalelectronics.ru Git - kernel.git/commit
arm/xen: don't check for xen_initial_domain() in xen_create_contiguous_region
authorStefano Stabellini <sstabellini@kernel.org>
Fri, 4 Mar 2022 23:22:54 +0000 (15:22 -0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 18 Apr 2022 05:21:09 +0000 (07:21 +0200)
commitf4630d5ddd10e7897d591b98661dfdf30e4ab56c
tree000bf5738a511fffce0fb0d3d6f3b335c4e344a7
parentcd255a8b13dab32f38404d5afe9c6d2e04c2b92a
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 513b919c12c9 "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>
arch/arm/xen/mm.c