From: adharmap@codeaurora.org (Abhijeet Dharmapurikar)
To: linux-arm-kernel@lists.infradead.org
Subject: arm smp support patch
Date: Thu, 11 Nov 2010 16:13:01 -0800 [thread overview]
Message-ID: <4CDC868D.7060100@codeaurora.org> (raw)
In-Reply-To: <20101111232954.GD23785@n2100.arm.linux.org.uk>
> From: Russell King - ARM Linux <linux@arm.linux.org.uk>
>
> ARM: GIC: don't disable software generated interrupts
>
> Software generated interrupts (SGI) are used for IPIs by the kernel.
> While previous revisions of the GIC hardware were specified not to
> implement enable bits for SGIs, more recent hardware is now permitted
> to implement these bits in a per-CPU banked register.
>
> The priority registers for the PPI and SGIs are also per-CPU banked
> registers, so ensure that these are also appropriately initialized.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/common/gic.c | 28 ++++++++++++++++++++++++----
> 1 files changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
> index ada6359..772f95f 100644
> --- a/arch/arm/common/gic.c
> +++ b/arch/arm/common/gic.c
> @@ -251,15 +251,16 @@ void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
> writel(cpumask, base + GIC_DIST_TARGET + i * 4 / 4);
>
> /*
> - * Set priority on all interrupts.
> + * Set priority on all global interrupts.
> */
> - for (i = 0; i < max_irq; i += 4)
> + for (i = 32; i < max_irq; i += 4)
> writel(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4);
>
> /*
> - * Disable all interrupts.
> + * Disable all interrupts. Leave the PPI and SGIs alone
> + * as these enables are banked registers.
> */
> - for (i = 0; i < max_irq; i += 32)
> + for (i = 32; i < max_irq; i += 32)
> writel(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32);
>
> /*
> @@ -277,11 +278,30 @@ void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
>
> void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base)
> {
> + void __iomem *dist_base;
> + int i;
> +
> if (gic_nr >= MAX_GIC_NR)
> BUG();
>
> + dist_base = gic_data[gic_nr].dist_base;
> + BUG_ON(!dist_base);
> +
> gic_data[gic_nr].cpu_base = base;
>
> + /*
> + * Deal with the banked PPI and SGI interrupts - disable all
> + * PPI interrupts, ensure all SGI interrupts are enabled.
> + */
> + writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR);
> + writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET);
> +
> + /*
> + * Set priority on PPI and SGI interrupts
> + */
> + for (i = 0; i < 32; i += 4)
> + writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4);
> +
> writel(0xf0, base + GIC_CPU_PRIMASK);
> writel(1, base + GIC_CPU_CTRL);
> }
Tested on msm 8660.
Acked-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2010-11-12 0:13 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
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 [this message]
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=4CDC868D.7060100@codeaurora.org \
--to=adharmap@codeaurora.org \
--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.