* [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64
@ 2009-07-23 5:59 Benjamin Herrenschmidt
2009-07-23 6:22 ` Stephen Rothwell
2009-07-23 14:48 ` Kumar Gala
0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-07-23 5:59 UTC (permalink / raw)
To: linuxppc-dev
Our 64-bit hash context handling has no init function, but 64-bit Book3E
will use the common mmu_context_nohash.c code which does, so define an
empty inline mmu_context_init() for 64-bit server and call it from
our 64-bit setup_arch()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/include/asm/mmu_context.h | 7 ++++++-
arch/powerpc/kernel/setup_64.c | 4 ++++
arch/powerpc/mm/mmu_context_hash64.c | 1 +
3 files changed, 11 insertions(+), 1 deletion(-)
--- linux-work.orig/arch/powerpc/include/asm/mmu_context.h 2009-07-22 16:25:25.000000000 +1000
+++ linux-work/arch/powerpc/include/asm/mmu_context.h 2009-07-22 16:25:50.000000000 +1000
@@ -14,7 +14,6 @@
/*
* Most if the context management is out of line
*/
-extern void mmu_context_init(void);
extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
extern void destroy_context(struct mm_struct *mm);
@@ -23,6 +22,12 @@ extern void switch_stab(struct task_stru
extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
extern void set_context(unsigned long id, pgd_t *pgd);
+#ifdef CONFIG_PPC_BOOK3S_64
+static inline void mmu_context_init(void) { }
+#else
+extern void mmu_context_init(void);
+#endif
+
/*
* switch_mm is the entry point called from the architecture independent
* code in kernel/sched.c
Index: linux-work/arch/powerpc/kernel/setup_64.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/setup_64.c 2009-07-22 16:26:23.000000000 +1000
+++ linux-work/arch/powerpc/kernel/setup_64.c 2009-07-22 16:26:31.000000000 +1000
@@ -534,6 +534,10 @@ void __init setup_arch(char **cmdline_p)
#endif
paging_init();
+
+ /* Initialize the MMU context management stuff */
+ mmu_context_init();
+
ppc64_boot_msg(0x15, "Setup Done");
}
Index: linux-work/arch/powerpc/mm/mmu_context_hash64.c
===================================================================
--- linux-work.orig/arch/powerpc/mm/mmu_context_hash64.c 2009-07-22 16:24:43.000000000 +1000
+++ linux-work/arch/powerpc/mm/mmu_context_hash64.c 2009-07-22 16:24:56.000000000 +1000
@@ -76,3 +76,4 @@ void destroy_context(struct mm_struct *m
mm->context.id = NO_CONTEXT;
}
+
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64
2009-07-23 5:59 [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64 Benjamin Herrenschmidt
@ 2009-07-23 6:22 ` Stephen Rothwell
2009-07-23 7:07 ` Benjamin Herrenschmidt
2009-07-23 14:48 ` Kumar Gala
1 sibling, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2009-07-23 6:22 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
Hi Ben,
On Thu, 23 Jul 2009 15:59:44 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> Index: linux-work/arch/powerpc/mm/mmu_context_hash64.c
> ===================================================================
> --- linux-work.orig/arch/powerpc/mm/mmu_context_hash64.c 2009-07-22 16:24:43.000000000 +1000
> +++ linux-work/arch/powerpc/mm/mmu_context_hash64.c 2009-07-22 16:24:56.000000000 +1000
> @@ -76,3 +76,4 @@ void destroy_context(struct mm_struct *m
>
> mm->context.id = NO_CONTEXT;
> }
> +
Really? :-(
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64
2009-07-23 6:22 ` Stephen Rothwell
@ 2009-07-23 7:07 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-07-23 7:07 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
On Thu, 2009-07-23 at 16:22 +1000, Stephen Rothwell wrote:
> Hi Ben,
>
> On Thu, 23 Jul 2009 15:59:44 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > Index: linux-work/arch/powerpc/mm/mmu_context_hash64.c
> > ===================================================================
> > --- linux-work.orig/arch/powerpc/mm/mmu_context_hash64.c 2009-07-22 16:24:43.000000000 +1000
> > +++ linux-work/arch/powerpc/mm/mmu_context_hash64.c 2009-07-22 16:24:56.000000000 +1000
> > @@ -76,3 +76,4 @@ void destroy_context(struct mm_struct *m
> >
> > mm->context.id = NO_CONTEXT;
> > }
> > +
>
> Really? :-(
Little mechanical problem, I used to have something in there in a
previous rev of the patch, I'll re-spin that one without that bit.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64
2009-07-23 5:59 [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64 Benjamin Herrenschmidt
2009-07-23 6:22 ` Stephen Rothwell
@ 2009-07-23 14:48 ` Kumar Gala
1 sibling, 0 replies; 4+ messages in thread
From: Kumar Gala @ 2009-07-23 14:48 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Jul 23, 2009, at 12:59 AM, Benjamin Herrenschmidt wrote:
> Our 64-bit hash context handling has no init function, but 64-bit
> Book3E
> will use the common mmu_context_nohash.c code which does, so define an
> empty inline mmu_context_init() for 64-bit server and call it from
> our 64-bit setup_arch()
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/powerpc/include/asm/mmu_context.h | 7 ++++++-
> arch/powerpc/kernel/setup_64.c | 4 ++++
> arch/powerpc/mm/mmu_context_hash64.c | 1 +
> 3 files changed, 11 insertions(+), 1 deletion(-)
Acked-by: Kumar Gala <galak@kernel.crashing.org>
(w/the assumption the respin will just change the whitespace issue).
- k
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-23 14:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-23 5:59 [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64 Benjamin Herrenschmidt
2009-07-23 6:22 ` Stephen Rothwell
2009-07-23 7:07 ` Benjamin Herrenschmidt
2009-07-23 14:48 ` Kumar Gala
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).