diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-14 14:49:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-14 14:49:30 -0500 |
commit | 8ab54ed6412f42a1769cf64d4900f49a422d4292 (patch) | |
tree | 70c44ba4e0dd5964db64480dc5e526e4ba7a4629 | |
parent | 2d23e61fa2ecef787c3d1198b8ce8333264b5b8e (diff) | |
parent | 49b245efab4498575379a36cfab9d7373df3b69a (diff) |
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irqchip fixes from Thomas Gleixner:
"Another set of ARM SoC related irqchip fixes:
- Plug a memory leak in gicv3-its
- Limit features to the root gic interrupt controller
- Add a missing barrier in the gic-v3 IAR access
- Another compile test fix for sun4i"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is visible on redestributor
irqchip/gic: Only set the EOImodeNS bit for the root controller
irqchip/gic: Only populate set_affinity for the root controller
irqchip/gicv3-its: Fix memory leak in its_free_tables()
irqchip/sun4i: Fix compilation outside of arch/arm
-rw-r--r-- | arch/arm64/include/asm/arch_gicv3.h | 1 | ||||
-rw-r--r-- | drivers/irqchip/irq-gic-v3-its.c | 17 | ||||
-rw-r--r-- | drivers/irqchip/irq-gic.c | 13 | ||||
-rw-r--r-- | drivers/irqchip/irq-sun4i.c | 1 |
4 files changed, 18 insertions, 14 deletions
diff --git a/arch/arm64/include/asm/arch_gicv3.h b/arch/arm64/include/asm/arch_gicv3.h index 2731d3b25ed2..8ec88e5b290f 100644 --- a/arch/arm64/include/asm/arch_gicv3.h +++ b/arch/arm64/include/asm/arch_gicv3.h | |||
@@ -103,6 +103,7 @@ static inline u64 gic_read_iar_common(void) | |||
103 | u64 irqstat; | 103 | u64 irqstat; |
104 | 104 | ||
105 | asm volatile("mrs_s %0, " __stringify(ICC_IAR1_EL1) : "=r" (irqstat)); | 105 | asm volatile("mrs_s %0, " __stringify(ICC_IAR1_EL1) : "=r" (irqstat)); |
106 | dsb(sy); | ||
106 | return irqstat; | 107 | return irqstat; |
107 | } | 108 | } |
108 | 109 | ||
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 3447549fcc93..0a73632b28d5 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c | |||
@@ -66,7 +66,10 @@ struct its_node { | |||
66 | unsigned long phys_base; | 66 | unsigned long phys_base; |
67 | struct its_cmd_block *cmd_base; | 67 | struct its_cmd_block *cmd_base; |
68 | struct its_cmd_block *cmd_write; | 68 | struct its_cmd_block *cmd_write; |
69 | void *tables[GITS_BASER_NR_REGS]; | 69 | struct { |
70 | void *base; | ||
71 | u32 order; | ||
72 | } tables[GITS_BASER_NR_REGS]; | ||
70 | struct its_collection *collections; | 73 | struct its_collection *collections; |
71 | struct list_head its_device_list; | 74 | struct list_head its_device_list; |
72 | u64 flags; | 75 | u64 flags; |
@@ -807,9 +810,10 @@ static void its_free_tables(struct its_node *its) | |||
807 | int i; | 810 | int i; |
808 | 811 | ||
809 | for (i = 0; i < GITS_BASER_NR_REGS; i++) { | 812 | for (i = 0; i < GITS_BASER_NR_REGS; i++) { |
810 | if (its->tables[i]) { | 813 | if (its->tables[i].base) { |
811 | free_page((unsigned long)its->tables[i]); | 814 | free_pages((unsigned long)its->tables[i].base, |
812 | its->tables[i] = NULL; | 815 | its->tables[i].order); |
816 | its->tables[i].base = NULL; | ||
813 | } | 817 | } |
814 | } | 818 | } |
815 | } | 819 | } |
@@ -890,7 +894,8 @@ retry_alloc_baser: | |||
890 | goto out_free; | 894 | goto out_free; |
891 | } | 895 | } |
892 | 896 | ||
893 | its->tables[i] = base; | 897 | its->tables[i].base = base; |
898 | its->tables[i].order = order; | ||
894 | 899 | ||
895 | retry_baser: | 900 | retry_baser: |
896 | val = (virt_to_phys(base) | | 901 | val = (virt_to_phys(base) | |
@@ -940,7 +945,7 @@ retry_baser: | |||
940 | * something is horribly wrong... | 945 | * something is horribly wrong... |
941 | */ | 946 | */ |
942 | free_pages((unsigned long)base, order); | 947 | free_pages((unsigned long)base, order); |
943 | its->tables[i] = NULL; | 948 | its->tables[i].base = NULL; |
944 | 949 | ||
945 | switch (psz) { | 950 | switch (psz) { |
946 | case SZ_16K: | 951 | case SZ_16K: |
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 911758c056c1..8f9ebf714e2b 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c | |||
@@ -384,9 +384,6 @@ static struct irq_chip gic_chip = { | |||
384 | .irq_unmask = gic_unmask_irq, | 384 | .irq_unmask = gic_unmask_irq, |
385 | .irq_eoi = gic_eoi_irq, | 385 | .irq_eoi = gic_eoi_irq, |
386 | .irq_set_type = gic_set_type, | 386 | .irq_set_type = gic_set_type, |
387 | #ifdef CONFIG_SMP | ||
388 | .irq_set_affinity = gic_set_affinity, | ||
389 | #endif | ||
390 | .irq_get_irqchip_state = gic_irq_get_irqchip_state, | 387 | .irq_get_irqchip_state = gic_irq_get_irqchip_state, |
391 | .irq_set_irqchip_state = gic_irq_set_irqchip_state, | 388 | .irq_set_irqchip_state = gic_irq_set_irqchip_state, |
392 | .flags = IRQCHIP_SET_TYPE_MASKED | | 389 | .flags = IRQCHIP_SET_TYPE_MASKED | |
@@ -400,9 +397,6 @@ static struct irq_chip gic_eoimode1_chip = { | |||
400 | .irq_unmask = gic_unmask_irq, | 397 | .irq_unmask = gic_unmask_irq, |
401 | .irq_eoi = gic_eoimode1_eoi_irq, | 398 | .irq_eoi = gic_eoimode1_eoi_irq, |
402 | .irq_set_type = gic_set_type, | 399 | .irq_set_type = gic_set_type, |
403 | #ifdef CONFIG_SMP | ||
404 | .irq_set_affinity = gic_set_affinity, | ||
405 | #endif | ||
406 | .irq_get_irqchip_state = gic_irq_get_irqchip_state, | 400 | .irq_get_irqchip_state = gic_irq_get_irqchip_state, |
407 | .irq_set_irqchip_state = gic_irq_set_irqchip_state, | 401 | .irq_set_irqchip_state = gic_irq_set_irqchip_state, |
408 | .irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity, | 402 | .irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity, |
@@ -443,7 +437,7 @@ static void gic_cpu_if_up(struct gic_chip_data *gic) | |||
443 | u32 bypass = 0; | 437 | u32 bypass = 0; |
444 | u32 mode = 0; | 438 | u32 mode = 0; |
445 | 439 | ||
446 | if (static_key_true(&supports_deactivate)) | 440 | if (gic == &gic_data[0] && static_key_true(&supports_deactivate)) |
447 | mode = GIC_CPU_CTRL_EOImodeNS; | 441 | mode = GIC_CPU_CTRL_EOImodeNS; |
448 | 442 | ||
449 | /* | 443 | /* |
@@ -1039,6 +1033,11 @@ static void __init __gic_init_bases(unsigned int gic_nr, int irq_start, | |||
1039 | gic->chip.name = kasprintf(GFP_KERNEL, "GIC-%d", gic_nr); | 1033 | gic->chip.name = kasprintf(GFP_KERNEL, "GIC-%d", gic_nr); |
1040 | } | 1034 | } |
1041 | 1035 | ||
1036 | #ifdef CONFIG_SMP | ||
1037 | if (gic_nr == 0) | ||
1038 | gic->chip.irq_set_affinity = gic_set_affinity; | ||
1039 | #endif | ||
1040 | |||
1042 | #ifdef CONFIG_GIC_NON_BANKED | 1041 | #ifdef CONFIG_GIC_NON_BANKED |
1043 | if (percpu_offset) { /* Frankein-GIC without banked registers... */ | 1042 | if (percpu_offset) { /* Frankein-GIC without banked registers... */ |
1044 | unsigned int cpu; | 1043 | unsigned int cpu; |
diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c index 0704362f4c82..376b28074e0d 100644 --- a/drivers/irqchip/irq-sun4i.c +++ b/drivers/irqchip/irq-sun4i.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
23 | 23 | ||
24 | #include <asm/exception.h> | 24 | #include <asm/exception.h> |
25 | #include <asm/mach/irq.h> | ||
26 | 25 | ||
27 | #define SUN4I_IRQ_VECTOR_REG 0x00 | 26 | #define SUN4I_IRQ_VECTOR_REG 0x00 |
28 | #define SUN4I_IRQ_PROTECTION_REG 0x08 | 27 | #define SUN4I_IRQ_PROTECTION_REG 0x08 |