浏览代码

sh: Handle unmapping of fixed slots transparently in iounmap().

iounmap() should balance whatever is done by ioremap(). Presently
ioremap() can do any of fixed mappings, PMB mappings, or page table
mappings. Presently only the latter two are handled through the standard
unmap path, so tie in the fixed unmapping, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt 15 年之前
父节点
当前提交
12b6b01cb4
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      arch/sh/mm/ioremap.c

+ 6 - 0
arch/sh/mm/ioremap.c

@@ -142,6 +142,12 @@ void __iounmap(void __iomem *addr)
 	if (iomapping_nontranslatable(vaddr))
 		return;
 
+	/*
+	 * There's no VMA if it's from an early fixed mapping.
+	 */
+	if (iounmap_fixed(addr) == 0)
+		return;
+
 #ifdef CONFIG_PMB
 	/*
 	 * Purge any PMB entries that may have been established for this