From: Kumar Gala <kumar.gala@freescale.com>
To: Trent Piepho <tpiepho@freescale.com>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: Better setup of boot page TLB entry
Date: Wed, 19 Nov 2008 14:51:10 -0600 [thread overview]
Message-ID: <03314DAD-B8AF-4F81-8C48-68B64C477B3C@freescale.com> (raw)
In-Reply-To: <1227122070-6835-1-git-send-email-tpiepho@freescale.com>
On Nov 19, 2008, at 1:14 PM, Trent Piepho wrote:
> The initial TLB mapping for the kernel boot didn't set the memory
> coherent
> attribute, MAS2[M], in SMP mode.
>
> If this code supported booting a secondary processor, which it
> doesn't yet,
> but suppose it did, then when a secondary processor boots, it would
> have
> probably signaled the primary processor by setting a variable called
> something like __secondary_hold_acknowledge. However, due to the
> lack of
> the M bit, the primary processor would not have snooped the
> transaction
> (even if a transaction were broadcast). If primary CPU's L1 D-cache
> had a
> copy, it would not have been flushed and the CPU would have never
> seen the
> ack. Which would have resulted in the primary CPU spinning for a long
> time, perhaps a full second before it would have given up, while it
> would
> have waited for the ack from the secondary CPU that it wouldn't have
> been
> able to see because of the stale cache.
>
> The value of MAS2 for the boot page TLB1 entry is a compile time
> constant,
> so there is no need to calculate it in powerpc assembly language.
>
> Also, from the MPC8572 manual section 6.12.5.3, "Bits that represent
> offsets within a page are ignored and should be cleared." Existing
> code
> didn't clear them, this code does.
>
> The same when the page of KERNELBASE is found; we don't need to use
> asm to
> mask the lower 12 bits off.
>
> In the code that computes the address to rfi from, don't hard code the
> offset to 24 bytes, but have the assembler figure that out for us.
>
> Signed-off-by: Trent Piepho <tpiepho@freescale.com>
> Acked-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/include/asm/mmu-fsl-booke.h | 2 ++
> arch/powerpc/kernel/head_fsl_booke.S | 22 +++++++++++++---------
> 2 files changed, 15 insertions(+), 9 deletions(-)
applied to next.
- k
prev parent reply other threads:[~2008-11-19 20:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-19 19:14 Trent Piepho
2008-11-19 20:51 ` Kumar Gala [this message]
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=03314DAD-B8AF-4F81-8C48-68B64C477B3C@freescale.com \
--to=kumar.gala@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=tpiepho@freescale.com \
/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®