提交 a8fa9ba6 编写于 作者: K Kevin Hilman 提交者: Russell King

[ARM] 4644/2: fix flush_kern_tlb_range() in module space

For kernel addresses between TASK_SIZE and PAGE_OFFSET,
flush_tlb_kern_range() does not work as would be expected.

The TLB invalidate works with a matching ASID, or on entries marked as
global.  The set_pte_at() macro marks addresses >= PAGE_OFFSET as
global, but not addresses from TASK_SIZE to PAGE_OFFSET, which are
also kernel addresses.

The result is that the entries in this range are not actually
invalidated by flush_tlb_kern_range().

This patch instead marks addresses >= TASK_SIZE as global.
Signed-off-by: NSatoru Fujii <s-fujii@ct.jp.nec.com>
Signed-off-by: NKevin Hilman <khilman@mvista.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 70dfa3f8
......@@ -249,7 +249,7 @@ extern struct page *empty_zero_page;
#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
#define set_pte_at(mm,addr,ptep,pteval) do { \
set_pte_ext(ptep, pteval, (addr) >= PAGE_OFFSET ? 0 : PTE_EXT_NG); \
set_pte_ext(ptep, pteval, (addr) >= TASK_SIZE ? 0 : PTE_EXT_NG); \
} while (0)
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册