All of lore.kernel.org
 help / color / mirror / Atom feed
From: gdavis@mvista.com (George G. Davis)
To: linux-arm-kernel@lists.infradead.org
Subject: arm smp support patch
Date: Wed, 10 Nov 2010 23:41:25 -0500	[thread overview]
Message-ID: <20101111044125.GA5850@mvista.com> (raw)
In-Reply-To: <73a3b42c84eb2bfde0f861d1e53042cd.squirrel@www.concentris-systems.com>

On Tue, Nov 09, 2010 at 01:33:20PM -1000, Scott Valentine wrote:
> On arm multi-core platforms that have a gic, the secondary cores fail to
> wake if they are booted in WFI mode, as the gic_dist_init disables all
> interrupts including IPI. I've included a simple patch to the
> gic_dist_init function that enables interrupts 0-15 on SMP enabled
> systems. This patch was made against linux-2.6-HEAD-151f52f.
> 
> 
> diff -uNr a/arch/arm/common/gic.c b/arch/arm/common/gic.c
> --- a/arch/arm/common/gic.c     2010-11-05 15:57:04.000000000 -1000
> +++ b/arch/arm/common/gic.c     2010-11-09 13:08:33.000000000 -1000
> @@ -262,6 +262,13 @@
>         for (i = 0; i < max_irq; i += 32)
>                 writel(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 /
> 32);
> 
> +#ifdef CONFIG_SMP
> +       /*
> +        * Enable IPI interrupts on SMP systems so we can wake secondary
> cores
> +        */
> +       writel(0x0000ffff, base + GIC_DIST_ENABLE_SET);

The ARM11 MPCore TRM [1] states "Interrupts 0-15 fields are read as one,
that is, always enabled, and write to these fields have no effect."  So
it seems odd that this is needed.  Errata?  FWIW, I've peeked and poked
at GIC_DIST_ENABLE_SET and GIC_DIST_ENABLE_CLEAR via a debugger and the
16 LSBs of both of these registers are stuck-at-one on my ARM11 MPCore
r1p0.

--
Regards,
George

[1] http://infocenter.arm.com/help/topic/com.arm.doc.ddi0360f/CCHGFFFA.html

> +#endif
> +
>         /*
>          * Setup the Linux IRQ subsystem.
>          */
> 
> 
> 
> 
> 
> NOTES:
> 
> After browsing through the Kconfigs, I am confident that this will only
> affect the following platforms (which have ARM_GIC and SMP):
> MACH_REALVIEW, ARCH_OMAP4, ARCH_S5PV310, ARCH_VEXPRESS_CA9X4, ARCH_U8500,
> and ARCH_TEGRA_2x_SOC. The TEGRA_2x appears to use a diffent smp-boot
> mechanism, however. The patch was tested successfully on MACH_CNS3XXX
> using the bsp for the gateworks laguna platform
> (http://svn.gateworks.com/bsp/laguna/trunk/openwrt_patches).
> 
> 
> Scott Valentine
> 
> Concentris Systems LLC
> Manoa Innovation Center, Suite #238
> 2800 Woodlawn Drive
> Honolulu, HI  96822
> 
> http://www.Concentris-Systems.com
> 
> (808) 988-6100
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2010-11-11  4:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 23:33 arm smp support patch Scott Valentine
2010-11-10 11:21 ` Sergei Shtylyov
2010-11-10 20:37   ` Scott Valentine
2010-11-11 11:36     ` Sergei Shtylyov
2010-11-11  4:41 ` George G. Davis [this message]
2010-11-11 20:03   ` Rob Herring
2010-11-11 21:16     ` Scott Valentine
2010-11-11 22:46     ` Russell King - ARM Linux
2010-11-11 22:50       ` Rob Herring
2010-11-11 23:02         ` Russell King - ARM Linux
2010-11-11 21:02   ` Scott Valentine
2010-11-11 21:44     ` Abhijeet Dharmapurikar
2010-11-11 23:06       ` Russell King - ARM Linux
2010-11-11 23:29         ` Russell King - ARM Linux
2010-11-12  0:13           ` Abhijeet Dharmapurikar
2010-11-16  7:27         ` Scott Valentine

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=20101111044125.GA5850@mvista.com \
    --to=gdavis@mvista.com \
    --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.