Commit 938c04a8 authored by Thomas Gleixner's avatar Thomas Gleixner

Merge tag 'irqchip-urgent-3.17' of git://git.infradead.org/users/jcooper/linux into irq/urgent

irqchip fixes for v3.17 from Jason Cooper

 - GIC/GICV3: Various fixlets
 - crossbar: Fix off-by-one bug
 - exynos-combiner: Fix arm64 build error
parents 7cad45ee fea322d1
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h> #include <linux/irqchip/chained_irq.h>
#include <linux/interrupt.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
......
...@@ -220,7 +220,7 @@ static int __init crossbar_of_init(struct device_node *node) ...@@ -220,7 +220,7 @@ static int __init crossbar_of_init(struct device_node *node)
of_property_read_u32_index(node, of_property_read_u32_index(node,
"ti,irqs-reserved", "ti,irqs-reserved",
i, &entry); i, &entry);
if (entry > max) { if (entry >= max) {
pr_err("Invalid reserved entry\n"); pr_err("Invalid reserved entry\n");
ret = -EINVAL; ret = -EINVAL;
goto err_irq_map; goto err_irq_map;
...@@ -238,7 +238,7 @@ static int __init crossbar_of_init(struct device_node *node) ...@@ -238,7 +238,7 @@ static int __init crossbar_of_init(struct device_node *node)
of_property_read_u32_index(node, of_property_read_u32_index(node,
"ti,irqs-skip", "ti,irqs-skip",
i, &entry); i, &entry);
if (entry > max) { if (entry >= max) {
pr_err("Invalid skip entry\n"); pr_err("Invalid skip entry\n");
ret = -EINVAL; ret = -EINVAL;
goto err_irq_map; goto err_irq_map;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
struct gic_chip_data { struct gic_chip_data {
void __iomem *dist_base; void __iomem *dist_base;
void __iomem **redist_base; void __iomem **redist_base;
void __percpu __iomem **rdist; void __iomem * __percpu *rdist;
struct irq_domain *domain; struct irq_domain *domain;
u64 redist_stride; u64 redist_stride;
u32 redist_regions; u32 redist_regions;
...@@ -104,7 +104,7 @@ static void gic_redist_wait_for_rwp(void) ...@@ -104,7 +104,7 @@ static void gic_redist_wait_for_rwp(void)
} }
/* Low level accessors */ /* Low level accessors */
static u64 gic_read_iar(void) static u64 __maybe_unused gic_read_iar(void)
{ {
u64 irqstat; u64 irqstat;
...@@ -112,24 +112,24 @@ static u64 gic_read_iar(void) ...@@ -112,24 +112,24 @@ static u64 gic_read_iar(void)
return irqstat; return irqstat;
} }
static void gic_write_pmr(u64 val) static void __maybe_unused gic_write_pmr(u64 val)
{ {
asm volatile("msr_s " __stringify(ICC_PMR_EL1) ", %0" : : "r" (val)); asm volatile("msr_s " __stringify(ICC_PMR_EL1) ", %0" : : "r" (val));
} }
static void gic_write_ctlr(u64 val) static void __maybe_unused gic_write_ctlr(u64 val)
{ {
asm volatile("msr_s " __stringify(ICC_CTLR_EL1) ", %0" : : "r" (val)); asm volatile("msr_s " __stringify(ICC_CTLR_EL1) ", %0" : : "r" (val));
isb(); isb();
} }
static void gic_write_grpen1(u64 val) static void __maybe_unused gic_write_grpen1(u64 val)
{ {
asm volatile("msr_s " __stringify(ICC_GRPEN1_EL1) ", %0" : : "r" (val)); asm volatile("msr_s " __stringify(ICC_GRPEN1_EL1) ", %0" : : "r" (val));
isb(); isb();
} }
static void gic_write_sgi1r(u64 val) static void __maybe_unused gic_write_sgi1r(u64 val)
{ {
asm volatile("msr_s " __stringify(ICC_SGI1R_EL1) ", %0" : : "r" (val)); asm volatile("msr_s " __stringify(ICC_SGI1R_EL1) ", %0" : : "r" (val));
} }
...@@ -200,19 +200,6 @@ static void gic_poke_irq(struct irq_data *d, u32 offset) ...@@ -200,19 +200,6 @@ static void gic_poke_irq(struct irq_data *d, u32 offset)
rwp_wait(); rwp_wait();
} }
static int gic_peek_irq(struct irq_data *d, u32 offset)
{
u32 mask = 1 << (gic_irq(d) % 32);
void __iomem *base;
if (gic_irq_in_rdist(d))
base = gic_data_rdist_sgi_base();
else
base = gic_data.dist_base;
return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask);
}
static void gic_mask_irq(struct irq_data *d) static void gic_mask_irq(struct irq_data *d)
{ {
gic_poke_irq(d, GICD_ICENABLER); gic_poke_irq(d, GICD_ICENABLER);
...@@ -401,6 +388,19 @@ static void gic_cpu_init(void) ...@@ -401,6 +388,19 @@ static void gic_cpu_init(void)
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int gic_peek_irq(struct irq_data *d, u32 offset)
{
u32 mask = 1 << (gic_irq(d) % 32);
void __iomem *base;
if (gic_irq_in_rdist(d))
base = gic_data_rdist_sgi_base();
else
base = gic_data.dist_base;
return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask);
}
static int gic_secondary_init(struct notifier_block *nfb, static int gic_secondary_init(struct notifier_block *nfb,
unsigned long action, void *hcpu) unsigned long action, void *hcpu)
{ {
......
...@@ -867,7 +867,7 @@ static int gic_routable_irq_domain_xlate(struct irq_domain *d, ...@@ -867,7 +867,7 @@ static int gic_routable_irq_domain_xlate(struct irq_domain *d,
return 0; return 0;
} }
const struct irq_domain_ops gic_default_routable_irq_domain_ops = { static const struct irq_domain_ops gic_default_routable_irq_domain_ops = {
.map = gic_routable_irq_domain_map, .map = gic_routable_irq_domain_map,
.unmap = gic_routable_irq_domain_unmap, .unmap = gic_routable_irq_domain_unmap,
.xlate = gic_routable_irq_domain_xlate, .xlate = gic_routable_irq_domain_xlate,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment