diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 18:59:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 18:59:13 -0400 |
| commit | d09cc3659db494aca4b3bb2393c533fb4946b794 (patch) | |
| tree | 158d1dd5fa5fddf1c99da677a193b8561c11274d /include | |
| parent | 82e627eb5e07d7993216c9e63fb5550cf6ed25d7 (diff) | |
| parent | c0ffa793994a7a69c37a96dabf38323eae1dffa6 (diff) | |
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
Pull core irq updates from Thomas Gleixner:
"The irq department delivers:
- Another tree wide update to get rid of the horrible create_irq
interface along with its even more horrible variants. That also
gets rid of the last leftovers of the initial sparse irq hackery.
arch/driver specific changes have been either acked or ignored.
- A fix for the spurious interrupt detection logic with threaded
interrupts.
- A new ARM SoC interrupt controller
- The usual pile of fixes and improvements all over the place"
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
Documentation: brcmstb-l2: Add Broadcom STB Level-2 interrupt controller binding
irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 interrupt controller
genirq: Improve documentation to match current implementation
ARM: iop13xx: fix msi support with sparse IRQ
genirq: Provide !SMP stub for irq_set_affinity_notifier()
irqchip: armada-370-xp: Move the devicetree binding documentation
irqchip: gic: Use mask field in GICC_IAR
genirq: Remove dynamic_irq mess
ia64: Use irq_init_desc
genirq: Replace dynamic_irq_init/cleanup
genirq: Remove irq_reserve_irq[s]
genirq: Replace reserve_irqs in core code
s390: Avoid call to irq_reserve_irqs()
s390: Remove pointless arch_show_interrupts()
s390: pci: Check return value of alloc_irq_desc() proper
sh: intc: Remove pointless irq_reserve_irqs() invocation
x86, irq: Remove pointless irq_reserve_irqs() call
genirq: Make create/destroy_irq() ia64 private
tile: Use SPARSE_IRQ
tile: pci: Use irq_alloc/free_hwirq()
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/interrupt.h | 46 | ||||
| -rw-r--r-- | include/linux/irq.h | 38 | ||||
| -rw-r--r-- | include/linux/irqchip/arm-gic.h | 2 | ||||
| -rw-r--r-- | include/linux/irqdesc.h | 4 |
4 files changed, 48 insertions, 42 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index cb19f09d7e3e..698ad053d064 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -199,6 +199,26 @@ extern int check_wakeup_irqs(void); | |||
| 199 | static inline int check_wakeup_irqs(void) { return 0; } | 199 | static inline int check_wakeup_irqs(void) { return 0; } |
| 200 | #endif | 200 | #endif |
| 201 | 201 | ||
| 202 | /** | ||
| 203 | * struct irq_affinity_notify - context for notification of IRQ affinity changes | ||
| 204 | * @irq: Interrupt to which notification applies | ||
| 205 | * @kref: Reference count, for internal use | ||
| 206 | * @work: Work item, for internal use | ||
| 207 | * @notify: Function to be called on change. This will be | ||
| 208 | * called in process context. | ||
| 209 | * @release: Function to be called on release. This will be | ||
| 210 | * called in process context. Once registered, the | ||
| 211 | * structure must only be freed when this function is | ||
| 212 | * called or later. | ||
| 213 | */ | ||
| 214 | struct irq_affinity_notify { | ||
| 215 | unsigned int irq; | ||
| 216 | struct kref kref; | ||
| 217 | struct work_struct work; | ||
| 218 | void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask); | ||
| 219 | void (*release)(struct kref *ref); | ||
| 220 | }; | ||
| 221 | |||
| 202 | #if defined(CONFIG_SMP) | 222 | #if defined(CONFIG_SMP) |
| 203 | 223 | ||
| 204 | extern cpumask_var_t irq_default_affinity; | 224 | extern cpumask_var_t irq_default_affinity; |
| @@ -242,26 +262,6 @@ extern int irq_select_affinity(unsigned int irq); | |||
| 242 | 262 | ||
| 243 | extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m); | 263 | extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m); |
| 244 | 264 | ||
| 245 | /** | ||
| 246 | * struct irq_affinity_notify - context for notification of IRQ affinity changes | ||
| 247 | * @irq: Interrupt to which notification applies | ||
| 248 | * @kref: Reference count, for internal use | ||
| 249 | * @work: Work item, for internal use | ||
| 250 | * @notify: Function to be called on change. This will be | ||
| 251 | * called in process context. | ||
| 252 | * @release: Function to be called on release. This will be | ||
| 253 | * called in process context. Once registered, the | ||
| 254 | * structure must only be freed when this function is | ||
| 255 | * called or later. | ||
| 256 | */ | ||
| 257 | struct irq_affinity_notify { | ||
| 258 | unsigned int irq; | ||
| 259 | struct kref kref; | ||
| 260 | struct work_struct work; | ||
| 261 | void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask); | ||
| 262 | void (*release)(struct kref *ref); | ||
| 263 | }; | ||
| 264 | |||
| 265 | extern int | 265 | extern int |
| 266 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); | 266 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); |
| 267 | 267 | ||
| @@ -289,6 +289,12 @@ static inline int irq_set_affinity_hint(unsigned int irq, | |||
| 289 | { | 289 | { |
| 290 | return -EINVAL; | 290 | return -EINVAL; |
| 291 | } | 291 | } |
| 292 | |||
| 293 | static inline int | ||
| 294 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) | ||
| 295 | { | ||
| 296 | return 0; | ||
| 297 | } | ||
| 292 | #endif /* CONFIG_SMP */ | 298 | #endif /* CONFIG_SMP */ |
| 293 | 299 | ||
| 294 | /* | 300 | /* |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 5c57efb863d0..0d998d8b01d8 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -525,24 +525,6 @@ static inline void irq_set_percpu_devid_flags(unsigned int irq) | |||
| 525 | IRQ_NOPROBE | IRQ_PER_CPU_DEVID); | 525 | IRQ_NOPROBE | IRQ_PER_CPU_DEVID); |
| 526 | } | 526 | } |
| 527 | 527 | ||
| 528 | /* Handle dynamic irq creation and destruction */ | ||
| 529 | extern unsigned int create_irq_nr(unsigned int irq_want, int node); | ||
| 530 | extern unsigned int __create_irqs(unsigned int from, unsigned int count, | ||
| 531 | int node); | ||
| 532 | extern int create_irq(void); | ||
| 533 | extern void destroy_irq(unsigned int irq); | ||
| 534 | extern void destroy_irqs(unsigned int irq, unsigned int count); | ||
| 535 | |||
| 536 | /* | ||
| 537 | * Dynamic irq helper functions. Obsolete. Use irq_alloc_desc* and | ||
| 538 | * irq_free_desc instead. | ||
| 539 | */ | ||
| 540 | extern void dynamic_irq_cleanup(unsigned int irq); | ||
| 541 | static inline void dynamic_irq_init(unsigned int irq) | ||
| 542 | { | ||
| 543 | dynamic_irq_cleanup(irq); | ||
| 544 | } | ||
| 545 | |||
| 546 | /* Set/get chip/data for an IRQ: */ | 528 | /* Set/get chip/data for an IRQ: */ |
| 547 | extern int irq_set_chip(unsigned int irq, struct irq_chip *chip); | 529 | extern int irq_set_chip(unsigned int irq, struct irq_chip *chip); |
| 548 | extern int irq_set_handler_data(unsigned int irq, void *data); | 530 | extern int irq_set_handler_data(unsigned int irq, void *data); |
| @@ -625,17 +607,29 @@ int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | |||
| 625 | irq_alloc_descs(-1, from, cnt, node) | 607 | irq_alloc_descs(-1, from, cnt, node) |
| 626 | 608 | ||
| 627 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 609 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
| 628 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | ||
| 629 | |||
| 630 | static inline void irq_free_desc(unsigned int irq) | 610 | static inline void irq_free_desc(unsigned int irq) |
| 631 | { | 611 | { |
| 632 | irq_free_descs(irq, 1); | 612 | irq_free_descs(irq, 1); |
| 633 | } | 613 | } |
| 634 | 614 | ||
| 635 | static inline int irq_reserve_irq(unsigned int irq) | 615 | #ifdef CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ |
| 616 | unsigned int irq_alloc_hwirqs(int cnt, int node); | ||
| 617 | static inline unsigned int irq_alloc_hwirq(int node) | ||
| 618 | { | ||
| 619 | return irq_alloc_hwirqs(1, node); | ||
| 620 | } | ||
| 621 | void irq_free_hwirqs(unsigned int from, int cnt); | ||
| 622 | static inline void irq_free_hwirq(unsigned int irq) | ||
| 636 | { | 623 | { |
| 637 | return irq_reserve_irqs(irq, 1); | 624 | return irq_free_hwirqs(irq, 1); |
| 638 | } | 625 | } |
| 626 | int arch_setup_hwirq(unsigned int irq, int node); | ||
| 627 | void arch_teardown_hwirq(unsigned int irq); | ||
| 628 | #endif | ||
| 629 | |||
| 630 | #ifdef CONFIG_GENERIC_IRQ_LEGACY | ||
| 631 | void irq_init_desc(unsigned int irq); | ||
| 632 | #endif | ||
| 639 | 633 | ||
| 640 | #ifndef irq_reg_writel | 634 | #ifndef irq_reg_writel |
| 641 | # define irq_reg_writel(val, addr) writel(val, addr) | 635 | # define irq_reg_writel(val, addr) writel(val, addr) |
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h index 7ed92d0560d5..45e2d8c15bd2 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | #define GIC_CPU_ACTIVEPRIO 0xd0 | 21 | #define GIC_CPU_ACTIVEPRIO 0xd0 |
| 22 | #define GIC_CPU_IDENT 0xfc | 22 | #define GIC_CPU_IDENT 0xfc |
| 23 | 23 | ||
| 24 | #define GICC_IAR_INT_ID_MASK 0x3ff | ||
| 25 | |||
| 24 | #define GIC_DIST_CTRL 0x000 | 26 | #define GIC_DIST_CTRL 0x000 |
| 25 | #define GIC_DIST_CTR 0x004 | 27 | #define GIC_DIST_CTR 0x004 |
| 26 | #define GIC_DIST_IGROUP 0x080 | 28 | #define GIC_DIST_IGROUP 0x080 |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 26e2661d3935..472c021a2d4f 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -27,6 +27,8 @@ struct irq_desc; | |||
| 27 | * @irq_count: stats field to detect stalled irqs | 27 | * @irq_count: stats field to detect stalled irqs |
| 28 | * @last_unhandled: aging timer for unhandled count | 28 | * @last_unhandled: aging timer for unhandled count |
| 29 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 29 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
| 30 | * @threads_handled: stats field for deferred spurious detection of threaded handlers | ||
| 31 | * @threads_handled_last: comparator field for deferred spurious detection of theraded handlers | ||
| 30 | * @lock: locking for SMP | 32 | * @lock: locking for SMP |
| 31 | * @affinity_hint: hint to user space for preferred irq affinity | 33 | * @affinity_hint: hint to user space for preferred irq affinity |
| 32 | * @affinity_notify: context for notification of affinity changes | 34 | * @affinity_notify: context for notification of affinity changes |
| @@ -52,6 +54,8 @@ struct irq_desc { | |||
| 52 | unsigned int irq_count; /* For detecting broken IRQs */ | 54 | unsigned int irq_count; /* For detecting broken IRQs */ |
| 53 | unsigned long last_unhandled; /* Aging timer for unhandled count */ | 55 | unsigned long last_unhandled; /* Aging timer for unhandled count */ |
| 54 | unsigned int irqs_unhandled; | 56 | unsigned int irqs_unhandled; |
| 57 | atomic_t threads_handled; | ||
| 58 | int threads_handled_last; | ||
| 55 | raw_spinlock_t lock; | 59 | raw_spinlock_t lock; |
| 56 | struct cpumask *percpu_enabled; | 60 | struct cpumask *percpu_enabled; |
| 57 | #ifdef CONFIG_SMP | 61 | #ifdef CONFIG_SMP |
