From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: implement optimized percpu variable access
Date: Thu, 29 Nov 2012 15:53:03 +0000 [thread overview]
Message-ID: <20121129155303.GL19440@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.02.1211291039060.4576@xanadu.home>
On Thu, Nov 29, 2012 at 10:45:50AM -0500, Nicolas Pitre wrote:
> On Thu, 29 Nov 2012, Rob Herring wrote:
> > Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> > Acked-by: Will Deacon <will.deacon@arm.com>
>
> With the above, and moving the call to cpu_init() after the call to
> cpu_switch_mm(mm->pgd, mm) to fix Will's concerns (personally I'd put it
> right after local_flush_tlb_all())...
You're confused. We were suggesting before the printk().
The reasoning is: printk() is not guaranteed not to access per-cpu
variables, so it needs to be before the first printk. It can't be
before cpu_switch_mm(), and putting it before the TLB flush does
_not_ guarantee that TLB/MMU isn't going to still be seeing the
strongly-ordered attribute - so it _must_ be after the TLB flush.
As for the setup of the active MM, that's something that I still
think should come as early as possible (even before the per-cpu
stuff) because that is getting everything properly initialized and
setup for this new thread; there's a risk that a fault occuring
before that point may cause issues, specially if active_mm were NULL.
So, between cpumask_set_cpu() and printk() please.
next prev parent reply other threads:[~2012-11-29 15:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 14:52 [PATCH v2] ARM: implement optimized percpu variable access Rob Herring
2012-11-29 15:05 ` Will Deacon
2012-11-29 15:09 ` Russell King - ARM Linux
2012-11-29 15:13 ` Rob Herring
2012-11-29 15:26 ` Will Deacon
2012-11-29 15:48 ` Nicolas Pitre
2012-11-29 15:45 ` Nicolas Pitre
2012-11-29 15:53 ` Russell King - ARM Linux [this message]
2012-11-29 16:02 ` Nicolas Pitre
2012-11-29 16:06 ` Russell King - ARM Linux
2012-11-29 19:11 ` Tony Lindgren
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=20121129155303.GL19440@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.