diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-08 14:01:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-08 14:01:13 -0400 |
commit | 2a1ccd31420a7b1acd6ca37b2bec2d723aa093e4 (patch) | |
tree | 43946f0c4afc7dce86fc055df48d661f8ed3999c /kernel/irq/internals.h | |
parent | e0e86b111bca6bbf746c03ec5cf3e6a61fa3f8e9 (diff) | |
parent | 3a1d24ca9573fbc74a3d32c972c333b161e0e9dc (diff) |
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner:
"The irq departement provides the usual mixed bag:
Core:
- Further improvements to the irq timings code which aims to predict
the next interrupt for power state selection to achieve better
latency/power balance
- Add interrupt statistics to the core NMI handlers
- The usual small fixes and cleanups
Drivers:
- Support for Renesas RZ/A1, Annapurna Labs FIC, Meson-G12A SoC and
Amazon Gravition AMR/GIC interrupt controllers.
- Rework of the Renesas INTC controller driver
- ACPI support for Socionext SoCs
- Enhancements to the CSKY interrupt controller
- The usual small fixes and cleanups"
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
irq/irqdomain: Fix comment typo
genirq: Update irq stats from NMI handlers
irqchip/gic-pm: Remove PM_CLK dependency
irqchip/al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver
dt-bindings: interrupt-controller: Add Amazon's Annapurna Labs FIC
softirq: Use __this_cpu_write() in takeover_tasklets()
irqchip/mbigen: Stop printing kernel addresses
irqchip/gic: Add dependency for ARM_GIC_MAX_NR
genirq/affinity: Remove unused argument from [__]irq_build_affinity_masks()
genirq/timings: Add selftest for next event computation
genirq/timings: Add selftest for irqs circular buffer
genirq/timings: Add selftest for circular array
genirq/timings: Encapsulate storing function
genirq/timings: Encapsulate timings push
genirq/timings: Optimize the period detection speed
genirq/timings: Fix timings buffer inspection
genirq/timings: Fix next event index function
irqchip/qcom: Use struct_size() in devm_kzalloc()
irqchip/irq-csky-mpintc: Remove unnecessary loop in interrupt handler
dt-bindings: interrupt-controller: Update csky mpintc
...
Diffstat (limited to 'kernel/irq/internals.h')
-rw-r--r-- | kernel/irq/internals.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index 70c3053bc1f6..21f9927ff5ad 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -354,6 +354,16 @@ static inline int irq_timing_decode(u64 value, u64 *timestamp) | |||
354 | return value & U16_MAX; | 354 | return value & U16_MAX; |
355 | } | 355 | } |
356 | 356 | ||
357 | static __always_inline void irq_timings_push(u64 ts, int irq) | ||
358 | { | ||
359 | struct irq_timings *timings = this_cpu_ptr(&irq_timings); | ||
360 | |||
361 | timings->values[timings->count & IRQ_TIMINGS_MASK] = | ||
362 | irq_timing_encode(ts, irq); | ||
363 | |||
364 | timings->count++; | ||
365 | } | ||
366 | |||
357 | /* | 367 | /* |
358 | * The function record_irq_time is only called in one place in the | 368 | * The function record_irq_time is only called in one place in the |
359 | * interrupts handler. We want this function always inline so the code | 369 | * interrupts handler. We want this function always inline so the code |
@@ -367,15 +377,8 @@ static __always_inline void record_irq_time(struct irq_desc *desc) | |||
367 | if (!static_branch_likely(&irq_timing_enabled)) | 377 | if (!static_branch_likely(&irq_timing_enabled)) |
368 | return; | 378 | return; |
369 | 379 | ||
370 | if (desc->istate & IRQS_TIMINGS) { | 380 | if (desc->istate & IRQS_TIMINGS) |
371 | struct irq_timings *timings = this_cpu_ptr(&irq_timings); | 381 | irq_timings_push(local_clock(), irq_desc_get_irq(desc)); |
372 | |||
373 | timings->values[timings->count & IRQ_TIMINGS_MASK] = | ||
374 | irq_timing_encode(local_clock(), | ||
375 | irq_desc_get_irq(desc)); | ||
376 | |||
377 | timings->count++; | ||
378 | } | ||
379 | } | 382 | } |
380 | #else | 383 | #else |
381 | static inline void irq_remove_timings(struct irq_desc *desc) {} | 384 | static inline void irq_remove_timings(struct irq_desc *desc) {} |