提交 5e8e7b40 编写于 作者: M Michael Ellerman 提交者: Benjamin Herrenschmidt

powerpc/mm: Standardise on MMU_NO_CONTEXT

Use MMU_NO_CONTEXT as the initialiser for mm_context.id on
nohash and hash64.
Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 af277149
...@@ -79,6 +79,8 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) ...@@ -79,6 +79,8 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm)
#elif defined(CONFIG_PPC_STD_MMU_64) #elif defined(CONFIG_PPC_STD_MMU_64)
#define MMU_NO_CONTEXT 0
/* /*
* TLB flushing for 64-bit hash-MMU CPUs * TLB flushing for 64-bit hash-MMU CPUs
*/ */
......
...@@ -31,7 +31,6 @@ static DEFINE_IDA(mmu_context_ida); ...@@ -31,7 +31,6 @@ static DEFINE_IDA(mmu_context_ida);
* Each segment contains 2^28 bytes. Each context maps 2^44 bytes, * Each segment contains 2^28 bytes. Each context maps 2^44 bytes,
* so we can support 2^19-1 contexts (19 == 35 + 28 - 44). * so we can support 2^19-1 contexts (19 == 35 + 28 - 44).
*/ */
#define NO_CONTEXT 0
#define MAX_CONTEXT ((1UL << 19) - 1) #define MAX_CONTEXT ((1UL << 19) - 1)
int __init_new_context(void) int __init_new_context(void)
...@@ -95,5 +94,5 @@ void destroy_context(struct mm_struct *mm) ...@@ -95,5 +94,5 @@ void destroy_context(struct mm_struct *mm)
{ {
__destroy_context(mm->context.id); __destroy_context(mm->context.id);
subpage_prot_free(mm); subpage_prot_free(mm);
mm->context.id = NO_CONTEXT; mm->context.id = MMU_NO_CONTEXT;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册