Commit 031abf0b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David S. Miller
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 269fe565
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);