From 2f529f9b558ca1c1bd74be7437a84e4711743404 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 01 Nov 2024 02:11:33 +0000 Subject: [PATCH] add xenomai --- kernel/include/linux/irqdesc.h | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/kernel/include/linux/irqdesc.h b/kernel/include/linux/irqdesc.h index 5745491..f134909 100644 --- a/kernel/include/linux/irqdesc.h +++ b/kernel/include/linux/irqdesc.h @@ -68,7 +68,7 @@ unsigned int irqs_unhandled; atomic_t threads_handled; int threads_handled_last; - raw_spinlock_t lock; + hybrid_spinlock_t lock; struct cpumask *percpu_enabled; const struct cpumask *percpu_affinity; #ifdef CONFIG_SMP @@ -154,6 +154,8 @@ int generic_handle_irq(unsigned int irq); +void generic_pipeline_irq(unsigned int irq, struct pt_regs *regs); + #ifdef CONFIG_HANDLE_DOMAIN_IRQ /* * Convert a HW interrupt number to a logical one using a IRQ domain, @@ -164,11 +166,26 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq, bool lookup, struct pt_regs *regs); +#ifdef CONFIG_IRQ_PIPELINE +unsigned int irq_find_mapping(struct irq_domain *host, + irq_hw_number_t hwirq); + +static inline int handle_domain_irq(struct irq_domain *domain, + unsigned int hwirq, struct pt_regs *regs) +{ + unsigned int irq = irq_find_mapping(domain, hwirq); + + generic_pipeline_irq(irq, regs); + + return 0; +} +#else static inline int handle_domain_irq(struct irq_domain *domain, unsigned int hwirq, struct pt_regs *regs) { return __handle_domain_irq(domain, hwirq, true, regs); } +#endif /* !CONFIG_IRQ_PIPELINE */ #ifdef CONFIG_IRQ_DOMAIN int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq, @@ -252,6 +269,14 @@ return desc->status_use_accessors & IRQ_PER_CPU_DEVID; } +static inline int irq_is_oob(unsigned int irq) +{ + struct irq_desc *desc; + + desc = irq_to_desc(irq); + return desc->status_use_accessors & IRQ_OOB; +} + static inline void irq_set_lockdep_class(unsigned int irq, struct lock_class_key *lock_class, struct lock_class_key *request_class) -- Gitblit v1.6.2