提交 700487c1 编写于 作者: P Paul Mundt

sh: Add a PG_dcache_dirty sanity check in kmap_coherent().

This plugs in a BUG_ON() in kmap_coherent() for PG_dcache_dirty pages
to catch when things go horribly wrong. Copied from the MIPS
implementation.
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 3ed6e129
......@@ -37,6 +37,8 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr)
unsigned long vaddr, flags;
pte_t pte;
BUG_ON(test_bit(PG_dcache_dirty, &page->flags));
inc_preempt_count();
idx = (addr & current_cpu_data.dcache.alias_mask) >> PAGE_SHIFT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册