From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Help fix SMP boot issues with L2 cache
Date: Thu, 18 Feb 2010 17:13:17 +0000 [thread overview]
Message-ID: <20100218171317.GG20243@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20100214001858.GA16553@n2100.arm.linux.org.uk>
Ping. Acks would be nice.
On Sun, Feb 14, 2010 at 12:18:58AM +0000, Russell King - ARM Linux wrote:
> On Sat, Feb 13, 2010 at 11:47:03PM +0000, Catalin Marinas wrote:
> > Russell King - ARM Linux wrote:
> >> ARM: Add L2 cache handling to smp boot support
> >> The page table and secondary data which we're asking the
> >> secondary CPU
> >> to make use of has to hit RAM to ensure that the secondary CPU can see
> >> it since it may not be taking part in coherency or cache searches at
> >> this point.
> >> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> >>
> >> arch/arm/kernel/smp.c | 4 +++-
> >> 1 files changed, 3 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> >> index 57162af..577543f 100644
> >> --- a/arch/arm/kernel/smp.c
> >> +++ b/arch/arm/kernel/smp.c
> >> @@ -99,6 +99,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
> >> *pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) |
> >> PMD_TYPE_SECT | PMD_SECT_AP_WRITE);
> >> flush_pmd_entry(pmd);
> >> + outer_clean_range(__pa(pmd), __pa(pmd + 1));
> >> /*
> >> * We need to tell the secondary core where to find
> >> @@ -106,7 +107,8 @@ int __cpuinit __cpu_up(unsigned int cpu)
> >> */
> >> secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
> >> secondary_data.pgdir = virt_to_phys(pgd);
> >> - wmb();
> >> + __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data));
> >> + outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
> >> /*
> >> * Now bring the CPU into our world.
> >
> > But is the outer_cache initialised at this point?
>
> If it isn't, the calls are no-ops, so are harmless. However, there are
> platforms where the L2 is already initialized at this point, and therefore
> this needs to be handled.
>
> Whether platforms have initialized their L2 cache support while the
> hardware is enabled is their own lookout at this point - that's outside
> of the scope of this patch.
>
> > I recall for RealView
> > I had to change the l2x0_init to an early_initcall:
> >
> > http://linux-arm.org/git?p=linux-2.6-stable.git;a=commitdiff;h=70e1b8d308f635eaeb7dad14fc5c79f082a147ef;hp=f034a4ab31b0663a5b68c65503122bed1eaca349
>
> And that's what I'm addressing with this patch - the need to patch
> every platsmp.c file with that kind of dirty hack. With my patch,
> the SMP generic data structures will be covered by the appropriate
> code, rather than having every SMP platform having to do that itself.
>
> Please update your patch for mine - the only thing you need to look
> after is 'pen_release'.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2010-02-18 17:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-12 18:25 [PATCH] Help fix SMP boot issues with L2 cache Russell King - ARM Linux
2010-02-13 23:47 ` Catalin Marinas
2010-02-14 0:18 ` Russell King - ARM Linux
2010-02-18 17:13 ` Russell King - ARM Linux [this message]
2010-02-18 17:28 ` Shilimkar, Santosh
2010-02-19 15:42 ` Catalin Marinas
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=20100218171317.GG20243@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.