diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 03:09:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 03:09:17 -0400 |
commit | f52b69f86e27903d6896ed5fa7cd280fec8de532 (patch) | |
tree | 0b213c61386153800afb459ca33e091bdec94570 /drivers/sh/intc/core.c | |
parent | 2f7fa1be66dce77608330c5eb918d6360b5525f2 (diff) | |
parent | b7e68d6876dfbab087bc3859211a9efc74cbe30c (diff) |
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Pull SuperH updates from Paul Mundt.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (25 commits)
sh: Support I/O space swapping where needed.
sh: use set_current_blocked() and block_sigmask()
sh: no need to reset handler if SA_ONESHOT
sh: intc: Fix up section mismatch for intc_ack_data
sh: select ARCH_DISCARD_MEMBLOCK.
sh: Consolidate duplicate _32/_64 unistd definitions.
sh: ecovec: switch SDHI controllers to card polling
sh: Avoid exporting unimplemented syscalls.
sh: add platform_device for RSPI in setup-sh7757
SH: pci-sh7780: enable big-endian operation.
serial: sh-sci: fix a race of DMA submit_tx on transfer
sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785
sh: dma: Collect up CHCR of SH7723 and SH7730
sh/next: Fix build fail by asm/system.h in asm/bitops.h
arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible
sh: cpufreq: Wire up scaling_available_freqs support.
sh: cpufreq: notify about rate rounding fallback.
sh: cpufreq: Support CPU clock frequency table.
sh: cpufreq: struct device lookup from CPU topology.
sh: cpufreq: percpu struct clk accounting.
...
Diffstat (limited to 'drivers/sh/intc/core.c')
-rw-r--r-- | drivers/sh/intc/core.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c index 2fde8970dfd0..7e562ccb6997 100644 --- a/drivers/sh/intc/core.c +++ b/drivers/sh/intc/core.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Shared interrupt handling code for IPR and INTC2 types of IRQs. | 2 | * Shared interrupt handling code for IPR and INTC2 types of IRQs. |
3 | * | 3 | * |
4 | * Copyright (C) 2007, 2008 Magnus Damm | 4 | * Copyright (C) 2007, 2008 Magnus Damm |
5 | * Copyright (C) 2009, 2010 Paul Mundt | 5 | * Copyright (C) 2009 - 2012 Paul Mundt |
6 | * | 6 | * |
7 | * Based on intc2.c and ipr.c | 7 | * Based on intc2.c and ipr.c |
8 | * | 8 | * |
@@ -31,11 +31,12 @@ | |||
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
32 | #include <linux/radix-tree.h> | 32 | #include <linux/radix-tree.h> |
33 | #include <linux/export.h> | 33 | #include <linux/export.h> |
34 | #include <linux/sort.h> | ||
34 | #include "internals.h" | 35 | #include "internals.h" |
35 | 36 | ||
36 | LIST_HEAD(intc_list); | 37 | LIST_HEAD(intc_list); |
37 | DEFINE_RAW_SPINLOCK(intc_big_lock); | 38 | DEFINE_RAW_SPINLOCK(intc_big_lock); |
38 | unsigned int nr_intc_controllers; | 39 | static unsigned int nr_intc_controllers; |
39 | 40 | ||
40 | /* | 41 | /* |
41 | * Default priority level | 42 | * Default priority level |
@@ -267,6 +268,9 @@ int __init register_intc_controller(struct intc_desc *desc) | |||
267 | k += save_reg(d, k, hw->prio_regs[i].set_reg, smp); | 268 | k += save_reg(d, k, hw->prio_regs[i].set_reg, smp); |
268 | k += save_reg(d, k, hw->prio_regs[i].clr_reg, smp); | 269 | k += save_reg(d, k, hw->prio_regs[i].clr_reg, smp); |
269 | } | 270 | } |
271 | |||
272 | sort(d->prio, hw->nr_prio_regs, sizeof(*d->prio), | ||
273 | intc_handle_int_cmp, NULL); | ||
270 | } | 274 | } |
271 | 275 | ||
272 | if (hw->sense_regs) { | 276 | if (hw->sense_regs) { |
@@ -277,6 +281,9 @@ int __init register_intc_controller(struct intc_desc *desc) | |||
277 | 281 | ||
278 | for (i = 0; i < hw->nr_sense_regs; i++) | 282 | for (i = 0; i < hw->nr_sense_regs; i++) |
279 | k += save_reg(d, k, hw->sense_regs[i].reg, 0); | 283 | k += save_reg(d, k, hw->sense_regs[i].reg, 0); |
284 | |||
285 | sort(d->sense, hw->nr_sense_regs, sizeof(*d->sense), | ||
286 | intc_handle_int_cmp, NULL); | ||
280 | } | 287 | } |
281 | 288 | ||
282 | if (hw->subgroups) | 289 | if (hw->subgroups) |