提交 95300577 编写于 作者: M Michael Ellerman

powerpc/mm: Drop the 64K on 4K version of pte_pagesize_index()

Now that support for 64k pages with a 4K kernel is removed, this code is
unreachable.

CONFIG_PPC_HAS_HASH_64K can only be true when CONFIG_PPC_64K_PAGES is
also true.

But when CONFIG_PPC_64K_PAGES is true we include pte-hash64.h which
includes pte-hash64-64k.h, which defines both pte_pagesize_index() and
crucially __real_pte, which means this definition can never be used.
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
上级 f444f1f8
...@@ -134,23 +134,11 @@ ...@@ -134,23 +134,11 @@
#define pte_iterate_hashed_end() } while(0) #define pte_iterate_hashed_end() } while(0)
#ifdef CONFIG_PPC_HAS_HASH_64K
/* /*
* We expect this to be called only for user addresses or kernel virtual * We expect this to be called only for user addresses or kernel virtual
* addresses other than the linear mapping. * addresses other than the linear mapping.
*/ */
#define pte_pagesize_index(mm, addr, pte) \
({ \
unsigned int psize; \
if (is_kernel_addr(addr)) \
psize = MMU_PAGE_4K; \
else \
psize = get_slice_psize(mm, addr); \
psize; \
})
#else
#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K #define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
#endif
#endif /* __real_pte */ #endif /* __real_pte */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册