aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/devres.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-06 16:45:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-06 16:45:04 -0400
commit2f1835dffa949f560dfa3ed63c0bfc10944b461c (patch)
tree4bf591f7f36c03ae2a8a9306bb92ce29b47eae18 /kernel/irq/devres.c
parentd90dcc1f14555c62a32bc15c86c66d1d5444b5cb (diff)
parent471ba0e686cb13752bc1ff3216c54b69a2d250ea (diff)
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Ingo Molnar: "The changes in this cycle were: - Remove the irq timings/variance statistics code that tried to predict when the next interrupt would occur, which didn't work out as hoped and is replaced by another mechanism. - This new mechanism is the 'array suffix computation' estimate, which is superior to the previous one as it can detect not just a single periodic pattern, but independent periodic patterns along a log-2 scale of bucketing and exponential moving average. The comments are longer than the code - and it works better at predicting various complex interrupt patterns from real-world devices than the previous estimate. - avoid IRQ-work self-IPIs on the local CPU - fix work-list corruption in irq_set_affinity_notifier()" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irq_work: Do not raise an IPI when queueing work on the local CPU genirq/devres: Use struct_size() in devm_kzalloc() genirq/timings: Add array suffix computation code genirq/timings: Remove variance computation code genirq: Prevent use-after-free and work list corruption
Diffstat (limited to 'kernel/irq/devres.c')
-rw-r--r--kernel/irq/devres.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c
index f808c6a97dcc..f6e5515ee077 100644
--- a/kernel/irq/devres.c
+++ b/kernel/irq/devres.c
@@ -220,9 +220,8 @@ devm_irq_alloc_generic_chip(struct device *dev, const char *name, int num_ct,
220 irq_flow_handler_t handler) 220 irq_flow_handler_t handler)
221{ 221{
222 struct irq_chip_generic *gc; 222 struct irq_chip_generic *gc;
223 unsigned long sz = sizeof(*gc) + num_ct * sizeof(struct irq_chip_type);
224 223
225 gc = devm_kzalloc(dev, sz, GFP_KERNEL); 224 gc = devm_kzalloc(dev, struct_size(gc, chip_types, num_ct), GFP_KERNEL);
226 if (gc) 225 if (gc)
227 irq_init_generic_chip(gc, name, num_ct, 226 irq_init_generic_chip(gc, name, num_ct,
228 irq_base, reg_base, handler); 227 irq_base, reg_base, handler);