From: Christoph Hellwig Date: Tue, 16 Apr 2019 18:23:39 +0000 (+0200) Subject: sparc/iommu: use !PageHighMem to check if a page has a kernel mapping X-Git-Tag: v5.2-rc1~103^2~3^2~8 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=031abf0b70cb6804eefb11340463a2277e52f853;p=users%2Fjedix%2Flinux-maple.git sparc/iommu: use !PageHighMem to check if a page has a kernel mapping This deobsfucates the check a bit, and prepares for future changes. Signed-off-by: Christoph Hellwig Reported-by: Guenter Roeck Signed-off-by: David S. Miller --- diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index e8d5d73ca40d..dcdadac03fdf 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -273,7 +273,8 @@ static int sbus_iommu_map_sg_pflush(struct device *dev, struct scatterlist *sgl, * XXX Is this a good assumption? * XXX What if someone else unmaps it here and races us? */ - if ((page = (unsigned long) page_address(sg_page(sg))) != 0) { + if (!PageHighMem(sg_page(sg))) { + page = (unsigned long)page_address(sg_page(sg)); for (i = 0; i < n; i++) { if (page != oldpage) { /* Already flushed? */ flush_page_for_dma(page);