From: Nathan Lynch <nathanl@austin.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Paul Mackerras <paulus@samba.org>,
torvalds@osdl.org, Anton Blanchard <anton@samba.org>,
lkml <linux-kernel@vger.kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] PPC64 mmu_context_init needs to run earlier
Date: Tue, 02 Nov 2004 15:57:05 -0600 [thread overview]
Message-ID: <1099432625.23845.93.camel@pants.austin.ibm.com> (raw)
In-Reply-To: <20041101221336.5f6d8534.akpm@osdl.org>
On Tue, 2004-11-02 at 00:13, Andrew Morton wrote:
> Paul Mackerras <paulus@samba.org> wrote:
> >
> > This patch changes mmu_context_init to be called as a core_initcall
> > rather than an arch_initcall, since mmu_context_init needs to run
> > before we try to run any userspace processes, and arch_initcall was
> > found to be too late.
>
> Here we go again...
>
> I don't see why your patch fixes the problem. do_basic_setup() calls
> driver_init() prior to any initcalls being run, and driver_init() can call
> /sbin/hotplug.
My original submission was more of a "works for me, not sure it's
correct" sort of thing. Sorry I wasn't clear.
How about this instead:
Using idr_get_new_above in init_new_context lets us get rid of an
awkward init function which wasn't running early enough in boot
anyway.
Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
---
diff -puN arch/ppc64/mm/init.c~ppc64-mmu-context-use-idr_get_new_above arch/ppc64/mm/init.c
--- linux-2.6.10-rc1-bk12/arch/ppc64/mm/init.c~ppc64-mmu-context-use-idr_get_new_above 2004-11-02 14:22:23.000000000 -0600
+++ linux-2.6.10-rc1-bk12-nathanl/arch/ppc64/mm/init.c 2004-11-02 14:29:09.000000000 -0600
@@ -489,7 +489,7 @@ again:
return -ENOMEM;
spin_lock(&mmu_context_lock);
- err = idr_get_new(&mmu_context_idr, NULL, &index);
+ err = idr_get_new_above(&mmu_context_idr, NULL, 0, &index);
spin_unlock(&mmu_context_lock);
if (err == -EAGAIN)
@@ -518,19 +518,6 @@ void destroy_context(struct mm_struct *m
hugetlb_mm_free_pgd(mm);
}
-static int __init mmu_context_init(void)
-{
- int index;
-
- /* Reserve the first (invalid) context*/
- idr_pre_get(&mmu_context_idr, GFP_KERNEL);
- idr_get_new(&mmu_context_idr, NULL, &index);
- BUG_ON(0 != index);
-
- return 0;
-}
-arch_initcall(mmu_context_init);
-
/*
* Do very early mm setup.
*/
_
next prev parent reply other threads:[~2004-11-02 22:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 5:11 Paul Mackerras
2004-11-02 6:13 ` Andrew Morton
2004-11-02 21:57 ` Nathan Lynch [this message]
2004-11-02 22:10 ` Linus Torvalds
2004-11-02 23:35 ` Benjamin Herrenschmidt
2004-11-03 0:08 ` Nathan Lynch
2004-11-03 23:04 ` Andrew Morton
2004-11-04 2:53 ` Paul Mackerras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1099432625.23845.93.camel@pants.austin.ibm.com \
--to=nathanl@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®