linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Standardise on MMU_NO_CONTEXT
@ 2011-04-11  6:35 Michael Ellerman
  2011-04-13  4:40 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2011-04-11  6:35 UTC (permalink / raw)
  To: linuxppc-dev

Use MMU_NO_CONTEXT as the initialiser for mm_context.id on book3e
and hash64.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/mmu-book3e.h |    2 ++
 arch/powerpc/include/asm/mmu-hash64.h |    2 ++
 arch/powerpc/include/asm/tlbflush.h   |    2 --
 arch/powerpc/mm/mmu_context_hash64.c  |    3 +--
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h
index 17194fc..f6e7d40 100644
--- a/arch/powerpc/include/asm/mmu-book3e.h
+++ b/arch/powerpc/include/asm/mmu-book3e.h
@@ -192,6 +192,8 @@
 
 extern unsigned int tlbcam_index;
 
+#define MMU_NO_CONTEXT      	((unsigned int)-1)
+
 typedef struct {
 	unsigned int	id;
 	unsigned int	active;
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index ae7b3ef..b589189 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -409,6 +409,8 @@ static inline void subpage_prot_init_new_context(struct mm_struct *mm) { }
 
 typedef unsigned long mm_context_id_t;
 
+#define MMU_NO_CONTEXT	0
+
 typedef struct {
 	mm_context_id_t id;
 	u16 user_psize;		/* page size index */
diff --git a/arch/powerpc/include/asm/tlbflush.h b/arch/powerpc/include/asm/tlbflush.h
index d50a380..852b139 100644
--- a/arch/powerpc/include/asm/tlbflush.h
+++ b/arch/powerpc/include/asm/tlbflush.h
@@ -32,8 +32,6 @@
 struct vm_area_struct;
 struct mm_struct;
 
-#define MMU_NO_CONTEXT      	((unsigned int)-1)
-
 extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
 			    unsigned long end);
 extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c
index 2535828..c585944 100644
--- a/arch/powerpc/mm/mmu_context_hash64.c
+++ b/arch/powerpc/mm/mmu_context_hash64.c
@@ -31,7 +31,6 @@ static DEFINE_IDA(mmu_context_ida);
  * Each segment contains 2^28 bytes.  Each context maps 2^44 bytes,
  * so we can support 2^19-1 contexts (19 == 35 + 28 - 44).
  */
-#define NO_CONTEXT	0
 #define MAX_CONTEXT	((1UL << 19) - 1)
 
 int __init_new_context(void)
@@ -95,5 +94,5 @@ void destroy_context(struct mm_struct *mm)
 {
 	__destroy_context(mm->context.id);
 	subpage_prot_free(mm);
-	mm->context.id = NO_CONTEXT;
+	mm->context.id = MMU_NO_CONTEXT;
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc: Standardise on MMU_NO_CONTEXT
  2011-04-11  6:35 [PATCH] powerpc: Standardise on MMU_NO_CONTEXT Michael Ellerman
@ 2011-04-13  4:40 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2011-04-13  4:40 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

On Mon, 2011-04-11 at 16:35 +1000, Michael Ellerman wrote:
> Use MMU_NO_CONTEXT as the initialiser for mm_context.id on book3e
> and hash64.

This breaks 40x, new patch coming.

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-13  4:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11  6:35 [PATCH] powerpc: Standardise on MMU_NO_CONTEXT Michael Ellerman
2011-04-13  4:40 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).