hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/include/linux/irqdesc.h
....@@ -68,7 +68,7 @@
6868 unsigned int irqs_unhandled;
6969 atomic_t threads_handled;
7070 int threads_handled_last;
71
- raw_spinlock_t lock;
71
+ hybrid_spinlock_t lock;
7272 struct cpumask *percpu_enabled;
7373 const struct cpumask *percpu_affinity;
7474 #ifdef CONFIG_SMP
....@@ -154,6 +154,8 @@
154154
155155 int generic_handle_irq(unsigned int irq);
156156
157
+void generic_pipeline_irq(unsigned int irq, struct pt_regs *regs);
158
+
157159 #ifdef CONFIG_HANDLE_DOMAIN_IRQ
158160 /*
159161 * Convert a HW interrupt number to a logical one using a IRQ domain,
....@@ -164,11 +166,26 @@
164166 int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq,
165167 bool lookup, struct pt_regs *regs);
166168
169
+#ifdef CONFIG_IRQ_PIPELINE
170
+unsigned int irq_find_mapping(struct irq_domain *host,
171
+ irq_hw_number_t hwirq);
172
+
173
+static inline int handle_domain_irq(struct irq_domain *domain,
174
+ unsigned int hwirq, struct pt_regs *regs)
175
+{
176
+ unsigned int irq = irq_find_mapping(domain, hwirq);
177
+
178
+ generic_pipeline_irq(irq, regs);
179
+
180
+ return 0;
181
+}
182
+#else
167183 static inline int handle_domain_irq(struct irq_domain *domain,
168184 unsigned int hwirq, struct pt_regs *regs)
169185 {
170186 return __handle_domain_irq(domain, hwirq, true, regs);
171187 }
188
+#endif /* !CONFIG_IRQ_PIPELINE */
172189
173190 #ifdef CONFIG_IRQ_DOMAIN
174191 int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq,
....@@ -252,6 +269,14 @@
252269 return desc->status_use_accessors & IRQ_PER_CPU_DEVID;
253270 }
254271
272
+static inline int irq_is_oob(unsigned int irq)
273
+{
274
+ struct irq_desc *desc;
275
+
276
+ desc = irq_to_desc(irq);
277
+ return desc->status_use_accessors & IRQ_OOB;
278
+}
279
+
255280 static inline void
256281 irq_set_lockdep_class(unsigned int irq, struct lock_class_key *lock_class,
257282 struct lock_class_key *request_class)