linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: monstr@monstr.eu (Michal Simek)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/8] ARM: gic: Introduce new gic_set_cpu
Date: Mon, 18 Jun 2012 13:30:06 +0200	[thread overview]
Message-ID: <1340019011-18642-4-git-send-email-monstr@monstr.eu> (raw)
In-Reply-To: <1340019011-18642-1-git-send-email-monstr@monstr.eu>

gic_set_cpu enable option to forward specific IRQ to choosen
ARM core.

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/arm/common/gic.c               |   11 +++++++++++
 arch/arm/include/asm/hardware/gic.h |    2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index b8e7202..2998d9e 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -257,6 +257,17 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
 
 	return IRQ_SET_MASK_OK;
 }
+
+void gic_set_cpu(unsigned int cpu, unsigned int irq)
+{
+	struct irq_data *d = irq_get_irq_data(irq);
+	struct cpumask mask;
+
+	cpumask_clear(&mask);
+	cpumask_set_cpu(cpu, &mask);
+	gic_set_affinity(d, &mask, true);
+}
+EXPORT_SYMBOL(gic_set_cpu);
 #endif
 
 #ifdef CONFIG_PM
diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h
index 4b1ce6c..8aa9631 100644
--- a/arch/arm/include/asm/hardware/gic.h
+++ b/arch/arm/include/asm/hardware/gic.h
@@ -46,6 +46,8 @@ void gic_handle_irq(struct pt_regs *regs);
 void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
 void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
 
+void gic_set_cpu(unsigned int cpu, unsigned int irq);
+
 static inline void gic_init(unsigned int nr, int start,
 			    void __iomem *dist , void __iomem *cpu)
 {
-- 
1.7.0.4

  parent reply	other threads:[~2012-06-18 11:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 11:30 ARM SMP/GIC/LDS patches for Xilinx Zynq remoteproc Michal Simek
2012-06-18 11:30 ` [RFC PATCH 1/8] ARM: gic: Support forcing cpumask for possible cpus in the system Michal Simek
2012-06-18 11:33   ` Russell King - ARM Linux
2012-06-18 11:41     ` Michal Simek
2012-06-20  6:48       ` Michal Simek
2012-06-18 11:30 ` [RFC PATCH 2/8] ARM: gic: Export gic_raise_softirq function for kernel modules Michal Simek
2012-06-18 11:30 ` Michal Simek [this message]
2012-06-18 11:30 ` [RFC PATCH 4/8] ARM: smp: Move cpu initialization directly to ipi_cpu_stop Michal Simek
2012-06-18 11:34   ` Russell King - ARM Linux
2012-06-18 11:53     ` Michal Simek
2012-06-18 11:30 ` [RFC PATCH 5/8] AMP: smp: Extend number of IPIs Michal Simek
2012-06-18 11:35   ` Russell King - ARM Linux
2012-06-18 11:54     ` Michal Simek
2012-06-18 11:30 ` [RFC PATCH 6/8] ARM: smp: Use generic API for ipi Michal Simek
2012-06-18 11:36   ` Russell King - ARM Linux
2012-06-18 11:54     ` Michal Simek
2012-06-18 11:30 ` [RFC PATCH 7/8] ARM: vmlinux.lds: Setup physical load address not virtual Michal Simek
2012-06-18 14:06   ` Nicolas Pitre
2012-06-18 18:15     ` Michal Simek
2012-06-18 19:02       ` Nicolas Pitre
2012-06-18 19:23         ` Michal Simek
2012-06-18 21:10           ` Nicolas Pitre
2012-06-19  4:16             ` Michal Simek
2012-06-18 11:30 ` [RFC PATCH 8/8] ARM: vmlinux.lds: Setup correct entry point to physical address Michal Simek
2012-06-18 11:37   ` Russell King - ARM Linux
2012-06-18 11:45     ` Michal Simek

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=1340019011-18642-4-git-send-email-monstr@monstr.eu \
    --to=monstr@monstr.eu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).