mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Andrea Merello <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: andrea.merello@gmail.com, linux-kernel@vger.kernel.org,
	lee@kernel.org, eric@anholt.net, hpa@zytor.com, mingo@kernel.org,
	marc.zyngier@arm.com, f.fainelli@gmail.com,
	swarren@wwwdotorg.org, jason@lakedaemon.net, tglx@linutronix.de
Subject: [tip:irq/core] irqchip/bcm2836: Add SMP support for the 2836
Date: Tue, 29 Dec 2015 02:46:02 -0800	[thread overview]
Message-ID: <tip-41f4988cc287e5f836d3f6620c9f900bc9b560e9@git.kernel.org> (raw)
In-Reply-To: <1451166444-11044-3-git-send-email-eric@anholt.net>

Commit-ID:  41f4988cc287e5f836d3f6620c9f900bc9b560e9
Gitweb:     http://git.kernel.org/tip/41f4988cc287e5f836d3f6620c9f900bc9b560e9
Author:     Andrea Merello <andrea.merello@gmail.com>
AuthorDate: Sat, 26 Dec 2015 13:47:22 -0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 29 Dec 2015 11:40:45 +0100

irqchip/bcm2836: Add SMP support for the 2836

The firmware sets the secondaries spinning waiting for a non-NULL
value to show up in the last IPI mailbox.

The original SMP port from the downstream tree was done by Andrea, and
Eric cleaned it up/rewrote it a few times from there.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-rpi-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1451166444-11044-3-git-send-email-eric@anholt.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/irqchip/irq-bcm2836.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c
index 6ec125e..59ac40c 100644
--- a/drivers/irqchip/irq-bcm2836.c
+++ b/drivers/irqchip/irq-bcm2836.c
@@ -53,14 +53,16 @@
 /* Same status bits as above, but for FIQ. */
 #define LOCAL_FIQ_PENDING0		0x070
 /*
- * Mailbox0 write-to-set bits.  There are 16 mailboxes, 4 per CPU, and
+ * Mailbox write-to-set bits.  There are 16 mailboxes, 4 per CPU, and
  * these bits are organized by mailbox number and then CPU number.  We
  * use mailbox 0 for IPIs.  The mailbox's interrupt is raised while
  * any bit is set.
  */
 #define LOCAL_MAILBOX0_SET0		0x080
-/* Mailbox0 write-to-clear bits. */
+#define LOCAL_MAILBOX3_SET0		0x08c
+/* Mailbox write-to-clear bits. */
 #define LOCAL_MAILBOX0_CLR0		0x0c0
+#define LOCAL_MAILBOX3_CLR0		0x0cc
 
 #define LOCAL_IRQ_CNTPSIRQ	0
 #define LOCAL_IRQ_CNTPNSIRQ	1
@@ -220,6 +222,24 @@ static struct notifier_block bcm2836_arm_irqchip_cpu_notifier = {
 	.notifier_call = bcm2836_arm_irqchip_cpu_notify,
 	.priority = 100,
 };
+
+int __init bcm2836_smp_boot_secondary(unsigned int cpu,
+				      struct task_struct *idle)
+{
+	unsigned long secondary_startup_phys =
+		(unsigned long)virt_to_phys((void *)secondary_startup);
+
+	dsb();
+	writel(secondary_startup_phys,
+	       intc.base + LOCAL_MAILBOX3_SET0 + 16 * cpu);
+
+	return 0;
+}
+
+static const struct smp_operations bcm2836_smp_ops __initconst = {
+	.smp_boot_secondary	= bcm2836_smp_boot_secondary,
+};
+
 #endif
 
 static const struct irq_domain_ops bcm2836_arm_irqchip_intc_ops = {
@@ -237,6 +257,7 @@ bcm2836_arm_irqchip_smp_init(void)
 	register_cpu_notifier(&bcm2836_arm_irqchip_cpu_notifier);
 
 	set_smp_cross_call(bcm2836_arm_irqchip_send_ipi);
+	smp_set_ops(&bcm2836_smp_ops);
 #endif
 }
 

  reply	other threads:[~2015-12-29 10:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-26 21:47 [PATCH 0/4] bcm2836 (Raspberry Pi 2) interrupt controller updates for 4.5 Eric Anholt
2015-12-26 21:47 ` [PATCH 1/4] irqchip: bcm2836: Fix initialization of the LOCAL_IRQ_CNT*IRQ timers Eric Anholt
2015-12-29 10:45   ` [tip:irq/core] irqchip/bcm2836: Fix initialization of the LOCAL_IRQ_CNT timers tip-bot for Eric Anholt
2015-12-26 21:47 ` [PATCH 2/4] irqchip: bcm2836: Add SMP support for the 2836 Eric Anholt
2015-12-29 10:46   ` tip-bot for Andrea Merello [this message]
2016-01-02 10:27   ` Russell King - ARM Linux
2016-01-02 16:05     ` Andrea Merello
2015-12-26 21:47 ` [PATCH 3/4] irqchip: bcm2836: tolerate IRQs while no flag is set in ISR Eric Anholt
2015-12-29 10:46   ` [tip:irq/core] irqchip/bcm2836: Tolerate " tip-bot for Andrea Merello
2015-12-26 21:47 ` [PATCH 4/4] irqchip: bcm2836: make code more readable Eric Anholt
2015-12-29 10:46   ` [tip:irq/core] irqchip/bcm2836: Make " tip-bot for Andrea Merello

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=tip-41f4988cc287e5f836d3f6620c9f900bc9b560e9@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=andrea.merello@gmail.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jason@lakedaemon.net \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mingo@kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome