linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/16] MIPS: GIC device-tree support
@ 2014-09-05 17:30 Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch Andrew Bresticker
                   ` (15 more replies)
  0 siblings, 16 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

This series add support for mapping and routing GIC interrupts through
the device-tree, which will be used on the upcoming interAptiv-based
Danube SoC.

- Patches 1 and 2 provide improvements to the CPU interrupt controller
  when used with DT.
- Patch 3 exports the MIPS CPU IRQ domain so that the GIC driver can
  use it.
- Patch 4 is a fix for secondary CPU bringup with CPS.
- Patches 5 through 9 are misc. GIC cleanups, including moving the GIC
  driver to drivers/irqchip/.
- Patches 10 through 13 add device-tree support for the GIC.
- Patches 14 through 16 cleanup/fix GIC local interrupt support.

Based on 3.17-rc3 and boot tested on Danube (+ out of tree patches) and
Malta.  Build tested for SEAD-3.  Paul Burton has also tested v1 of this
series with his WIP Malta DT support [0].

Changes from v1:
 - updated bindings to drop third interrupt cell and remove CPU interrupt
   controller as the parent of the GIC
 - moved GIC to drivers/irqchip/
 - other minor fixes/cleanups

[0] https://github.com/paulburton/linux/commits/wip-malta-dt

Andrew Bresticker (16):
  MIPS: Provide a generic plat_irq_dispatch
  MIPS: Set vint handler when mapping CPU interrupts
  MIPS: Export CPU IRQ domain
  MIPS: smp-cps: Enable all hardware interrupts on secondary CPUs
  MIPS: Move GIC to drivers/irqchip/
  MIPS: Move MIPS_GIC_IRQ_BASE into platform irq.h
  irqchip: mips-gic: Implement irq_set_type callback
  irqchip: mips-gic: Implement generic irq_ack/irq_eoi callbacks
  irqchip: mips-gic: Fix gic_set_affinity() return value
  of: Add vendor prefix for MIPS Technologies, Inc.
  of: Add binding document for MIPS GIC
  irqchip: mips-gic: Add device-tree support
  irqchip: mips-gic: Add generic IPI support when using DT
  irqchip: mips-gic: Support local interrupts
  MIPS: GIC: Use local interrupts for timer
  MIPS: Malta: Map GIC local interrupts

 .../bindings/interrupt-controller/mips-gic.txt     |  39 ++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/mips/Kconfig                                  |  10 +-
 arch/mips/include/asm/gic.h                        |  36 ++
 arch/mips/include/asm/irq_cpu.h                    |   2 +
 arch/mips/include/asm/mach-generic/irq.h           |   7 +
 arch/mips/include/asm/mach-sead3/irq.h             |   1 +
 arch/mips/include/asm/mips-boards/maltaint.h       |   2 -
 arch/mips/include/asm/mips-boards/sead3int.h       |   2 -
 arch/mips/kernel/Makefile                          |   1 -
 arch/mips/kernel/cevt-gic.c                        |  16 +-
 arch/mips/kernel/cevt-r4k.c                        |   2 +-
 arch/mips/kernel/irq_cpu.c                         |  32 +-
 arch/mips/kernel/smp-cps.c                         |   4 +-
 arch/mips/kernel/smp-mt.c                          |   4 +-
 arch/mips/mti-malta/malta-int.c                    |  44 ++-
 arch/mips/mti-malta/malta-time.c                   |  10 +-
 drivers/irqchip/Kconfig                            |   4 +
 drivers/irqchip/Makefile                           |   1 +
 .../irq-gic.c => drivers/irqchip/irq-mips-gic.c    | 406 ++++++++++++++++++++-
 20 files changed, 567 insertions(+), 57 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt
 rename arch/mips/kernel/irq-gic.c => drivers/irqchip/irq-mips-gic.c (50%)

-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 18:51   ` Thomas Gleixner
  2014-09-05 17:30 ` [PATCH v2 02/16] MIPS: Set vint handler when mapping CPU interrupts Andrew Bresticker
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

For platforms which boot with device-tree and use the MIPS CPU interrupt
controller binding, a generic plat_irq_dispatch() can be used since all
CPU interrupts should be mapped through the CPU IRQ domain.  Implement a
plat_irq_dispatch() which simply handles the highest pending interrupt.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Jonas Gorski <jogo@openwrt.org>
---
No changes from v1.
---
 arch/mips/kernel/irq_cpu.c | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index e498f2b..9cf8459 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -116,6 +116,24 @@ void __init mips_cpu_irq_init(void)
 }
 
 #ifdef CONFIG_IRQ_DOMAIN
+static struct irq_domain *mips_intc_domain;
+
+asmlinkage void __weak plat_irq_dispatch(void)
+{
+	unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
+	unsigned int hw;
+	int irq;
+
+	if (!pending) {
+		spurious_interrupt();
+		return;
+	}
+
+	hw = fls(pending) - CAUSEB_IP - 1;
+	irq = irq_linear_revmap(mips_intc_domain, hw);
+	do_IRQ(irq);
+}
+
 static int mips_cpu_intc_map(struct irq_domain *d, unsigned int irq,
 			     irq_hw_number_t hw)
 {
@@ -141,15 +159,15 @@ static const struct irq_domain_ops mips_cpu_intc_irq_domain_ops = {
 int __init mips_cpu_intc_init(struct device_node *of_node,
 			      struct device_node *parent)
 {
-	struct irq_domain *domain;
-
 	/* Mask interrupts. */
 	clear_c0_status(ST0_IM);
 	clear_c0_cause(CAUSEF_IP);
 
-	domain = irq_domain_add_legacy(of_node, 8, MIPS_CPU_IRQ_BASE, 0,
-				       &mips_cpu_intc_irq_domain_ops, NULL);
-	if (!domain)
+	mips_intc_domain = irq_domain_add_legacy(of_node, 8,
+						 MIPS_CPU_IRQ_BASE, 0,
+						 &mips_cpu_intc_irq_domain_ops,
+						 NULL);
+	if (!mips_intc_domain)
 		panic("Failed to add irqdomain for MIPS CPU");
 
 	return 0;
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 02/16] MIPS: Set vint handler when mapping CPU interrupts
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 03/16] MIPS: Export CPU IRQ domain Andrew Bresticker
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

When mapping an interrupt in the CPU IRQ domain, set the vint handler
for that interrupt if the CPU uses vectored interrupt handling.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
No changes from v1.
---
 arch/mips/kernel/irq_cpu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index 9cf8459..33a4385 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -36,6 +36,7 @@
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
 #include <asm/mipsmtregs.h>
+#include <asm/setup.h>
 
 static inline void unmask_mips_irq(struct irq_data *d)
 {
@@ -146,6 +147,9 @@ static int mips_cpu_intc_map(struct irq_domain *d, unsigned int irq,
 		chip = &mips_cpu_irq_controller;
 	}
 
+	if (cpu_has_vint)
+		set_vi_handler(hw, plat_irq_dispatch);
+
 	irq_set_chip_and_handler(irq, chip, handle_percpu_irq);
 
 	return 0;
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 03/16] MIPS: Export CPU IRQ domain
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 02/16] MIPS: Set vint handler when mapping CPU interrupts Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 04/16] MIPS: smp-cps: Enable all hardware interrupts on secondary CPUs Andrew Bresticker
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

The GIC driver will use it to create the GIC-to-CPU interrupt mappings.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
New for v2.
---
 arch/mips/include/asm/irq_cpu.h | 2 ++
 arch/mips/kernel/irq_cpu.c      | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/irq_cpu.h b/arch/mips/include/asm/irq_cpu.h
index 3f11fdb..0dac19a 100644
--- a/arch/mips/include/asm/irq_cpu.h
+++ b/arch/mips/include/asm/irq_cpu.h
@@ -19,6 +19,8 @@ extern void rm9k_cpu_irq_init(void);
 
 #ifdef CONFIG_IRQ_DOMAIN
 struct device_node;
+struct irq_domain;
+extern struct irq_domain *mips_intc_domain;
 extern int mips_cpu_intc_init(struct device_node *of_node,
 			      struct device_node *parent);
 #endif
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index 33a4385..d206c49 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -117,7 +117,7 @@ void __init mips_cpu_irq_init(void)
 }
 
 #ifdef CONFIG_IRQ_DOMAIN
-static struct irq_domain *mips_intc_domain;
+struct irq_domain *mips_intc_domain;
 
 asmlinkage void __weak plat_irq_dispatch(void)
 {
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 04/16] MIPS: smp-cps: Enable all hardware interrupts on secondary CPUs
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (2 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 03/16] MIPS: Export CPU IRQ domain Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 05/16] MIPS: Move GIC to drivers/irqchip/ Andrew Bresticker
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Currently interrupt vectors 2 and 5 are left disabled on secondary CPUs.
Since systems using CPS must also have a GIC, which is responsible for
routing all external interrupts and can map them to any hardware interrupt
vector, enable the remaining vectors.  The two software interrupt vectors
are left disabled since they are not used with CPS.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
New for v2.
---
 arch/mips/kernel/smp-cps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index e6e16a1..cd20aca 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -273,8 +273,8 @@ static void cps_init_secondary(void)
 	if (cpu_has_mipsmt)
 		dmt();
 
-	change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 |
-				 STATUSF_IP6 | STATUSF_IP7);
+	change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP4 |
+				 STATUSF_IP5 | STATUSF_IP6 | STATUSF_IP7);
 }
 
 static void cps_smp_finish(void)
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 05/16] MIPS: Move GIC to drivers/irqchip/
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (3 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 04/16] MIPS: smp-cps: Enable all hardware interrupts on secondary CPUs Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 06/16] MIPS: Move MIPS_GIC_IRQ_BASE into platform irq.h Andrew Bresticker
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Move GIC irqchip support to drivers/irqchip/ and rename the Kconfig
option from IRQ_GIC to MIPS_GIC to avoid confusion with the ARM GIC.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
New for v2.

Should irq_cpu.c get moved over too?
---
 arch/mips/Kconfig                                            | 10 +++-------
 arch/mips/kernel/Makefile                                    |  1 -
 arch/mips/kernel/cevt-r4k.c                                  |  2 +-
 arch/mips/kernel/smp-mt.c                                    |  4 ++--
 arch/mips/mti-malta/malta-time.c                             | 10 +++++-----
 drivers/irqchip/Kconfig                                      |  4 ++++
 drivers/irqchip/Makefile                                     |  1 +
 arch/mips/kernel/irq-gic.c => drivers/irqchip/irq-mips-gic.c |  0
 8 files changed, 16 insertions(+), 16 deletions(-)
 rename arch/mips/kernel/irq-gic.c => drivers/irqchip/irq-mips-gic.c (100%)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 900c7e5..04586ec 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -319,7 +319,7 @@ config MIPS_MALTA
 	select GENERIC_ISA_DMA
 	select HAVE_PCSPKR_PLATFORM
 	select IRQ_CPU
-	select IRQ_GIC
+	select MIPS_GIC
 	select HW_HAS_PCI
 	select I8253
 	select I8259
@@ -360,7 +360,7 @@ config MIPS_SEAD3
 	select CPU_MIPSR2_IRQ_EI
 	select DMA_NONCOHERENT
 	select IRQ_CPU
-	select IRQ_GIC
+	select MIPS_GIC
 	select LIBFDT
 	select MIPS_MSC
 	select SYS_HAS_CPU_MIPS32_R1
@@ -1067,10 +1067,6 @@ config IRQ_TXX9
 config IRQ_GT641XX
 	bool
 
-config IRQ_GIC
-	select MIPS_CM
-	bool
-
 config PCI_GT64XXX_PCI0
 	bool
 
@@ -1884,7 +1880,7 @@ config FORCE_MAX_ZONEORDER
 
 config CEVT_GIC
 	bool "Use GIC global counter for clock events"
-	depends on IRQ_GIC && !MIPS_SEAD3
+	depends on MIPS_GIC && !MIPS_SEAD3
 	help
 	  Use the GIC global counter for the clock events. The R4K clock
 	  event driver is always present, so if the platform ends up not
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 008a2fe..3982e51 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -68,7 +68,6 @@ obj-$(CONFIG_IRQ_CPU_RM7K)	+= irq-rm7000.o
 obj-$(CONFIG_MIPS_MSC)		+= irq-msc01.o
 obj-$(CONFIG_IRQ_TXX9)		+= irq_txx9.o
 obj-$(CONFIG_IRQ_GT641XX)	+= irq-gt641xx.o
-obj-$(CONFIG_IRQ_GIC)		+= irq-gic.o
 
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_32BIT)		+= scall32-o32.o
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c
index bc127e2..5b8f8e3 100644
--- a/arch/mips/kernel/cevt-r4k.c
+++ b/arch/mips/kernel/cevt-r4k.c
@@ -85,7 +85,7 @@ void mips_event_handler(struct clock_event_device *dev)
  */
 static int c0_compare_int_pending(void)
 {
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	if (cpu_has_veic)
 		return gic_get_timer_pending();
 #endif
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 21f23ad..d60475f 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -119,7 +119,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
 	unsigned long flags;
 	int vpflags;
 
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	if (gic_present) {
 		gic_send_ipi_single(cpu, action);
 		return;
@@ -158,7 +158,7 @@ static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
 
 static void vsmp_init_secondary(void)
 {
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	/* This is Malta specific: IPI,performance and timer interrupts */
 	if (gic_present)
 		change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 |
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index 3778a35..a02f8f0 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -70,7 +70,7 @@ static void __init estimate_frequencies(void)
 {
 	unsigned long flags;
 	unsigned int count, start;
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	unsigned int giccount = 0, gicstart = 0;
 #endif
 
@@ -87,7 +87,7 @@ static void __init estimate_frequencies(void)
 
 	/* Initialize counters. */
 	start = read_c0_count();
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	if (gic_present)
 		GICREAD(GIC_REG(SHARED, GIC_SH_COUNTER_31_00), gicstart);
 #endif
@@ -97,7 +97,7 @@ static void __init estimate_frequencies(void)
 	while (!(CMOS_READ(RTC_REG_A) & RTC_UIP));
 
 	count = read_c0_count();
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	if (gic_present)
 		GICREAD(GIC_REG(SHARED, GIC_SH_COUNTER_31_00), giccount);
 #endif
@@ -107,7 +107,7 @@ static void __init estimate_frequencies(void)
 	count -= start;
 	mips_hpt_frequency = count;
 
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	if (gic_present) {
 		giccount -= gicstart;
 		gic_frequency = giccount;
@@ -191,7 +191,7 @@ void __init plat_time_init(void)
 	setup_pit_timer();
 #endif
 
-#ifdef CONFIG_IRQ_GIC
+#ifdef CONFIG_MIPS_GIC
 	if (gic_present) {
 		freq = freqround(gic_frequency, 5000);
 		printk("GIC frequency %d.%02d MHz\n", freq/1000000,
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index b8632bf..ddacccf 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -113,3 +113,7 @@ config IRQ_CROSSBAR
 	  The primary irqchip invokes the crossbar's callback which inturn allocates
 	  a free irq and configures the IP. Thus the peripheral interrupts are
 	  routed to one of the free irqchip interrupt lines.
+
+config MIPS_GIC
+	bool
+	select MIPS_CM
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 73052ba..fd47e0d 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -34,3 +34,4 @@ obj-$(CONFIG_XTENSA)			+= irq-xtensa-pic.o
 obj-$(CONFIG_XTENSA_MX)			+= irq-xtensa-mx.o
 obj-$(CONFIG_IRQ_CROSSBAR)		+= irq-crossbar.o
 obj-$(CONFIG_BRCMSTB_L2_IRQ)		+= irq-brcmstb-l2.o
+obj-$(CONFIG_MIPS_GIC)			+= irq-mips-gic.o
diff --git a/arch/mips/kernel/irq-gic.c b/drivers/irqchip/irq-mips-gic.c
similarity index 100%
rename from arch/mips/kernel/irq-gic.c
rename to drivers/irqchip/irq-mips-gic.c
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 06/16] MIPS: Move MIPS_GIC_IRQ_BASE into platform irq.h
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (4 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 05/16] MIPS: Move GIC to drivers/irqchip/ Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 07/16] irqchip: mips-gic: Implement irq_set_type callback Andrew Bresticker
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Define a generic MIPS_GIC_IRQ_BASE which is suitable for Malta and
the upcoming Danube board in <mach-generic/irq.h>.  Since Sead-3 is
different and uses a MIPS_GIC_IRQ_BASE equal to the CPU IRQ base (0),
define its MIPS_GIC_IRQ_BASE in <mach-sead3/irq.h>.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
No changes from v1.
---
 arch/mips/include/asm/mach-generic/irq.h     | 6 ++++++
 arch/mips/include/asm/mach-sead3/irq.h       | 1 +
 arch/mips/include/asm/mips-boards/maltaint.h | 2 --
 arch/mips/include/asm/mips-boards/sead3int.h | 2 --
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/mips/include/asm/mach-generic/irq.h b/arch/mips/include/asm/mach-generic/irq.h
index 139cd20..050e18b 100644
--- a/arch/mips/include/asm/mach-generic/irq.h
+++ b/arch/mips/include/asm/mach-generic/irq.h
@@ -36,4 +36,10 @@
 
 #endif /* CONFIG_IRQ_CPU */
 
+#ifdef CONFIG_MIPS_GIC
+#ifndef MIPS_GIC_IRQ_BASE
+#define MIPS_GIC_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8)
+#endif
+#endif /* CONFIG_MIPS_GIC */
+
 #endif /* __ASM_MACH_GENERIC_IRQ_H */
diff --git a/arch/mips/include/asm/mach-sead3/irq.h b/arch/mips/include/asm/mach-sead3/irq.h
index d8106f7..52c75d5 100644
--- a/arch/mips/include/asm/mach-sead3/irq.h
+++ b/arch/mips/include/asm/mach-sead3/irq.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_MACH_MIPS_IRQ_H
 #define __ASM_MACH_MIPS_IRQ_H
 
+#define MIPS_GIC_IRQ_BASE 0
 #define GIC_NUM_INTRS (24 + NR_CPUS * 2)
 #define NR_IRQS 256
 
diff --git a/arch/mips/include/asm/mips-boards/maltaint.h b/arch/mips/include/asm/mips-boards/maltaint.h
index e330732..9d23343 100644
--- a/arch/mips/include/asm/mips-boards/maltaint.h
+++ b/arch/mips/include/asm/mips-boards/maltaint.h
@@ -10,8 +10,6 @@
 #ifndef _MIPS_MALTAINT_H
 #define _MIPS_MALTAINT_H
 
-#define MIPS_GIC_IRQ_BASE	(MIPS_CPU_IRQ_BASE + 8)
-
 /*
  * Interrupts 0..15 are used for Malta ISA compatible interrupts
  */
diff --git a/arch/mips/include/asm/mips-boards/sead3int.h b/arch/mips/include/asm/mips-boards/sead3int.h
index 6b17aaf..11ebec9 100644
--- a/arch/mips/include/asm/mips-boards/sead3int.h
+++ b/arch/mips/include/asm/mips-boards/sead3int.h
@@ -14,6 +14,4 @@
 #define GIC_BASE_ADDR		0x1b1c0000
 #define GIC_ADDRSPACE_SZ	(128 * 1024)
 
-#define MIPS_GIC_IRQ_BASE	(MIPS_CPU_IRQ_BASE + 0)
-
 #endif /* !(_MIPS_SEAD3INT_H) */
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 07/16] irqchip: mips-gic: Implement irq_set_type callback
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (5 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 06/16] MIPS: Move MIPS_GIC_IRQ_BASE into platform irq.h Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 08/16] irqchip: mips-gic: Implement generic irq_ack/irq_eoi callbacks Andrew Bresticker
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Implement an irq_set_type callback for the GIC which is used to set
the polarity and trigger type of GIC interrupts.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
Changes from v1:
 - fixed polarity setting for edge-triggered interrupts
---
 arch/mips/include/asm/gic.h    |  9 +++++++
 drivers/irqchip/irq-mips-gic.c | 53 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h
index d7699cf..3beb4eb 100644
--- a/arch/mips/include/asm/gic.h
+++ b/arch/mips/include/asm/gic.h
@@ -23,6 +23,8 @@
 #define GIC_POL_NEG			0
 #define GIC_TRIG_EDGE			1
 #define GIC_TRIG_LEVEL			0
+#define GIC_TRIG_DUAL_ENABLE		1
+#define GIC_TRIG_DUAL_DISABLE		0
 
 #define MSK(n) ((1 << (n)) - 1)
 #define REG32(addr)		(*(volatile unsigned int *) (addr))
@@ -179,6 +181,13 @@
 		GIC_INTR_OFS(intr)), (1 << GIC_INTR_BIT(intr)), \
 		(trig) << GIC_INTR_BIT(intr))
 
+/* Dual edge triggering : Reset Value is always 0 */
+#define GIC_SH_SET_DUAL_OFS		0x0200
+#define GIC_SET_DUAL(intr, dual) \
+	GICBIS(GIC_REG_ADDR(SHARED, GIC_SH_SET_DUAL_OFS + \
+		GIC_INTR_OFS(intr)), (1 << GIC_INTR_BIT(intr)), \
+		(dual) << GIC_INTR_BIT(intr))
+
 /* Mask manipulation */
 #define GIC_SH_SMASK_OFS		0x0380
 #define GIC_SET_INTR_MASK(intr) \
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 9e9d8b9..f29bb4e 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -44,6 +44,8 @@ static struct gic_pcpu_mask pcpu_masks[NR_CPUS];
 static struct gic_pending_regs pending_regs[NR_CPUS];
 static struct gic_intrmask_regs intrmask_regs[NR_CPUS];
 
+static struct irq_chip gic_irq_controller;
+
 #if defined(CONFIG_CSRC_GIC) || defined(CONFIG_CEVT_GIC)
 cycle_t gic_read_count(void)
 {
@@ -237,6 +239,56 @@ static void gic_unmask_irq(struct irq_data *d)
 	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
 }
 
+static int gic_set_type(struct irq_data *d, unsigned int type)
+{
+	unsigned int irq = d->irq - gic_irq_base;
+	bool is_edge;
+
+	switch (type & IRQ_TYPE_SENSE_MASK) {
+	case IRQ_TYPE_EDGE_FALLING:
+		GIC_SET_POLARITY(irq, GIC_POL_NEG);
+		GIC_SET_TRIGGER(irq, GIC_TRIG_EDGE);
+		GIC_SET_DUAL(irq, GIC_TRIG_DUAL_DISABLE);
+		is_edge = true;
+		break;
+	case IRQ_TYPE_EDGE_RISING:
+		GIC_SET_POLARITY(irq, GIC_POL_POS);
+		GIC_SET_TRIGGER(irq, GIC_TRIG_EDGE);
+		GIC_SET_DUAL(irq, GIC_TRIG_DUAL_DISABLE);
+		is_edge = true;
+		break;
+	case IRQ_TYPE_EDGE_BOTH:
+		/* polarity is irrelevant in this case */
+		GIC_SET_TRIGGER(irq, GIC_TRIG_EDGE);
+		GIC_SET_DUAL(irq, GIC_TRIG_DUAL_ENABLE);
+		is_edge = true;
+		break;
+	case IRQ_TYPE_LEVEL_LOW:
+		GIC_SET_POLARITY(irq, GIC_POL_NEG);
+		GIC_SET_TRIGGER(irq, GIC_TRIG_LEVEL);
+		GIC_SET_DUAL(irq, GIC_TRIG_DUAL_DISABLE);
+		is_edge = false;
+		break;
+	case IRQ_TYPE_LEVEL_HIGH:
+	default:
+		GIC_SET_POLARITY(irq, GIC_POL_POS);
+		GIC_SET_TRIGGER(irq, GIC_TRIG_LEVEL);
+		GIC_SET_DUAL(irq, GIC_TRIG_DUAL_DISABLE);
+		is_edge = false;
+		break;
+	}
+
+	if (is_edge) {
+		gic_irq_flags[irq] |= GIC_TRIG_EDGE;
+		__irq_set_handler_locked(d->irq, handle_edge_irq);
+	} else {
+		gic_irq_flags[irq] &= ~GIC_TRIG_EDGE;
+		__irq_set_handler_locked(d->irq, handle_level_irq);
+	}
+
+	return 0;
+}
+
 #ifdef CONFIG_SMP
 static DEFINE_SPINLOCK(gic_lock);
 
@@ -277,6 +329,7 @@ static struct irq_chip gic_irq_controller = {
 	.irq_mask_ack		=	gic_mask_irq,
 	.irq_unmask		=	gic_unmask_irq,
 	.irq_eoi		=	gic_finish_irq,
+	.irq_set_type		=	gic_set_type,
 #ifdef CONFIG_SMP
 	.irq_set_affinity	=	gic_set_affinity,
 #endif
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 08/16] irqchip: mips-gic: Implement generic irq_ack/irq_eoi callbacks
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (6 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 07/16] irqchip: mips-gic: Implement irq_set_type callback Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 09/16] irqchip: mips-gic: Fix gic_set_affinity() return value Andrew Bresticker
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Implement a default gic_irq_ack() and gic_finish_irq().  These are
suitable for handling IPIs on Malta and the upcoming Danube board.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
No changes from v1.
---
 drivers/irqchip/irq-mips-gic.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index f29bb4e..0549768 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -239,6 +239,20 @@ static void gic_unmask_irq(struct irq_data *d)
 	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
 }
 
+void __weak gic_irq_ack(struct irq_data *d)
+{
+	GIC_CLR_INTR_MASK(d->irq - gic_irq_base);
+
+	/* Clear edge detector */
+	if (gic_irq_flags[d->irq - gic_irq_base] & GIC_TRIG_EDGE)
+		GICWRITE(GIC_REG(SHARED, GIC_SH_WEDGE), d->irq - gic_irq_base);
+}
+
+void __weak gic_finish_irq(struct irq_data *d)
+{
+	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
+}
+
 static int gic_set_type(struct irq_data *d, unsigned int type)
 {
 	unsigned int irq = d->irq - gic_irq_base;
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 09/16] irqchip: mips-gic: Fix gic_set_affinity() return value
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (7 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 08/16] irqchip: mips-gic: Implement generic irq_ack/irq_eoi callbacks Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc Andrew Bresticker
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

If the online CPU check in gic_set_affinity() fails, return a proper
errno value instead of -1.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
No changes from v1.
---
 drivers/irqchip/irq-mips-gic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 0549768..c0ff749 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -316,7 +316,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
 
 	cpumask_and(&tmp, cpumask, cpu_online_mask);
 	if (cpus_empty(tmp))
-		return -1;
+		return -EINVAL;
 
 	/* Assumption : cpumask refers to a single CPU */
 	spin_lock_irqsave(&gic_lock, flags);
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc.
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (8 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 09/16] irqchip: mips-gic: Fix gic_set_affinity() return value Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-22 14:23   ` Rob Herring
  2014-09-05 17:30 ` [PATCH v2 11/16] of: Add binding document for MIPS GIC Andrew Bresticker
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Add the vendor prefix "mti" for MIPS Technologies, Inc.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
New for v2.
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ac7269f..efa5a5b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -86,6 +86,7 @@ microchip	Microchip Technology Inc.
 mosaixtech	Mosaix Technologies, Inc.
 moxa	Moxa
 mpl	MPL AG
+mti	MIPS Technologies, Inc.
 mundoreader	Mundo Reader S.L.
 murata	Murata Manufacturing Co., Ltd.
 mxicy	Macronix International Co., Ltd.
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 11/16] of: Add binding document for MIPS GIC
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (9 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 12/16] irqchip: mips-gic: Add device-tree support Andrew Bresticker
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

The Global Interrupt Controller (GIC) present on certain MIPS systems
can be used to route external interrupts to individual VPEs and CPU
interrupt vectors.  It also supports a timer and software-generated
interrupts.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
Changes from v1:
 - moved from mips/ to interrupt-controller/
 - removed interrupts and interrupt-parent properties
 - added available-cpu-vectors property
 - dropped third cell in interrupt specifier
---
 .../bindings/interrupt-controller/mips-gic.txt     | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt

diff --git a/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt
new file mode 100644
index 0000000..81ca911
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt
@@ -0,0 +1,39 @@
+MIPS Global Interrupt Controller (GIC)
+
+The MIPS GIC routes external interrupts to individual VPEs and IRQ pins.
+It also supports local (per-processor) interrupts and software-generated
+interrupts which can be used as IPIs.
+
+Required properties:
+- compatible : Should be "mti,global-interrupt-controller"
+- reg : Base address and length of the GIC registers.
+- interrupts : Core interrupts to which the GIC may route external interrupts.
+- interrupt-controller : Identifies the node as an interrupt controller
+- #interrupt-cells : Specifies the number of cells needed to encode an
+  interrupt specifier.  Should be 2.
+  - The first cell is the GIC interrupt number.
+  - The second cell encodes the interrupt flags.
+    See <include/dt-bindings/interrupt-controller/irq.h> for a list of valid
+    flags.
+- mti,available-cpu-vectors : Specifies the list of CPU interrupt vectors
+  to which the GIC may route interrupts.  May contain up to 6 entries, one
+  for each of the CPU's hardware interrupt vectors.  Valid values are 2 - 7.
+
+Example:
+
+	gic: interrupt-controller@1bdc0000 {
+		compatible = "mti,global-interrupt-controller";
+		reg = <0x1bdc0000 0x20000>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+
+		mti,available-cpu-vectors = <2>, <3>, <4>, <5>;
+	};
+
+	uart@18101400 {
+		...
+		interrupt-parent = <&gic>;
+		interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
+		...
+	};
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 12/16] irqchip: mips-gic: Add device-tree support
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (10 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 11/16] of: Add binding document for MIPS GIC Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 13/16] irqchip: mips-gic: Add generic IPI support when using DT Andrew Bresticker
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Add device-tree support for the MIPS GIC.  With DT, no per-platform
static device interrupt mapping is supplied and instead all device
interrupts are specified through the DT.  The GIC-to-CPU interrupts
must also be specified in the DT.

Platforms using DT-based probing of the GIC need only supply the
GIC_NUM_INTRS and, if necessary, MIPS_GIC_IRQ_BASE values and
call of_irq_init() with an of_device_id table including the GIC.

Currenlty only legacy and vecotred interrupt modes are supported.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
Changes from v1:
 - updated for change in bindings
 - set base address and enable bit in GCR_GIC_BASE
---
 arch/mips/include/asm/gic.h    |  15 ++++++
 drivers/irqchip/irq-mips-gic.c | 102 ++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 116 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h
index 3beb4eb..3853c15 100644
--- a/arch/mips/include/asm/gic.h
+++ b/arch/mips/include/asm/gic.h
@@ -348,6 +348,10 @@ struct gic_shared_intr_map {
 #define GIC_CPU_INT3		3 /* .		      */
 #define GIC_CPU_INT4		4 /* .		      */
 #define GIC_CPU_INT5		5 /* Core Interrupt 7 */
+#define GIC_NUM_CPU_INT		6
+
+/* Add 2 to convert GIC CPU pin to core interrupt */
+#define GIC_CPU_PIN_OFFSET	2
 
 /* Local GIC interrupts. */
 #define GIC_INT_TMR		(GIC_CPU_INT5)
@@ -390,4 +394,15 @@ extern void gic_disable_interrupt(int irq_vec);
 extern void gic_irq_ack(struct irq_data *d);
 extern void gic_finish_irq(struct irq_data *d);
 extern void gic_platform_init(int irqs, struct irq_chip *irq_controller);
+
+#ifdef CONFIG_IRQ_DOMAIN
+extern int gic_of_init(struct device_node *node, struct device_node *parent);
+#else
+static inline int gic_of_init(struct device_node *node,
+			      struct device_node *parent)
+{
+	return 0;
+}
+#endif
+
 #endif /* _ASM_GICREGS_H */
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index c0ff749..d885749 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -8,17 +8,23 @@
  */
 #include <linux/bitmap.h>
 #include <linux/init.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
 #include <linux/smp.h>
-#include <linux/irq.h>
+#include <linux/interrupt.h>
 #include <linux/clocksource.h>
 
 #include <asm/io.h>
+#include <asm/irq_cpu.h>
 #include <asm/gic.h>
 #include <asm/setup.h>
+#include <asm/mips-cm.h>
 #include <asm/traps.h>
 #include <linux/hardirq.h>
 #include <asm-generic/bitops/find.h>
 
+#include "irqchip.h"
+
 unsigned int gic_frequency;
 unsigned int gic_present;
 unsigned long _gic_base;
@@ -467,3 +473,97 @@ void __init gic_init(unsigned long gic_base_addr,
 
 	gic_platform_init(numintrs, &gic_irq_controller);
 }
+
+#ifdef CONFIG_IRQ_DOMAIN
+/* CPU core IRQs used by GIC */
+static int gic_cpu_pin[GIC_NUM_CPU_INT];
+static int num_gic_cpu_pins;
+
+static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
+			      irq_hw_number_t hw)
+{
+	int pin = gic_cpu_pin[0] - GIC_CPU_PIN_OFFSET;
+
+	irq_set_chip_and_handler(irq, &gic_irq_controller, handle_level_irq);
+
+	GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_MAP_TO_PIN(hw)),
+		 GIC_MAP_TO_PIN_MSK | pin);
+	/* Map to VPE 0 by default */
+	GIC_SH_MAP_TO_VPE_SMASK(hw, 0);
+	set_bit(hw, pcpu_masks[0].pcpu_mask);
+
+	return 0;
+}
+
+static const struct irq_domain_ops gic_irq_domain_ops = {
+	.map = gic_irq_domain_map,
+	.xlate = irq_domain_xlate_twocell,
+};
+
+static void gic_irq_dispatch(unsigned int irq, struct irq_desc *desc)
+{
+	struct irq_domain *domain = irq_get_handler_data(irq);
+	unsigned int hwirq;
+
+	while ((hwirq = gic_get_int()) != GIC_NUM_INTRS) {
+		irq = irq_linear_revmap(domain, hwirq);
+		generic_handle_irq(irq);
+	}
+}
+
+void __weak __init gic_platform_init(int irqs, struct irq_chip *irq_controller)
+{
+}
+
+int __init gic_of_init(struct device_node *node, struct device_node *parent)
+{
+	struct irq_domain *domain;
+	struct resource res;
+	int i;
+
+	if (cpu_has_veic) {
+		pr_err("GIC EIC mode not supported with DT yet\n");
+		return -ENODEV;
+	}
+
+	for (i = 0; i < ARRAY_SIZE(gic_cpu_pin); i++) {
+		if (of_property_read_u32_index(node,
+					       "mti,available-cpu-vectors",
+					       i, &gic_cpu_pin[i]))
+			break;
+		num_gic_cpu_pins++;
+	}
+	if (!num_gic_cpu_pins) {
+		pr_err("No available CPU interrupt vectors for GIC\n");
+		return -ENODEV;
+	}
+
+	if (of_address_to_resource(node, 0, &res)) {
+		pr_err("Failed to get GIC memory range\n");
+		return -ENODEV;
+	}
+
+	if (mips_cm_present())
+		write_gcr_gic_base(res.start | CM_GCR_GIC_BASE_GICEN_MSK);
+
+	gic_init(res.start, resource_size(&res), NULL, 0, MIPS_GIC_IRQ_BASE);
+
+	domain = irq_domain_add_legacy(node, GIC_NUM_INTRS, MIPS_GIC_IRQ_BASE,
+				       0, &gic_irq_domain_ops, NULL);
+	if (!domain) {
+		pr_err("Failed to add GIC IRQ domain\n");
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < num_gic_cpu_pins; i++) {
+		int irq;
+
+		irq = irq_create_mapping(mips_intc_domain, gic_cpu_pin[i]);
+		irq_set_chained_handler(irq, gic_irq_dispatch);
+		irq_set_handler_data(irq, domain);
+	}
+
+	return 0;
+}
+IRQCHIP_DECLARE(mips_gic, "mti,global-interrupt-controller", gic_of_init);
+#endif
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 13/16] irqchip: mips-gic: Add generic IPI support when using DT
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (11 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 12/16] irqchip: mips-gic: Add device-tree support Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 14/16] irqchip: mips-gic: Support local interrupts Andrew Bresticker
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

When DT-based probing is used for the GIC and the GIC is also used
for IPIs (i.e. MIPS_GIC_IPI=y), set up the last 2 * NR_CPUs GIC
interrupts as the reschedule and call IPIs.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
Changes from v1:
 - removed open-coding of irq_set_type
---
 drivers/irqchip/irq-mips-gic.c | 81 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index d885749..82a35cf 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -10,6 +10,7 @@
 #include <linux/init.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
+#include <linux/sched.h>
 #include <linux/smp.h>
 #include <linux/interrupt.h>
 #include <linux/clocksource.h>
@@ -479,6 +480,84 @@ void __init gic_init(unsigned long gic_base_addr,
 static int gic_cpu_pin[GIC_NUM_CPU_INT];
 static int num_gic_cpu_pins;
 
+#ifdef CONFIG_MIPS_GIC_IPI
+static int gic_resched_int_base;
+static int gic_call_int_base;
+
+unsigned int plat_ipi_resched_int_xlate(unsigned int cpu)
+{
+	return gic_resched_int_base + cpu;
+}
+
+unsigned int plat_ipi_call_int_xlate(unsigned int cpu)
+{
+	return gic_call_int_base + cpu;
+}
+
+static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
+{
+	scheduler_ipi();
+
+	return IRQ_HANDLED;
+}
+
+static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
+{
+	smp_call_function_interrupt();
+
+	return IRQ_HANDLED;
+}
+
+static struct irqaction irq_resched = {
+	.handler	= ipi_resched_interrupt,
+	.flags		= IRQF_PERCPU,
+	.name		= "IPI resched"
+};
+
+static struct irqaction irq_call = {
+	.handler	= ipi_call_interrupt,
+	.flags		= IRQF_PERCPU,
+	.name		= "IPI call"
+};
+
+static __init void gic_ipi_init_one(struct irq_domain *domain,
+				    unsigned int hwirq, int cpu,
+				    struct irqaction *action)
+{
+	int irq = irq_create_mapping(domain, hwirq);
+	int i;
+
+	GIC_SH_MAP_TO_VPE_SMASK(hwirq, cpu);
+	for (i = 0; i < NR_CPUS; i++)
+		clear_bit(hwirq, pcpu_masks[i].pcpu_mask);
+	set_bit(hwirq, pcpu_masks[cpu].pcpu_mask);
+
+	irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
+
+	irq_set_chip_and_handler(irq, &gic_irq_controller, handle_percpu_irq);
+	setup_irq(irq, action);
+}
+
+static __init void gic_ipi_init(struct irq_domain *domain)
+{
+	int i;
+
+	/* Use last 2 * NR_CPUS interrupts as IPIs */
+	gic_resched_int_base = GIC_NUM_INTRS - nr_cpu_ids;
+	gic_call_int_base = gic_resched_int_base - nr_cpu_ids;
+
+	for (i = 0; i < nr_cpu_ids; i++) {
+		gic_ipi_init_one(domain, gic_call_int_base + i, i, &irq_call);
+		gic_ipi_init_one(domain, gic_resched_int_base + i, i,
+				 &irq_resched);
+	}
+}
+#else
+static inline void gic_ipi_init(struct irq_domain *domain)
+{
+}
+#endif
+
 static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 			      irq_hw_number_t hw)
 {
@@ -563,6 +642,8 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent)
 		irq_set_handler_data(irq, domain);
 	}
 
+	gic_ipi_init(domain);
+
 	return 0;
 }
 IRQCHIP_DECLARE(mips_gic, "mti,global-interrupt-controller", gic_of_init);
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 14/16] irqchip: mips-gic: Support local interrupts
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (12 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 13/16] irqchip: mips-gic: Add generic IPI support when using DT Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 19:05   ` Thomas Gleixner
  2014-09-05 17:30 ` [PATCH v2 15/16] MIPS: GIC: Use local interrupts for timer Andrew Bresticker
  2014-09-05 17:30 ` [PATCH v2 16/16] MIPS: Malta: Map GIC local interrupts Andrew Bresticker
  15 siblings, 1 reply; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

The MIPS GIC supports 7 local interrupts, 5 of which are just core
interrupts which can be re-routed through the GIC.  This patch adds
support for mapping and handling the remaining two: the GIC timer
and watchdog.  GIC interrupts from 0 to GIC_NUM_INTRS are still the
shared external interrupts while interrupts from GIC_NUM_INTRS to
GIC_NUM_INTRS + GIC_NUM_LOCAL_INTRS are local interrupts.

With device-tree based probing, the GIC local interrupts will be routed
to the first GIC-to-CPU pin.  For platforms using a static mapping, the
local interrupts can be initialized by extending the interrupt mapping
table passed to gic_init.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
No changes from v1.
---
 arch/mips/include/asm/gic.h              |  12 +++
 arch/mips/include/asm/mach-generic/irq.h |   1 +
 drivers/irqchip/irq-mips-gic.c           | 180 +++++++++++++++++++++++++++----
 3 files changed, 171 insertions(+), 22 deletions(-)

diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h
index 3853c15..d5b2d84 100644
--- a/arch/mips/include/asm/gic.h
+++ b/arch/mips/include/asm/gic.h
@@ -217,6 +217,10 @@
 #define GIC_VPE_COMPARE_LO_OFS		0x00a0
 #define GIC_VPE_COMPARE_HI_OFS		0x00a4
 
+#define GIC_VPE_MAP_OFS			0x0040
+#define GIC_VPE_MAP_TO_PIN(intr) \
+	(GIC_VPE_MAP_OFS + 4 * (intr))
+
 #define GIC_VPE_EIC_SHADOW_SET_BASE	0x0100
 #define GIC_VPE_EIC_SS(intr) \
 	(GIC_VPE_EIC_SHADOW_SET_BASE + (4 * intr))
@@ -354,6 +358,11 @@ struct gic_shared_intr_map {
 #define GIC_CPU_PIN_OFFSET	2
 
 /* Local GIC interrupts. */
+#define GIC_LOCAL_INTR_WD	0 /* GIC watchdog timer */
+#define GIC_LOCAL_INTR_COMPARE	1 /* GIC count/compare timer */
+#define GIC_NUM_LOCAL_INTRS	2
+
+/* Pin mapping for CPU interrupts routable through the GIC. */
 #define GIC_INT_TMR		(GIC_CPU_INT5)
 #define GIC_INT_PERFCTR		(GIC_CPU_INT5)
 
@@ -389,6 +398,9 @@ extern void gic_bind_eic_interrupt(int irq, int set);
 extern unsigned int gic_get_timer_pending(void);
 extern void gic_get_int_mask(unsigned long *dst, const unsigned long *src);
 extern unsigned int gic_get_int(void);
+extern void gic_get_local_int_mask(unsigned long *dst,
+				   const unsigned long *src);
+extern unsigned int gic_get_local_int(void);
 extern void gic_enable_interrupt(int irq_vec);
 extern void gic_disable_interrupt(int irq_vec);
 extern void gic_irq_ack(struct irq_data *d);
diff --git a/arch/mips/include/asm/mach-generic/irq.h b/arch/mips/include/asm/mach-generic/irq.h
index 050e18b..9233df6 100644
--- a/arch/mips/include/asm/mach-generic/irq.h
+++ b/arch/mips/include/asm/mach-generic/irq.h
@@ -40,6 +40,7 @@
 #ifndef MIPS_GIC_IRQ_BASE
 #define MIPS_GIC_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8)
 #endif
+#define MIPS_GIC_LOCAL_IRQ_BASE (MIPS_GIC_IRQ_BASE + GIC_NUM_INTRS)
 #endif /* CONFIG_MIPS_GIC */
 
 #endif /* __ASM_MACH_GENERIC_IRQ_H */
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 82a35cf..638b75c 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -53,6 +53,21 @@ static struct gic_intrmask_regs intrmask_regs[NR_CPUS];
 
 static struct irq_chip gic_irq_controller;
 
+static inline bool gic_is_local_irq(unsigned int hwirq)
+{
+	return hwirq >= GIC_NUM_INTRS;
+}
+
+static inline unsigned int gic_hw_to_local_irq(unsigned int hwirq)
+{
+	return hwirq - GIC_NUM_INTRS;
+}
+
+static inline unsigned int gic_local_to_hw_irq(unsigned int irq)
+{
+	return irq + GIC_NUM_INTRS;
+}
+
 #if defined(CONFIG_CSRC_GIC) || defined(CONFIG_CEVT_GIC)
 cycle_t gic_read_count(void)
 {
@@ -236,28 +251,77 @@ unsigned int gic_get_int(void)
 	return find_first_bit(interrupts, GIC_NUM_INTRS);
 }
 
+void gic_get_local_int_mask(unsigned long *dst, const unsigned long *src)
+{
+	unsigned long pending, intrmask;
+
+	GICREAD(GIC_REG(VPE_LOCAL, GIC_VPE_PEND), pending);
+	GICREAD(GIC_REG(VPE_LOCAL, GIC_VPE_MASK), intrmask);
+
+	bitmap_and(&pending, &pending, &intrmask, GIC_NUM_LOCAL_INTRS);
+	bitmap_and(dst, src, &pending, GIC_NUM_LOCAL_INTRS);
+}
+
+unsigned int gic_get_local_int(void)
+{
+	unsigned long interrupts;
+
+	bitmap_fill(&interrupts, GIC_NUM_LOCAL_INTRS);
+	gic_get_local_int_mask(&interrupts, &interrupts);
+
+	return find_first_bit(&interrupts, GIC_NUM_LOCAL_INTRS);
+}
+
 static void gic_mask_irq(struct irq_data *d)
 {
-	GIC_CLR_INTR_MASK(d->irq - gic_irq_base);
+	unsigned int irq = d->irq - gic_irq_base;
+
+	if (gic_is_local_irq(irq)) {
+		GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_RMASK),
+			 1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
+	} else {
+		GIC_CLR_INTR_MASK(irq);
+	}
 }
 
 static void gic_unmask_irq(struct irq_data *d)
 {
-	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
+	unsigned int irq = d->irq - gic_irq_base;
+
+	if (gic_is_local_irq(irq)) {
+		GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_SMASK),
+			 1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
+	} else {
+		GIC_SET_INTR_MASK(irq);
+	}
 }
 
 void __weak gic_irq_ack(struct irq_data *d)
 {
-	GIC_CLR_INTR_MASK(d->irq - gic_irq_base);
+	unsigned int irq = d->irq - gic_irq_base;
 
-	/* Clear edge detector */
-	if (gic_irq_flags[d->irq - gic_irq_base] & GIC_TRIG_EDGE)
-		GICWRITE(GIC_REG(SHARED, GIC_SH_WEDGE), d->irq - gic_irq_base);
+	if (gic_is_local_irq(irq)) {
+		GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_RMASK),
+			 1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
+	} else {
+		GIC_CLR_INTR_MASK(irq);
+
+		/* Clear edge detector */
+		if (gic_irq_flags[irq] & GIC_TRIG_EDGE)
+			GICWRITE(GIC_REG(SHARED, GIC_SH_WEDGE), irq);
+	}
 }
 
 void __weak gic_finish_irq(struct irq_data *d)
 {
-	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
+	unsigned int irq = d->irq - gic_irq_base;
+
+	if (gic_is_local_irq(irq)) {
+		GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_SMASK),
+			 1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
+	} else {
+		GIC_SET_INTR_MASK(irq);
+	}
 }
 
 static int gic_set_type(struct irq_data *d, unsigned int type)
@@ -265,6 +329,9 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
 	unsigned int irq = d->irq - gic_irq_base;
 	bool is_edge;
 
+	if (gic_is_local_irq(irq))
+		return -EINVAL;
+
 	switch (type & IRQ_TYPE_SENSE_MASK) {
 	case IRQ_TYPE_EDGE_FALLING:
 		GIC_SET_POLARITY(irq, GIC_POL_NEG);
@@ -321,6 +388,9 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
 	unsigned long	flags;
 	int		i;
 
+	if (gic_is_local_irq(irq))
+		return -EINVAL;
+
 	cpumask_and(&tmp, cpumask, cpu_online_mask);
 	if (cpus_empty(tmp))
 		return -EINVAL;
@@ -406,6 +476,42 @@ static void __init gic_setup_intr(unsigned int intr, unsigned int cpu,
 		gic_irq_flags[intr] |= GIC_TRIG_EDGE;
 }
 
+static void __init gic_setup_local_intr(unsigned int intr, unsigned int pin,
+				unsigned int flags)
+{
+	struct gic_shared_intr_map *map_ptr;
+	unsigned int local_irq = gic_hw_to_local_irq(intr);
+	int i;
+
+	/* Setup Intr to Pin mapping */
+	for (i = 0; i < nr_cpu_ids; i++) {
+		GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_OTHER_ADDR), i);
+		if (pin & GIC_MAP_TO_NMI_MSK) {
+			GICWRITE(GIC_REG_ADDR(VPE_OTHER,
+					GIC_VPE_MAP_TO_PIN(local_irq)), pin);
+		} else {
+			GICWRITE(GIC_REG_ADDR(VPE_OTHER,
+					GIC_VPE_MAP_TO_PIN(local_irq)),
+				 GIC_MAP_TO_PIN_MSK | pin);
+		}
+	}
+
+	if (!(pin & GIC_MAP_TO_NMI_MSK) && cpu_has_veic) {
+		set_vi_handler(pin + GIC_PIN_TO_VEC_OFFSET,
+			       gic_eic_irq_dispatch);
+		map_ptr = &gic_shared_intr_map[pin + GIC_PIN_TO_VEC_OFFSET];
+		if (map_ptr->num_shared_intr >= GIC_MAX_SHARED_INTR)
+			BUG();
+		map_ptr->intr_list[map_ptr->num_shared_intr++] = intr;
+	}
+
+	/* Init Intr Masks */
+	GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_RMASK),
+		 1 << GIC_INTR_BIT(local_irq));
+
+	irq_set_percpu_devid(gic_irq_base + intr);
+}
+
 static void __init gic_basic_init(int numintrs, int numvpes,
 			struct gic_intr_map *intrmap, int mapsize)
 {
@@ -438,12 +544,17 @@ static void __init gic_basic_init(int numintrs, int numvpes,
 		cpu = intrmap[i].cpunum;
 		if (cpu == GIC_UNUSED)
 			continue;
-		gic_setup_intr(i,
-			intrmap[i].cpunum,
-			intrmap[i].pin + pin_offset,
-			intrmap[i].polarity,
-			intrmap[i].trigtype,
-			intrmap[i].flags);
+		if (gic_is_local_irq(i))
+			gic_setup_local_intr(i,
+				intrmap[i].pin + pin_offset,
+				intrmap[i].flags);
+		else
+			gic_setup_intr(i,
+				intrmap[i].cpunum,
+				intrmap[i].pin + pin_offset,
+				intrmap[i].polarity,
+				intrmap[i].trigtype,
+				intrmap[i].flags);
 	}
 
 	vpe_local_setup(numvpes);
@@ -472,7 +583,8 @@ void __init gic_init(unsigned long gic_base_addr,
 
 	gic_basic_init(numintrs, numvpes, intr_map, intr_map_size);
 
-	gic_platform_init(numintrs, &gic_irq_controller);
+	gic_platform_init(GIC_NUM_INTRS + GIC_NUM_LOCAL_INTRS,
+			  &gic_irq_controller);
 }
 
 #ifdef CONFIG_IRQ_DOMAIN
@@ -563,13 +675,30 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 {
 	int pin = gic_cpu_pin[0] - GIC_CPU_PIN_OFFSET;
 
-	irq_set_chip_and_handler(irq, &gic_irq_controller, handle_level_irq);
+	if (gic_is_local_irq(hw)) {
+		int i;
+		int local_irq = gic_hw_to_local_irq(hw);
+
+		irq_set_chip_and_handler(irq, &gic_irq_controller,
+					 handle_percpu_irq);
+		irq_set_percpu_devid(irq);
 
-	GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_MAP_TO_PIN(hw)),
-		 GIC_MAP_TO_PIN_MSK | pin);
-	/* Map to VPE 0 by default */
-	GIC_SH_MAP_TO_VPE_SMASK(hw, 0);
-	set_bit(hw, pcpu_masks[0].pcpu_mask);
+		for (i = 0; i < nr_cpu_ids; i++) {
+			GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_OTHER_ADDR), i);
+			GICWRITE(GIC_REG_ADDR(VPE_OTHER,
+					      GIC_VPE_MAP_TO_PIN(local_irq)),
+				 GIC_MAP_TO_PIN_MSK | pin);
+		}
+	} else {
+		irq_set_chip_and_handler(irq, &gic_irq_controller,
+					 handle_level_irq);
+
+		GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_MAP_TO_PIN(hw)),
+			 GIC_MAP_TO_PIN_MSK | pin);
+		/* Map to VPE 0 by default */
+		GIC_SH_MAP_TO_VPE_SMASK(hw, 0);
+		set_bit(hw, pcpu_masks[0].pcpu_mask);
+	}
 
 	return 0;
 }
@@ -584,6 +713,11 @@ static void gic_irq_dispatch(unsigned int irq, struct irq_desc *desc)
 	struct irq_domain *domain = irq_get_handler_data(irq);
 	unsigned int hwirq;
 
+	while ((hwirq = gic_get_local_int()) != GIC_NUM_LOCAL_INTRS) {
+		irq = irq_linear_revmap(domain, gic_local_to_hw_irq(hwirq));
+		generic_handle_irq(irq);
+	}
+
 	while ((hwirq = gic_get_int()) != GIC_NUM_INTRS) {
 		irq = irq_linear_revmap(domain, hwirq);
 		generic_handle_irq(irq);
@@ -627,8 +761,10 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent)
 
 	gic_init(res.start, resource_size(&res), NULL, 0, MIPS_GIC_IRQ_BASE);
 
-	domain = irq_domain_add_legacy(node, GIC_NUM_INTRS, MIPS_GIC_IRQ_BASE,
-				       0, &gic_irq_domain_ops, NULL);
+	domain = irq_domain_add_legacy(node,
+				       GIC_NUM_INTRS + GIC_NUM_LOCAL_INTRS,
+				       MIPS_GIC_IRQ_BASE, 0,
+				       &gic_irq_domain_ops, NULL);
 	if (!domain) {
 		pr_err("Failed to add GIC IRQ domain\n");
 		return -ENOMEM;
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 15/16] MIPS: GIC: Use local interrupts for timer
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (13 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 14/16] irqchip: mips-gic: Support local interrupts Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  2014-09-05 19:08   ` Thomas Gleixner
  2014-09-05 17:30 ` [PATCH v2 16/16] MIPS: Malta: Map GIC local interrupts Andrew Bresticker
  15 siblings, 1 reply; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Instead of using GIC interrupt 0 for the timer (which was not even
handled correctly by the GIC irqchip code and could conflict with an
actual external interrupt), use the designated local interrupt for
the GIC timer.

Also, since the timer is a per-CPU interrupt, initialize it with
setup_percpu_irq() and enable it with enable_percpu_irq() instead
of using direct register writes.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
No changes from v1.
---
 arch/mips/kernel/cevt-gic.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/arch/mips/kernel/cevt-gic.c b/arch/mips/kernel/cevt-gic.c
index 6093716..cae72a4 100644
--- a/arch/mips/kernel/cevt-gic.c
+++ b/arch/mips/kernel/cevt-gic.c
@@ -68,7 +68,7 @@ int gic_clockevent_init(void)
 	if (!cpu_has_counter || !gic_frequency)
 		return -ENXIO;
 
-	irq = MIPS_GIC_IRQ_BASE;
+	irq = MIPS_GIC_LOCAL_IRQ_BASE + GIC_LOCAL_INTR_COMPARE;
 
 	cd = &per_cpu(gic_clockevent_device, cpu);
 
@@ -91,15 +91,13 @@ int gic_clockevent_init(void)
 
 	clockevents_register_device(cd);
 
-	GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_MAP), 0x80000002);
-	GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_SMASK), GIC_VPE_SMASK_CMP_MSK);
+	if (!gic_timer_irq_installed) {
+		setup_percpu_irq(irq, &gic_compare_irqaction);
+		irq_set_handler(irq, handle_percpu_irq);
+		gic_timer_irq_installed = 1;
+	}
 
-	if (gic_timer_irq_installed)
-		return 0;
+	enable_percpu_irq(irq, 0);
 
-	gic_timer_irq_installed = 1;
-
-	setup_irq(irq, &gic_compare_irqaction);
-	irq_set_handler(irq, handle_percpu_irq);
 	return 0;
 }
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 16/16] MIPS: Malta: Map GIC local interrupts
  2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
                   ` (14 preceding siblings ...)
  2014-09-05 17:30 ` [PATCH v2 15/16] MIPS: GIC: Use local interrupts for timer Andrew Bresticker
@ 2014-09-05 17:30 ` Andrew Bresticker
  15 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 17:30 UTC (permalink / raw)
  To: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper
  Cc: Andrew Bresticker, Jeffrey Deans, Markos Chandras, Paul Burton,
	Arnd Bergmann, John Crispin, David Daney, linux-mips, devicetree,
	linux-kernel

Now that the GIC driver properly supports local interrupts, extend
the static interrupt mapping to include the GIC timer and watchdog
and fix up the GIC interrupt setup and handling so that the local
interrupts are properly handled.  Note that ipi_map is also renamed
to gic_irq_map since it is now also used to track mapping of non-IPI
interrupts to CPUs.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
No changes from v1.
---
 arch/mips/mti-malta/malta-int.c | 44 +++++++++++++++++++++++++++++++----------
 1 file changed, 34 insertions(+), 10 deletions(-)

diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c
index e4f43ba..16b1473 100644
--- a/arch/mips/mti-malta/malta-int.c
+++ b/arch/mips/mti-malta/malta-int.c
@@ -38,7 +38,7 @@
 #include <asm/rtlx.h>
 
 static unsigned long _msc01_biu_base;
-static unsigned int ipi_map[NR_CPUS];
+static unsigned int gic_irq_map[NR_CPUS];
 
 static DEFINE_RAW_SPINLOCK(mips_irq_lock);
 
@@ -129,8 +129,8 @@ static void malta_hw0_irqdispatch(void)
 
 static void malta_ipi_irqdispatch(void)
 {
-#ifdef CONFIG_MIPS_GIC_IPI
 	unsigned long irq;
+#ifdef CONFIG_MIPS_GIC_IPI
 	DECLARE_BITMAP(pending, GIC_NUM_INTRS);
 
 	gic_get_int_mask(pending, ipi_ints);
@@ -143,8 +143,12 @@ static void malta_ipi_irqdispatch(void)
 		irq = find_next_bit(pending, GIC_NUM_INTRS, irq + 1);
 	}
 #endif
-	if (gic_compare_int())
-		do_IRQ(MIPS_GIC_IRQ_BASE);
+	irq = gic_get_local_int();
+	while (irq < GIC_NUM_LOCAL_INTRS) {
+		do_IRQ(MIPS_GIC_LOCAL_IRQ_BASE + irq);
+
+		irq = gic_get_local_int();
+	}
 }
 
 static void corehi_irqdispatch(void)
@@ -288,7 +292,7 @@ asmlinkage void plat_irq_dispatch(void)
 
 	if (irq == MIPSCPU_INT_I8259A)
 		malta_hw0_irqdispatch();
-	else if (gic_present && ((1 << irq) & ipi_map[smp_processor_id()]))
+	else if (gic_present && ((1 << irq) & gic_irq_map[smp_processor_id()]))
 		malta_ipi_irqdispatch();
 	else
 		do_IRQ(MIPS_CPU_IRQ_BASE + irq);
@@ -408,7 +412,7 @@ static int msc_nr_eicirqs __initdata = ARRAY_SIZE(msc_eicirqmap);
 #define GIC_CPU_NMI GIC_MAP_TO_NMI_MSK
 #define X GIC_UNUSED
 
-static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = {
+static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS + GIC_NUM_LOCAL_INTRS] = {
 	{ X, X,		   X,		X,		0 },
 	{ X, X,		   X,		X,		0 },
 	{ X, X,		   X,		X,		0 },
@@ -425,7 +429,10 @@ static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = {
 	{ 0, GIC_CPU_NMI,  GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT },
 	{ 0, GIC_CPU_NMI,  GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT },
 	{ X, X,		   X,		X,		0 },
-	/* The remainder of this table is initialised by fill_ipi_map */
+	/*
+	 * The remainder of this table is initialised by fill_ipi_map and
+	 * fill_local_irq_map
+	 */
 };
 #undef X
 
@@ -438,7 +445,7 @@ static void __init fill_ipi_map1(int baseintr, int cpu, int cpupin)
 	gic_intr_map[intr].polarity = GIC_POL_POS;
 	gic_intr_map[intr].trigtype = GIC_TRIG_EDGE;
 	gic_intr_map[intr].flags = 0;
-	ipi_map[cpu] |= (1 << (cpupin + 2));
+	gic_irq_map[cpu] |= (1 << (cpupin + 2));
 	bitmap_set(ipi_ints, intr, 1);
 }
 
@@ -453,6 +460,22 @@ static void __init fill_ipi_map(void)
 }
 #endif
 
+static void __init fill_local_irq_map(void)
+{
+	int i;
+
+	for (i = 0; i < GIC_NUM_LOCAL_INTRS; i++) {
+		int intr = i + GIC_NUM_INTRS;
+
+		gic_intr_map[intr].cpunum = 0;
+		gic_intr_map[intr].pin = GIC_CPU_INT2;
+		gic_intr_map[intr].flags = 0;
+	}
+
+	for (i = 0; i < NR_CPUS; i++)
+		gic_irq_map[i] |= 1 << (GIC_CPU_INT2 + 2);
+}
+
 void __init arch_init_ipiirq(int irq, struct irqaction *action)
 {
 	setup_irq(irq, action);
@@ -533,6 +556,7 @@ void __init arch_init_irq(void)
 		gic_resched_int_base = gic_call_int_base - nr_cpu_ids;
 		fill_ipi_map();
 #endif
+		fill_local_irq_map();
 		gic_init(GIC_BASE_ADDR, GIC_ADDRSPACE_SZ, gic_intr_map,
 				ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE);
 		if (!mips_cm_present()) {
@@ -542,8 +566,7 @@ void __init arch_init_irq(void)
 				(i | (0x1 << MSC01_SC_CFG_GICENA_SHF));
 			pr_debug("GIC Enabled\n");
 		}
-#if defined(CONFIG_MIPS_GIC_IPI)
-		/* set up ipi interrupts */
+		/* set up ipi and local interrupts */
 		if (cpu_has_vint) {
 			set_vi_handler(MIPSCPU_INT_IPI0, malta_ipi_irqdispatch);
 			set_vi_handler(MIPSCPU_INT_IPI1, malta_ipi_irqdispatch);
@@ -557,6 +580,7 @@ void __init arch_init_irq(void)
 		write_c0_status(0x1100dc00);
 		pr_info("CPU%d: status register frc %08x\n",
 			smp_processor_id(), read_c0_status());
+#if defined(CONFIG_MIPS_GIC_IPI)
 		for (i = 0; i < nr_cpu_ids; i++) {
 			arch_init_ipiirq(MIPS_GIC_IRQ_BASE +
 					 GIC_RESCHED_INT(i), &irq_resched);
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch
  2014-09-05 17:30 ` [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch Andrew Bresticker
@ 2014-09-05 18:51   ` Thomas Gleixner
  2014-09-05 21:02     ` Andrew Bresticker
  0 siblings, 1 reply; 28+ messages in thread
From: Thomas Gleixner @ 2014-09-05 18:51 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, linux-mips, devicetree, linux-kernel

On Fri, 5 Sep 2014, Andrew Bresticker wrote:
> For platforms which boot with device-tree and use the MIPS CPU interrupt
> controller binding, a generic plat_irq_dispatch() can be used since all
> CPU interrupts should be mapped through the CPU IRQ domain.  Implement a
> plat_irq_dispatch() which simply handles the highest pending interrupt.
> 
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> Tested-by: Jonas Gorski <jogo@openwrt.org>
> ---
> No changes from v1.
> ---
>  arch/mips/kernel/irq_cpu.c | 28 +++++++++++++++++++++++-----
>  1 file changed, 23 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
> index e498f2b..9cf8459 100644
> --- a/arch/mips/kernel/irq_cpu.c
> +++ b/arch/mips/kernel/irq_cpu.c
> @@ -116,6 +116,24 @@ void __init mips_cpu_irq_init(void)
>  }
>  
>  #ifdef CONFIG_IRQ_DOMAIN
> +static struct irq_domain *mips_intc_domain;
> +
> +asmlinkage void __weak plat_irq_dispatch(void)
> +{
> +	unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
> +	unsigned int hw;
> +	int irq;
> +
> +	if (!pending) {
> +		spurious_interrupt();
> +		return;
> +	}
> +
> +	hw = fls(pending) - CAUSEB_IP - 1;
> +	irq = irq_linear_revmap(mips_intc_domain, hw);
> +	do_IRQ(irq);

Why are you not handling all pending interrupts in a loop?

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 14/16] irqchip: mips-gic: Support local interrupts
  2014-09-05 17:30 ` [PATCH v2 14/16] irqchip: mips-gic: Support local interrupts Andrew Bresticker
@ 2014-09-05 19:05   ` Thomas Gleixner
  2014-09-05 21:50     ` Andrew Bresticker
  0 siblings, 1 reply; 28+ messages in thread
From: Thomas Gleixner @ 2014-09-05 19:05 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, linux-mips, devicetree, linux-kernel

On Fri, 5 Sep 2014, Andrew Bresticker wrote:
>  static void gic_mask_irq(struct irq_data *d)
>  {
> -	GIC_CLR_INTR_MASK(d->irq - gic_irq_base);
> +	unsigned int irq = d->irq - gic_irq_base;
> +
> +	if (gic_is_local_irq(irq)) {
> +		GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_RMASK),
> +			 1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
> +	} else {
> +		GIC_CLR_INTR_MASK(irq);
> +	}
>  }
>  
>  static void gic_unmask_irq(struct irq_data *d)
>  {
> -	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
> +	unsigned int irq = d->irq - gic_irq_base;
> +
> +	if (gic_is_local_irq(irq)) {
> +		GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_SMASK),
> +			 1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
> +	} else {
> +		GIC_SET_INTR_MASK(irq);
> +	}

Why are you adding a conditional in all these functions instead of
having two interrupt chips with separate callbacks and irqdata?

And looking at GIC_SET_INTR_MASK(irq) makes me shudder even more. The
whole thing can be replaced with the generic interrupt chip functions.

If you set it up proper, then there is not a single conditional or
runtime calculation of bitmasks, address offsets etc.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 15/16] MIPS: GIC: Use local interrupts for timer
  2014-09-05 17:30 ` [PATCH v2 15/16] MIPS: GIC: Use local interrupts for timer Andrew Bresticker
@ 2014-09-05 19:08   ` Thomas Gleixner
  0 siblings, 0 replies; 28+ messages in thread
From: Thomas Gleixner @ 2014-09-05 19:08 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, linux-mips, devicetree, linux-kernel

On Fri, 5 Sep 2014, Andrew Bresticker wrote:

> Instead of using GIC interrupt 0 for the timer (which was not even
> handled correctly by the GIC irqchip code and could conflict with an
> actual external interrupt), use the designated local interrupt for
> the GIC timer.
> 
> Also, since the timer is a per-CPU interrupt, initialize it with
> setup_percpu_irq() and enable it with enable_percpu_irq() instead
> of using direct register writes.
> 
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> ---
> No changes from v1.
> ---
>  arch/mips/kernel/cevt-gic.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/mips/kernel/cevt-gic.c b/arch/mips/kernel/cevt-gic.c
> index 6093716..cae72a4 100644
> --- a/arch/mips/kernel/cevt-gic.c
> +++ b/arch/mips/kernel/cevt-gic.c
> @@ -68,7 +68,7 @@ int gic_clockevent_init(void)
>  	if (!cpu_has_counter || !gic_frequency)
>  		return -ENXIO;
>  
> -	irq = MIPS_GIC_IRQ_BASE;
> +	irq = MIPS_GIC_LOCAL_IRQ_BASE + GIC_LOCAL_INTR_COMPARE;
>  
>  	cd = &per_cpu(gic_clockevent_device, cpu);
>  
> @@ -91,15 +91,13 @@ int gic_clockevent_init(void)
>  
>  	clockevents_register_device(cd);
>  
> -	GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_MAP), 0x80000002);
> -	GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_SMASK), GIC_VPE_SMASK_CMP_MSK);
> +	if (!gic_timer_irq_installed) {
> +		setup_percpu_irq(irq, &gic_compare_irqaction);
> +		irq_set_handler(irq, handle_percpu_irq);
> +		gic_timer_irq_installed = 1;
> +	}
>  
> -	if (gic_timer_irq_installed)
> -		return 0;
> +	enable_percpu_irq(irq, 0);

Please use a proper IRQ_TYPE constant instead of 0

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch
  2014-09-05 18:51   ` Thomas Gleixner
@ 2014-09-05 21:02     ` Andrew Bresticker
  0 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 21:02 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, Linux-MIPS, devicetree, linux-kernel

On Fri, Sep 5, 2014 at 11:51 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Fri, 5 Sep 2014, Andrew Bresticker wrote:
>> For platforms which boot with device-tree and use the MIPS CPU interrupt
>> controller binding, a generic plat_irq_dispatch() can be used since all
>> CPU interrupts should be mapped through the CPU IRQ domain.  Implement a
>> plat_irq_dispatch() which simply handles the highest pending interrupt.
>>
>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>> Tested-by: Jonas Gorski <jogo@openwrt.org>
>> ---
>> No changes from v1.
>> ---
>>  arch/mips/kernel/irq_cpu.c | 28 +++++++++++++++++++++++-----
>>  1 file changed, 23 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
>> index e498f2b..9cf8459 100644
>> --- a/arch/mips/kernel/irq_cpu.c
>> +++ b/arch/mips/kernel/irq_cpu.c
>> @@ -116,6 +116,24 @@ void __init mips_cpu_irq_init(void)
>>  }
>>
>>  #ifdef CONFIG_IRQ_DOMAIN
>> +static struct irq_domain *mips_intc_domain;
>> +
>> +asmlinkage void __weak plat_irq_dispatch(void)
>> +{
>> +     unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
>> +     unsigned int hw;
>> +     int irq;
>> +
>> +     if (!pending) {
>> +             spurious_interrupt();
>> +             return;
>> +     }
>> +
>> +     hw = fls(pending) - CAUSEB_IP - 1;
>> +     irq = irq_linear_revmap(mips_intc_domain, hw);
>> +     do_IRQ(irq);
>
> Why are you not handling all pending interrupts in a loop?

Nearly all of the existing plat_irq_dispatch()es handle only a single
pending interrupt.  I suppose it doesn't hurt to handle all pending
interrupts though.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 14/16] irqchip: mips-gic: Support local interrupts
  2014-09-05 19:05   ` Thomas Gleixner
@ 2014-09-05 21:50     ` Andrew Bresticker
  0 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-05 21:50 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, Linux-MIPS, devicetree, linux-kernel

On Fri, Sep 5, 2014 at 12:05 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Fri, 5 Sep 2014, Andrew Bresticker wrote:
>>  static void gic_mask_irq(struct irq_data *d)
>>  {
>> -     GIC_CLR_INTR_MASK(d->irq - gic_irq_base);
>> +     unsigned int irq = d->irq - gic_irq_base;
>> +
>> +     if (gic_is_local_irq(irq)) {
>> +             GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_RMASK),
>> +                      1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
>> +     } else {
>> +             GIC_CLR_INTR_MASK(irq);
>> +     }
>>  }
>>
>>  static void gic_unmask_irq(struct irq_data *d)
>>  {
>> -     GIC_SET_INTR_MASK(d->irq - gic_irq_base);
>> +     unsigned int irq = d->irq - gic_irq_base;
>> +
>> +     if (gic_is_local_irq(irq)) {
>> +             GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_SMASK),
>> +                      1 << GIC_INTR_BIT(gic_hw_to_local_irq(irq)));
>> +     } else {
>> +             GIC_SET_INTR_MASK(irq);
>> +     }
>
> Why are you adding a conditional in all these functions instead of
> having two interrupt chips with separate callbacks and irqdata?

Ok, I'll use a separate irqchip.

> And looking at GIC_SET_INTR_MASK(irq) makes me shudder even more. The
> whole thing can be replaced with the generic interrupt chip functions.
>
> If you set it up proper, then there is not a single conditional or
> runtime calculation of bitmasks, address offsets etc.

Yes, I'd like to use the generic irqchip library here, but Malta and
SEAD-3 will need to be converted over to using irq domains.  Perhaps
I'll do that first - it should get rid of a lot of the other ugliness
here as well.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc.
  2014-09-05 17:30 ` [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc Andrew Bresticker
@ 2014-09-22 14:23   ` Rob Herring
  2014-09-22 16:28     ` Andrew Bresticker
  0 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2014-09-22 14:23 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper,
	Jeffrey Deans, Markos Chandras, Paul Burton, Arnd Bergmann,
	John Crispin, David Daney, Linux-MIPS, devicetree, linux-kernel

On Fri, Sep 5, 2014 at 12:30 PM, Andrew Bresticker
<abrestic@chromium.org> wrote:
> Add the vendor prefix "mti" for MIPS Technologies, Inc.
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> ---
> New for v2.
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index ac7269f..efa5a5b 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -86,6 +86,7 @@ microchip     Microchip Technology Inc.
>  mosaixtech     Mosaix Technologies, Inc.
>  moxa   Moxa
>  mpl    MPL AG
> +mti    MIPS Technologies, Inc.

Why not mips as that is more common and the stock ticker.

Rob

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc.
  2014-09-22 14:23   ` Rob Herring
@ 2014-09-22 16:28     ` Andrew Bresticker
  2014-09-22 19:01       ` Kumar Gala
  0 siblings, 1 reply; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-22 16:28 UTC (permalink / raw)
  To: Rob Herring
  Cc: Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Thomas Gleixner, Jason Cooper,
	Jeffrey Deans, Markos Chandras, Paul Burton, Arnd Bergmann,
	John Crispin, David Daney, Linux-MIPS, devicetree, linux-kernel

On Mon, Sep 22, 2014 at 7:23 AM, Rob Herring <robherring2@gmail.com> wrote:
> On Fri, Sep 5, 2014 at 12:30 PM, Andrew Bresticker
> <abrestic@chromium.org> wrote:
>> Add the vendor prefix "mti" for MIPS Technologies, Inc.
>>
>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>> ---
>> New for v2.
>> ---
>>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> index ac7269f..efa5a5b 100644
>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> @@ -86,6 +86,7 @@ microchip     Microchip Technology Inc.
>>  mosaixtech     Mosaix Technologies, Inc.
>>  moxa   Moxa
>>  mpl    MPL AG
>> +mti    MIPS Technologies, Inc.
>
> Why not mips as that is more common and the stock ticker.

"mti" is already in use, see
Documentation/devicetree/bindings/mips/cpu_irq.txt,
arch/mips/mti-sead3/sead3.dts, and arch/mips/ralink/dts/*.dtsi.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc.
  2014-09-22 16:28     ` Andrew Bresticker
@ 2014-09-22 19:01       ` Kumar Gala
  2014-09-22 19:30         ` Andrew Bresticker
  0 siblings, 1 reply; 28+ messages in thread
From: Kumar Gala @ 2014-09-22 19:01 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Rob Herring, Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Thomas Gleixner, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, Linux-MIPS, devicetree, linux-kernel


On Sep 22, 2014, at 11:28 AM, Andrew Bresticker <abrestic@chromium.org> wrote:

> On Mon, Sep 22, 2014 at 7:23 AM, Rob Herring <robherring2@gmail.com> wrote:
>> On Fri, Sep 5, 2014 at 12:30 PM, Andrew Bresticker
>> <abrestic@chromium.org> wrote:
>>> Add the vendor prefix "mti" for MIPS Technologies, Inc.
>>> 
>>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>>> ---
>>> New for v2.
>>> ---
>>> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>>> 1 file changed, 1 insertion(+)
>>> 
>>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>> index ac7269f..efa5a5b 100644
>>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>> @@ -86,6 +86,7 @@ microchip     Microchip Technology Inc.
>>> mosaixtech     Mosaix Technologies, Inc.
>>> moxa   Moxa
>>> mpl    MPL AG
>>> +mti    MIPS Technologies, Inc.
>> 
>> Why not mips as that is more common and the stock ticker.
> 
> "mti" is already in use, see
> Documentation/devicetree/bindings/mips/cpu_irq.txt,
> arch/mips/mti-sead3/sead3.dts, and arch/mips/ralink/dts/*.dtsi.

Isn’t mips already used as well:

arch/mips/lantiq/dts/danube.dtsi:			compatible = "mips,mips24Kc";
arch/mips/ralink/dts/mt7620a.dtsi:			compatible = "mips,mips24KEc";
arch/mips/ralink/dts/rt2880.dtsi:			compatible = "mips,mips4KEc";
arch/mips/ralink/dts/rt3050.dtsi:			compatible = "mips,mips24KEc";
arch/mips/ralink/dts/rt3883.dtsi:

- k

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc.
  2014-09-22 19:01       ` Kumar Gala
@ 2014-09-22 19:30         ` Andrew Bresticker
  2014-09-22 19:36           ` Kumar Gala
  0 siblings, 1 reply; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-22 19:30 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Rob Herring, Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Thomas Gleixner, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, Linux-MIPS, devicetree, linux-kernel

On Mon, Sep 22, 2014 at 12:01 PM, Kumar Gala <galak@codeaurora.org> wrote:
>
> On Sep 22, 2014, at 11:28 AM, Andrew Bresticker <abrestic@chromium.org> wrote:
>
>> On Mon, Sep 22, 2014 at 7:23 AM, Rob Herring <robherring2@gmail.com> wrote:
>>> On Fri, Sep 5, 2014 at 12:30 PM, Andrew Bresticker
>>> <abrestic@chromium.org> wrote:
>>>> Add the vendor prefix "mti" for MIPS Technologies, Inc.
>>>>
>>>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>>>> ---
>>>> New for v2.
>>>> ---
>>>> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>> index ac7269f..efa5a5b 100644
>>>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>> @@ -86,6 +86,7 @@ microchip     Microchip Technology Inc.
>>>> mosaixtech     Mosaix Technologies, Inc.
>>>> moxa   Moxa
>>>> mpl    MPL AG
>>>> +mti    MIPS Technologies, Inc.
>>>
>>> Why not mips as that is more common and the stock ticker.
>>
>> "mti" is already in use, see
>> Documentation/devicetree/bindings/mips/cpu_irq.txt,
>> arch/mips/mti-sead3/sead3.dts, and arch/mips/ralink/dts/*.dtsi.
>
> Isn’t mips already used as well:

Yes, however it is only used for CPUs, it does not appear in any
binding document, and no code actually matches against it.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc.
  2014-09-22 19:30         ` Andrew Bresticker
@ 2014-09-22 19:36           ` Kumar Gala
  2014-09-22 19:43             ` Andrew Bresticker
  0 siblings, 1 reply; 28+ messages in thread
From: Kumar Gala @ 2014-09-22 19:36 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Rob Herring, Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Thomas Gleixner, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, Linux-MIPS, devicetree, linux-kernel


On Sep 22, 2014, at 2:30 PM, Andrew Bresticker <abrestic@chromium.org> wrote:

> On Mon, Sep 22, 2014 at 12:01 PM, Kumar Gala <galak@codeaurora.org> wrote:
>> 
>> On Sep 22, 2014, at 11:28 AM, Andrew Bresticker <abrestic@chromium.org> wrote:
>> 
>>> On Mon, Sep 22, 2014 at 7:23 AM, Rob Herring <robherring2@gmail.com> wrote:
>>>> On Fri, Sep 5, 2014 at 12:30 PM, Andrew Bresticker
>>>> <abrestic@chromium.org> wrote:
>>>>> Add the vendor prefix "mti" for MIPS Technologies, Inc.
>>>>> 
>>>>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>>>>> ---
>>>>> New for v2.
>>>>> ---
>>>>> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>> 
>>>>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>>> index ac7269f..efa5a5b 100644
>>>>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>>> @@ -86,6 +86,7 @@ microchip     Microchip Technology Inc.
>>>>> mosaixtech     Mosaix Technologies, Inc.
>>>>> moxa   Moxa
>>>>> mpl    MPL AG
>>>>> +mti    MIPS Technologies, Inc.
>>>> 
>>>> Why not mips as that is more common and the stock ticker.
>>> 
>>> "mti" is already in use, see
>>> Documentation/devicetree/bindings/mips/cpu_irq.txt,
>>> arch/mips/mti-sead3/sead3.dts, and arch/mips/ralink/dts/*.dtsi.
>> 
>> Isn’t mips already used as well:
> 
> Yes, however it is only used for CPUs, it does not appear in any
> binding document, and no code actually matches against it.

Do you intend to change those usages to “mti” than?

- k

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc.
  2014-09-22 19:36           ` Kumar Gala
@ 2014-09-22 19:43             ` Andrew Bresticker
  0 siblings, 0 replies; 28+ messages in thread
From: Andrew Bresticker @ 2014-09-22 19:43 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Rob Herring, Ralf Baechle, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Thomas Gleixner, Jason Cooper, Jeffrey Deans,
	Markos Chandras, Paul Burton, Arnd Bergmann, John Crispin,
	David Daney, Linux-MIPS, devicetree, linux-kernel

On Mon, Sep 22, 2014 at 12:36 PM, Kumar Gala <galak@codeaurora.org> wrote:
>
> On Sep 22, 2014, at 2:30 PM, Andrew Bresticker <abrestic@chromium.org> wrote:
>
>> On Mon, Sep 22, 2014 at 12:01 PM, Kumar Gala <galak@codeaurora.org> wrote:
>>>
>>> On Sep 22, 2014, at 11:28 AM, Andrew Bresticker <abrestic@chromium.org> wrote:
>>>
>>>> On Mon, Sep 22, 2014 at 7:23 AM, Rob Herring <robherring2@gmail.com> wrote:
>>>>> On Fri, Sep 5, 2014 at 12:30 PM, Andrew Bresticker
>>>>> <abrestic@chromium.org> wrote:
>>>>>> Add the vendor prefix "mti" for MIPS Technologies, Inc.
>>>>>>
>>>>>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>>>>>> ---
>>>>>> New for v2.
>>>>>> ---
>>>>>> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>>>>>> 1 file changed, 1 insertion(+)
>>>>>>
>>>>>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>>>> index ac7269f..efa5a5b 100644
>>>>>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>>>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>>>>>> @@ -86,6 +86,7 @@ microchip     Microchip Technology Inc.
>>>>>> mosaixtech     Mosaix Technologies, Inc.
>>>>>> moxa   Moxa
>>>>>> mpl    MPL AG
>>>>>> +mti    MIPS Technologies, Inc.
>>>>>
>>>>> Why not mips as that is more common and the stock ticker.
>>>>
>>>> "mti" is already in use, see
>>>> Documentation/devicetree/bindings/mips/cpu_irq.txt,
>>>> arch/mips/mti-sead3/sead3.dts, and arch/mips/ralink/dts/*.dtsi.
>>>
>>> Isn’t mips already used as well:
>>
>> Yes, however it is only used for CPUs, it does not appear in any
>> binding document, and no code actually matches against it.
>
> Do you intend to change those usages to “mti” than?

I was not originally planning on it, but I could.

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2014-09-22 19:43 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 17:30 [PATCH v2 00/16] MIPS: GIC device-tree support Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 01/16] MIPS: Provide a generic plat_irq_dispatch Andrew Bresticker
2014-09-05 18:51   ` Thomas Gleixner
2014-09-05 21:02     ` Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 02/16] MIPS: Set vint handler when mapping CPU interrupts Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 03/16] MIPS: Export CPU IRQ domain Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 04/16] MIPS: smp-cps: Enable all hardware interrupts on secondary CPUs Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 05/16] MIPS: Move GIC to drivers/irqchip/ Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 06/16] MIPS: Move MIPS_GIC_IRQ_BASE into platform irq.h Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 07/16] irqchip: mips-gic: Implement irq_set_type callback Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 08/16] irqchip: mips-gic: Implement generic irq_ack/irq_eoi callbacks Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 09/16] irqchip: mips-gic: Fix gic_set_affinity() return value Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 10/16] of: Add vendor prefix for MIPS Technologies, Inc Andrew Bresticker
2014-09-22 14:23   ` Rob Herring
2014-09-22 16:28     ` Andrew Bresticker
2014-09-22 19:01       ` Kumar Gala
2014-09-22 19:30         ` Andrew Bresticker
2014-09-22 19:36           ` Kumar Gala
2014-09-22 19:43             ` Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 11/16] of: Add binding document for MIPS GIC Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 12/16] irqchip: mips-gic: Add device-tree support Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 13/16] irqchip: mips-gic: Add generic IPI support when using DT Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 14/16] irqchip: mips-gic: Support local interrupts Andrew Bresticker
2014-09-05 19:05   ` Thomas Gleixner
2014-09-05 21:50     ` Andrew Bresticker
2014-09-05 17:30 ` [PATCH v2 15/16] MIPS: GIC: Use local interrupts for timer Andrew Bresticker
2014-09-05 19:08   ` Thomas Gleixner
2014-09-05 17:30 ` [PATCH v2 16/16] MIPS: Malta: Map GIC local interrupts Andrew Bresticker

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).