Skip to contentSkip to conversation

irq fixes for 4.14

GIT PULL Thomas Gleixner 1 participant 1 message Oct 22, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest irq-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-for-linus

A set of small fixes mostly in the irq drivers area:

- Make the tango irq chip work correctly, which requires a new function in the generiq irq chip implementation

- A set of updates to the GIC-V3 ITS driver removing a bogus BUG_ON() and parsing the VCPU table size correctly.

Thanks,

tglx

------------------>
Doug Berger (2):
genirq: generic chip: Add irq_gc_mask_disable_and_ack_set()
genirq: generic chip: remove irq_gc_mask_disable_reg_and_ack()

Florian Fainelli (1):
irqchip/tango: Use irq_gc_mask_disable_and_ack_set

Julien Grall (1):
DT: arm,gic-v3: Update the ITS size in the examples

Shanker Donthineni (3):
irqchip/gic-v3-its: Fix the incorrect BUG_ON in its_init_vpe_domain() irqchip/gic-v3-its: Fix the incorrect parsing of VCPU table size irqchip/gic-v3-its: Add missing changes to support 52bit physical address

 .../bindings/interrupt-controller/arm,gic-v3.txt   |  6 +--
 drivers/irqchip/irq-gic-v3-its.c                   | 43 +++++++++++++++++-----
 drivers/irqchip/irq-tango.c                        |  2 +-
 include/linux/irq.h                                |  2 +-
 include/linux/irqchip/arm-gic-v3.h                 |  2 +
 kernel/irq/generic-chip.c                          | 15 ++++++--
 6 files changed, 52 insertions(+), 18 deletions(-)
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt +3 -3
index 4c29cdab0ea5..5eb108e180fa 100644
@@ -99,7 +99,7 @@ Examples:
 			compatible = "arm,gic-v3-its";
 			msi-controller;
 			#msi-cells = <1>;
-			reg = <0x0 0x2c200000 0 0x200000>;
+			reg = <0x0 0x2c200000 0 0x20000>;
 		};
 	};
 
@@ -124,14 +124,14 @@ Examples:
 			compatible = "arm,gic-v3-its";
 			msi-controller;
 			#msi-cells = <1>;
-			reg = <0x0 0x2c200000 0 0x200000>;
+			reg = <0x0 0x2c200000 0 0x20000>;
 		};
 
 		gic-its@2c400000 {
 			compatible = "arm,gic-v3-its";
 			msi-controller;
 			#msi-cells = <1>;
-			reg = <0x0 0x2c400000 0 0x200000>;
+			reg = <0x0 0x2c400000 0 0x20000>;
 		};
 
 		ppi-partitions {
drivers/irqchip/irq-gic-v3-its.c +33 -10

113 lines not on this page · raw message

drivers/irqchip/irq-tango.c +1 -1
index bdbb5c0ff7fe..0c085303a583 100644
@@ -141,7 +141,7 @@ static void __init tangox_irq_init_chip(struct irq_chip_generic *gc,
 	for (i = 0; i < 2; i++) {
 		ct[i].chip.irq_ack = irq_gc_ack_set_bit;
 		ct[i].chip.irq_mask = irq_gc_mask_disable_reg;
-		ct[i].chip.irq_mask_ack = irq_gc_mask_disable_reg_and_ack;
+		ct[i].chip.irq_mask_ack = irq_gc_mask_disable_and_ack_set;
 		ct[i].chip.irq_unmask = irq_gc_unmask_enable_reg;
 		ct[i].chip.irq_set_type = tangox_irq_set_type;
 		ct[i].chip.name = gc->domain->name;
include/linux/irq.h +1 -1
index d4728bf6a537..5ad10948ea95 100644
@@ -1009,7 +1009,7 @@ void irq_gc_mask_clr_bit(struct irq_data *d);
 void irq_gc_unmask_enable_reg(struct irq_data *d);
 void irq_gc_ack_set_bit(struct irq_data *d);
 void irq_gc_ack_clr_bit(struct irq_data *d);
-void irq_gc_mask_disable_reg_and_ack(struct irq_data *d);
+void irq_gc_mask_disable_and_ack_set(struct irq_data *d);
 void irq_gc_eoi(struct irq_data *d);
 int irq_gc_set_wake(struct irq_data *d, unsigned int on);
 
include/linux/irqchip/arm-gic-v3.h +2 -0
index 1ea576c8126f..14b74f22d43c 100644
@@ -372,6 +372,8 @@
 #define GITS_BASER_ENTRY_SIZE_SHIFT		(48)
 #define GITS_BASER_ENTRY_SIZE(r)	((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
 #define GITS_BASER_ENTRY_SIZE_MASK	GENMASK_ULL(52, 48)
+#define GITS_BASER_PHYS_52_to_48(phys)					\
+	(((phys) & GENMASK_ULL(47, 16)) | (((phys) >> 48) & 0xf) << 12)
 #define GITS_BASER_SHAREABILITY_SHIFT	(10)
 #define GITS_BASER_InnerShareable					\
 	GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable)
kernel/irq/generic-chip.c +12 -3
index 5270a54b9fa4..c26c5bb6b491 100644
@@ -135,17 +135,26 @@ void irq_gc_ack_clr_bit(struct irq_data *d)
 }
 
 /**
- * irq_gc_mask_disable_reg_and_ack - Mask and ack pending interrupt
+ * irq_gc_mask_disable_and_ack_set - Mask and ack pending interrupt
  * @d: irq_data
+ *
+ * This generic implementation of the irq_mask_ack method is for chips
+ * with separate enable/disable registers instead of a single mask
+ * register and where a pending interrupt is acknowledged by setting a
+ * bit.
+ *
+ * Note: This is the only permutation currently used.  Similar generic
+ * functions should be added here if other permutations are required.
  */
-void irq_gc_mask_disable_reg_and_ack(struct irq_data *d)
+void irq_gc_mask_disable_and_ack_set(struct irq_data *d)
 {
 	struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
 	struct irq_chip_type *ct = irq_data_get_chip_type(d);
 	u32 mask = d->mask;
 
 	irq_gc_lock(gc);
-	irq_reg_writel(gc, mask, ct->regs.mask);
+	irq_reg_writel(gc, mask, ct->regs.disable);
+	*ct->mask_cache &= ~mask;
 	irq_reg_writel(gc, mask, ct->regs.ack);
 	irq_gc_unlock(gc);
 }