diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-25 21:07:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-25 21:07:01 -0500 |
commit | 4d2f0ef1c9f78c99dc82baeee3996c4a0c914aac (patch) | |
tree | e5b593e1340bdf7b66e9a9d1d2c69827c473125b | |
parent | b73f0c8f4ba810cd753031d18f4fab83bd9ac58f (diff) | |
parent | 2f5eaf66e580f64032b365a00157b6b58c266b37 (diff) |
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
"From the irqchip departement you get:
- regression fix for omap-intc
- regression fix for atmel-aic-common
- functional correctness fix for hip04
- type mismatch fix for gic-v3-its
- proper error pointer check for mtd-sysirq
Mostly one and two liners except for the omap regression fix which is
slightly larger than desired"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip: atmel-aic-common: Prevent clobbering of priority when changing IRQ type
irqchip: omap-intc: Fix legacy DMA regression
irqchip: gic-v3-its: Fix use of max with decimal constant
irqchip: hip04: Initialize hip04_cpu_map to 0xffff
irqchip: mtk-sysirq: Use IS_ERR() instead of NULL pointer check
-rw-r--r-- | drivers/irqchip/irq-atmel-aic-common.c | 4 | ||||
-rw-r--r-- | drivers/irqchip/irq-gic-v3-its.c | 2 | ||||
-rw-r--r-- | drivers/irqchip/irq-hip04.c | 2 | ||||
-rw-r--r-- | drivers/irqchip/irq-mtk-sysirq.c | 4 | ||||
-rw-r--r-- | drivers/irqchip/irq-omap-intc.c | 26 |
5 files changed, 27 insertions, 11 deletions
diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c index d111ac779c40..63cd031b2c28 100644 --- a/drivers/irqchip/irq-atmel-aic-common.c +++ b/drivers/irqchip/irq-atmel-aic-common.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #define AT91_AIC_IRQ_MIN_PRIORITY 0 | 28 | #define AT91_AIC_IRQ_MIN_PRIORITY 0 |
29 | #define AT91_AIC_IRQ_MAX_PRIORITY 7 | 29 | #define AT91_AIC_IRQ_MAX_PRIORITY 7 |
30 | 30 | ||
31 | #define AT91_AIC_SRCTYPE GENMASK(7, 6) | 31 | #define AT91_AIC_SRCTYPE GENMASK(6, 5) |
32 | #define AT91_AIC_SRCTYPE_LOW (0 << 5) | 32 | #define AT91_AIC_SRCTYPE_LOW (0 << 5) |
33 | #define AT91_AIC_SRCTYPE_FALLING (1 << 5) | 33 | #define AT91_AIC_SRCTYPE_FALLING (1 << 5) |
34 | #define AT91_AIC_SRCTYPE_HIGH (2 << 5) | 34 | #define AT91_AIC_SRCTYPE_HIGH (2 << 5) |
@@ -74,7 +74,7 @@ int aic_common_set_type(struct irq_data *d, unsigned type, unsigned *val) | |||
74 | return -EINVAL; | 74 | return -EINVAL; |
75 | } | 75 | } |
76 | 76 | ||
77 | *val &= AT91_AIC_SRCTYPE; | 77 | *val &= ~AT91_AIC_SRCTYPE; |
78 | *val |= aic_type; | 78 | *val |= aic_type; |
79 | 79 | ||
80 | return 0; | 80 | return 0; |
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 86e4684adeb1..d8996bdf0f61 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c | |||
@@ -1053,7 +1053,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id, | |||
1053 | * of two entries. No, the architecture doesn't let you | 1053 | * of two entries. No, the architecture doesn't let you |
1054 | * express an ITT with a single entry. | 1054 | * express an ITT with a single entry. |
1055 | */ | 1055 | */ |
1056 | nr_ites = max(2, roundup_pow_of_two(nvecs)); | 1056 | nr_ites = max(2UL, roundup_pow_of_two(nvecs)); |
1057 | sz = nr_ites * its->ite_size; | 1057 | sz = nr_ites * its->ite_size; |
1058 | sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1; | 1058 | sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1; |
1059 | itt = kmalloc(sz, GFP_KERNEL); | 1059 | itt = kmalloc(sz, GFP_KERNEL); |
diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c index 29b8f21b74d0..6bc2deb73d53 100644 --- a/drivers/irqchip/irq-hip04.c +++ b/drivers/irqchip/irq-hip04.c | |||
@@ -381,7 +381,7 @@ hip04_of_init(struct device_node *node, struct device_node *parent) | |||
381 | * It will be refined as each CPU probes its ID. | 381 | * It will be refined as each CPU probes its ID. |
382 | */ | 382 | */ |
383 | for (i = 0; i < NR_HIP04_CPU_IF; i++) | 383 | for (i = 0; i < NR_HIP04_CPU_IF; i++) |
384 | hip04_cpu_map[i] = 0xff; | 384 | hip04_cpu_map[i] = 0xffff; |
385 | 385 | ||
386 | /* | 386 | /* |
387 | * Find out how many interrupts are supported. | 387 | * Find out how many interrupts are supported. |
diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c index 7e342df6a62f..0b0d2c00a2df 100644 --- a/drivers/irqchip/irq-mtk-sysirq.c +++ b/drivers/irqchip/irq-mtk-sysirq.c | |||
@@ -137,9 +137,9 @@ static int __init mtk_sysirq_of_init(struct device_node *node, | |||
137 | return -ENOMEM; | 137 | return -ENOMEM; |
138 | 138 | ||
139 | chip_data->intpol_base = of_io_request_and_map(node, 0, "intpol"); | 139 | chip_data->intpol_base = of_io_request_and_map(node, 0, "intpol"); |
140 | if (!chip_data->intpol_base) { | 140 | if (IS_ERR(chip_data->intpol_base)) { |
141 | pr_err("mtk_sysirq: unable to map sysirq register\n"); | 141 | pr_err("mtk_sysirq: unable to map sysirq register\n"); |
142 | ret = -ENOMEM; | 142 | ret = PTR_ERR(chip_data->intpol_base); |
143 | goto out_free; | 143 | goto out_free; |
144 | } | 144 | } |
145 | 145 | ||
diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c index 28718d3e8281..c03f140acbae 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c | |||
@@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node) | |||
263 | return ret; | 263 | return ret; |
264 | } | 264 | } |
265 | 265 | ||
266 | static int __init omap_init_irq_legacy(u32 base) | 266 | static int __init omap_init_irq_legacy(u32 base, struct device_node *node) |
267 | { | 267 | { |
268 | int j, irq_base; | 268 | int j, irq_base; |
269 | 269 | ||
@@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base) | |||
277 | irq_base = 0; | 277 | irq_base = 0; |
278 | } | 278 | } |
279 | 279 | ||
280 | domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0, | 280 | domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0, |
281 | &irq_domain_simple_ops, NULL); | 281 | &irq_domain_simple_ops, NULL); |
282 | 282 | ||
283 | omap_irq_soft_reset(); | 283 | omap_irq_soft_reset(); |
@@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node) | |||
301 | { | 301 | { |
302 | int ret; | 302 | int ret; |
303 | 303 | ||
304 | if (node) | 304 | /* |
305 | * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c | ||
306 | * depends is still not ready for linear IRQ domains; because of that | ||
307 | * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using | ||
308 | * linear IRQ Domain until that driver is finally fixed. | ||
309 | */ | ||
310 | if (of_device_is_compatible(node, "ti,omap2-intc") || | ||
311 | of_device_is_compatible(node, "ti,omap3-intc")) { | ||
312 | struct resource res; | ||
313 | |||
314 | if (of_address_to_resource(node, 0, &res)) | ||
315 | return -ENOMEM; | ||
316 | |||
317 | base = res.start; | ||
318 | ret = omap_init_irq_legacy(base, node); | ||
319 | } else if (node) { | ||
305 | ret = omap_init_irq_of(node); | 320 | ret = omap_init_irq_of(node); |
306 | else | 321 | } else { |
307 | ret = omap_init_irq_legacy(base); | 322 | ret = omap_init_irq_legacy(base, NULL); |
323 | } | ||
308 | 324 | ||
309 | if (ret == 0) | 325 | if (ret == 0) |
310 | omap_irq_enable_protection(); | 326 | omap_irq_enable_protection(); |