diff options
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/exynos-combiner.c | 1 | ||||
-rw-r--r-- | drivers/irqchip/irq-crossbar.c | 4 | ||||
-rw-r--r-- | drivers/irqchip/irq-gic-v3.c | 38 | ||||
-rw-r--r-- | drivers/irqchip/irq-gic.c | 2 |
4 files changed, 23 insertions, 22 deletions
diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c index f8636a650cf6..5945223b73fa 100644 --- a/drivers/irqchip/exynos-combiner.c +++ b/drivers/irqchip/exynos-combiner.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/irqdomain.h> | 16 | #include <linux/irqdomain.h> |
17 | #include <linux/irqchip/chained_irq.h> | 17 | #include <linux/irqchip/chained_irq.h> |
18 | #include <linux/interrupt.h> | ||
18 | #include <linux/of_address.h> | 19 | #include <linux/of_address.h> |
19 | #include <linux/of_irq.h> | 20 | #include <linux/of_irq.h> |
20 | 21 | ||
diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 85c2985d8bcb..bbbaf5de65d2 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c | |||
@@ -220,7 +220,7 @@ static int __init crossbar_of_init(struct device_node *node) | |||
220 | of_property_read_u32_index(node, | 220 | of_property_read_u32_index(node, |
221 | "ti,irqs-reserved", | 221 | "ti,irqs-reserved", |
222 | i, &entry); | 222 | i, &entry); |
223 | if (entry > max) { | 223 | if (entry >= max) { |
224 | pr_err("Invalid reserved entry\n"); | 224 | pr_err("Invalid reserved entry\n"); |
225 | ret = -EINVAL; | 225 | ret = -EINVAL; |
226 | goto err_irq_map; | 226 | goto err_irq_map; |
@@ -238,7 +238,7 @@ static int __init crossbar_of_init(struct device_node *node) | |||
238 | of_property_read_u32_index(node, | 238 | of_property_read_u32_index(node, |
239 | "ti,irqs-skip", | 239 | "ti,irqs-skip", |
240 | i, &entry); | 240 | i, &entry); |
241 | if (entry > max) { | 241 | if (entry >= max) { |
242 | pr_err("Invalid skip entry\n"); | 242 | pr_err("Invalid skip entry\n"); |
243 | ret = -EINVAL; | 243 | ret = -EINVAL; |
244 | goto err_irq_map; | 244 | goto err_irq_map; |
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 57eaa5a0b1e3..a0698b4f0303 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c | |||
@@ -36,7 +36,7 @@ | |||
36 | struct gic_chip_data { | 36 | struct gic_chip_data { |
37 | void __iomem *dist_base; | 37 | void __iomem *dist_base; |
38 | void __iomem **redist_base; | 38 | void __iomem **redist_base; |
39 | void __percpu __iomem **rdist; | 39 | void __iomem * __percpu *rdist; |
40 | struct irq_domain *domain; | 40 | struct irq_domain *domain; |
41 | u64 redist_stride; | 41 | u64 redist_stride; |
42 | u32 redist_regions; | 42 | u32 redist_regions; |
@@ -104,7 +104,7 @@ static void gic_redist_wait_for_rwp(void) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | /* Low level accessors */ | 106 | /* Low level accessors */ |
107 | static u64 gic_read_iar(void) | 107 | static u64 __maybe_unused gic_read_iar(void) |
108 | { | 108 | { |
109 | u64 irqstat; | 109 | u64 irqstat; |
110 | 110 | ||
@@ -112,24 +112,24 @@ static u64 gic_read_iar(void) | |||
112 | return irqstat; | 112 | return irqstat; |
113 | } | 113 | } |
114 | 114 | ||
115 | static void gic_write_pmr(u64 val) | 115 | static void __maybe_unused gic_write_pmr(u64 val) |
116 | { | 116 | { |
117 | asm volatile("msr_s " __stringify(ICC_PMR_EL1) ", %0" : : "r" (val)); | 117 | asm volatile("msr_s " __stringify(ICC_PMR_EL1) ", %0" : : "r" (val)); |
118 | } | 118 | } |
119 | 119 | ||
120 | static void gic_write_ctlr(u64 val) | 120 | static void __maybe_unused gic_write_ctlr(u64 val) |
121 | { | 121 | { |
122 | asm volatile("msr_s " __stringify(ICC_CTLR_EL1) ", %0" : : "r" (val)); | 122 | asm volatile("msr_s " __stringify(ICC_CTLR_EL1) ", %0" : : "r" (val)); |
123 | isb(); | 123 | isb(); |
124 | } | 124 | } |
125 | 125 | ||
126 | static void gic_write_grpen1(u64 val) | 126 | static void __maybe_unused gic_write_grpen1(u64 val) |
127 | { | 127 | { |
128 | asm volatile("msr_s " __stringify(ICC_GRPEN1_EL1) ", %0" : : "r" (val)); | 128 | asm volatile("msr_s " __stringify(ICC_GRPEN1_EL1) ", %0" : : "r" (val)); |
129 | isb(); | 129 | isb(); |
130 | } | 130 | } |
131 | 131 | ||
132 | static void gic_write_sgi1r(u64 val) | 132 | static void __maybe_unused gic_write_sgi1r(u64 val) |
133 | { | 133 | { |
134 | asm volatile("msr_s " __stringify(ICC_SGI1R_EL1) ", %0" : : "r" (val)); | 134 | asm volatile("msr_s " __stringify(ICC_SGI1R_EL1) ", %0" : : "r" (val)); |
135 | } | 135 | } |
@@ -200,19 +200,6 @@ static void gic_poke_irq(struct irq_data *d, u32 offset) | |||
200 | rwp_wait(); | 200 | rwp_wait(); |
201 | } | 201 | } |
202 | 202 | ||
203 | static int gic_peek_irq(struct irq_data *d, u32 offset) | ||
204 | { | ||
205 | u32 mask = 1 << (gic_irq(d) % 32); | ||
206 | void __iomem *base; | ||
207 | |||
208 | if (gic_irq_in_rdist(d)) | ||
209 | base = gic_data_rdist_sgi_base(); | ||
210 | else | ||
211 | base = gic_data.dist_base; | ||
212 | |||
213 | return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask); | ||
214 | } | ||
215 | |||
216 | static void gic_mask_irq(struct irq_data *d) | 203 | static void gic_mask_irq(struct irq_data *d) |
217 | { | 204 | { |
218 | gic_poke_irq(d, GICD_ICENABLER); | 205 | gic_poke_irq(d, GICD_ICENABLER); |
@@ -401,6 +388,19 @@ static void gic_cpu_init(void) | |||
401 | } | 388 | } |
402 | 389 | ||
403 | #ifdef CONFIG_SMP | 390 | #ifdef CONFIG_SMP |
391 | static int gic_peek_irq(struct irq_data *d, u32 offset) | ||
392 | { | ||
393 | u32 mask = 1 << (gic_irq(d) % 32); | ||
394 | void __iomem *base; | ||
395 | |||
396 | if (gic_irq_in_rdist(d)) | ||
397 | base = gic_data_rdist_sgi_base(); | ||
398 | else | ||
399 | base = gic_data.dist_base; | ||
400 | |||
401 | return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask); | ||
402 | } | ||
403 | |||
404 | static int gic_secondary_init(struct notifier_block *nfb, | 404 | static int gic_secondary_init(struct notifier_block *nfb, |
405 | unsigned long action, void *hcpu) | 405 | unsigned long action, void *hcpu) |
406 | { | 406 | { |
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 4b959e606fe8..dda6dbc23565 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c | |||
@@ -867,7 +867,7 @@ static int gic_routable_irq_domain_xlate(struct irq_domain *d, | |||
867 | return 0; | 867 | return 0; |
868 | } | 868 | } |
869 | 869 | ||
870 | const struct irq_domain_ops gic_default_routable_irq_domain_ops = { | 870 | static const struct irq_domain_ops gic_default_routable_irq_domain_ops = { |
871 | .map = gic_routable_irq_domain_map, | 871 | .map = gic_routable_irq_domain_map, |
872 | .unmap = gic_routable_irq_domain_unmap, | 872 | .unmap = gic_routable_irq_domain_unmap, |
873 | .xlate = gic_routable_irq_domain_xlate, | 873 | .xlate = gic_routable_irq_domain_xlate, |