提交 031abf0b 编写于 作者: C Christoph Hellwig 提交者: David S. Miller

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: NChristoph Hellwig <hch@lst.de>
Reported-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 269fe565
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册