aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.ibm.com>2022-06-15 16:21:41 +0200
committerReza Arbab <arbab@linux.ibm.com>2022-07-05 09:22:14 -0500
commit4d27f0375de64645194a5ca6a5b85cef42524d0e (patch)
treed17dd1f677841f1c2f352019508861690430dfa6 /include
parentd9772c6108db42dc7b186cc699fe597d3f40c302 (diff)
downloadskiboot-4d27f0375de64645194a5ca6a5b85cef42524d0e.zip
skiboot-4d27f0375de64645194a5ca6a5b85cef42524d0e.tar.gz
skiboot-4d27f0375de64645194a5ca6a5b85cef42524d0e.tar.bz2
interrupts: Speed up opal interrupts scanning
When looking for which interrupts are serviced by opal, we scan all sources and query every single interrupt to know if it's for linux or opal. An optimization was made so that if the source doesn't have an 'interrupt' op (=the handler) or an 'attributes' op (to do the query), then we can skip the source. That's all good. However, when xive was introduced, the 'irq_source' defining those ops was wrapped in a 'xive_src' source which adds a level of indirection for those 'attributes' and 'interrupt' ops. So the previous optimization no longer works: the 'attributes' and 'interrupt' ops are defined from the wrapper, but if we could look past the indirection, we would realize they are not. That is getting problematic for the rather large generic IPIs source. We have 8 million such interrupts defined per chip on P10 and because the above optimization is no longer kicking in, we are now querying every single one of them to know if it is for opal. Real hardware swallows it without much difficulty, but simulators don't. Running qemu on my laptop, the full scan takes ~12 seconds per chip! This patch adds a callback for an interrupt source to report whether it has opal interrupts. If the source doesn't define it, then we fallback to looking at the 'interrupt' and 'attributes' ops, like before, as it is still useful on P8. We can then define that new callback on the xive sources, allowing to look past the indirection level and skip scanning the source when appropriate. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/interrupts.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/interrupts.h b/include/interrupts.h
index 7ffcc6c..6958fa6 100644
--- a/include/interrupts.h
+++ b/include/interrupts.h
@@ -153,6 +153,7 @@ struct irq_source_ops {
void (*interrupt)(struct irq_source *is, uint32_t isn);
void (*eoi)(struct irq_source *is, uint32_t isn);
char *(*name)(struct irq_source *is, uint32_t isn);
+ bool (*has_opal_interrupts)(struct irq_source *is);
};
struct irq_source {