summaryrefslogtreecommitdiff
path: root/arch/sparc/mm/iommu.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-04-16 20:23:39 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-08 17:11:56 -0700
commit031abf0b70cb6804eefb11340463a2277e52f853 (patch)
tree701b0464c323d5f44fd2f146ebb94deb67b85e9b /arch/sparc/mm/iommu.c
parent269fe56551c68cde57e477a6810ed57921dfe54f (diff)
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 <hch@lst.de> Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/iommu.c')
-rw-r--r--arch/sparc/mm/iommu.c3
1 files changed, 2 insertions, 1 deletions
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);