v5.18-rc6-rt7
Subsystems (13)
Dear RT folks!
I'm pleased to announce the v5.18-rc6-rt7 patch set.
Changes since v5.18-rc6-rt6:
- The irq simulator did not invoke the interrupts in hardirq context, as it should.
- Provide generic_handle_domain_irq_safe(). It has been reported via the kernel bugzilla that the amd-pincrl driver reports interrupts in the wrong context.
- rcutorture could miss pending timers because ktimers runs at the same priority as the rcutorture thread. Patch by Frederic Weisbecker.
- Since the introduction of timersd in v5.16-rc3-rt7 there can be a in the NO_HZ mode. Patch by Frederic Weisbecker.
- A small optimisation in iio's stm32-adc driver.
- An unused macro in lockdep has been removed.
Known issues
- Valentin Schneider reported a few splats on ARM64, see
https://lkml.kernel.org/r/[email protected]
The delta patch against v5.18-rc6-rt6 is appended below and can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.18/incr/patch-5.18-rc6-rt6-rt7.patch.xz
You can get this release via the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.18-rc6-rt7
The RT patch against v5.18-rc6 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.18/older/patch-5.18-rc6-rt7.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.18/older/patches-5.18-rc6-rt7.tar.xz
Sebastian
drivers/bcma/driver_gpio.c +1 -1
@@ -113,7 +113,7 @@ static irqreturn_t bcma_gpio_irq_handler(int irq, void *dev_id)return IRQ_NONE ;for_each_set_bit (gpio, &irqs, gc->ngpio) -generic_handle_irq (irq_find_mapping (gc->irq.domain, gpio)); +generic_handle_domain_irq_safe (gc->irq.domain, gpio);bcma_chipco_gpio_polarity (cc, irqs, val & irqs);return IRQ_HANDLED ;
drivers/gpio/gpio-mlxbf2.c +2 -4
@@ -273,10 +273,8 @@ static irqreturn_t mlxbf2_gpio_irq_handler(int irq, void *ptr) pending =readl (gs->gpio_io +YU_GPIO_CAUSE_OR_CAUSE_EVTEN0 );writel (pending, gs->gpio_io +YU_GPIO_CAUSE_OR_CLRCAUSE ); -for_each_set_bit (level, &pending, gc->ngpio) { -int gpio_irq =irq_find_mapping (gc->irq.domain, level); -generic_handle_irq (gpio_irq); - } +for_each_set_bit (level, &pending, gc->ngpio) +generic_handle_domain_irq_safe (gc->irq.domain, level);return IRQ_RETVAL (pending); }
drivers/iio/adc/stm32-adc-core.c +1 -1
@@ -356,7 +356,7 @@ static void stm32_adc_irq_handler(struct irq_desc *desc)if ((status & priv->cfg->regs->eoc_msk[i] &&stm32_adc_eoc_enabled (priv, i)) || (status & priv->cfg->regs->ovr_msk[i])) -generic_handle_irq (irq_find_mapping (priv->domain, i)); +generic_handle_domain_irq (priv->domain, i); }chained_irq_exit (chip, desc);
drivers/pinctrl/pinctrl-amd.c +1 -1
@@ -638,7 +638,7 @@ static bool do_amd_gpio_irq_handler(int irq, void *dev_id)if (!(regval &PIN_IRQ_PENDING ) || !(regval &BIT (INTERRUPT_MASK_OFF )))continue ; -generic_handle_domain_irq (gc->irq.domain, irqnr + i); +generic_handle_domain_irq_safe (gc->irq.domain, irqnr + i);/* Clear interrupt. * We must read the pin register again, in case the
drivers/platform/x86/intel/int0002_vgpio.c +1 -2
@@ -125,8 +125,7 @@ static irqreturn_t int0002_irq(int irq, void *data)if (!(gpe_sts_reg &GPE0A_PME_B0_STS_BIT ))return IRQ_NONE ; -generic_handle_irq (irq_find_mapping (chip->irq.domain, -GPE0A_PME_B0_VIRT_GPIO_PIN )); +generic_handle_domain_irq_safe (chip->irq.domain,GPE0A_PME_B0_VIRT_GPIO_PIN );pm_wakeup_hard_event (chip->parent);
drivers/ssb/driver_gpio.c +4 -2
@@ -132,7 +132,8 @@ static irqreturn_t ssb_gpio_irq_chipco_handler(int irq, void *dev_id)return IRQ_NONE ;for_each_set_bit (gpio, &irqs, bus->gpio.ngpio) -generic_handle_irq (ssb_gpio_to_irq (&bus->gpio, gpio)); +generic_handle_domain_irq_safe (bus->irq_domain, gpio); +ssb_chipco_gpio_polarity (chipco, irqs, val & irqs);return IRQ_HANDLED ;
@@ -330,7 +331,8 @@ static irqreturn_t ssb_gpio_irq_extif_handler(int irq, void *dev_id)return IRQ_NONE ;for_each_set_bit (gpio, &irqs, bus->gpio.ngpio) -generic_handle_irq (ssb_gpio_to_irq (&bus->gpio, gpio)); +generic_handle_domain_irq_safe (bus->irq_domain, gpio); +ssb_extif_gpio_polarity (extif, irqs, val & irqs);return IRQ_HANDLED ;
include/linux/interrupt.h +13 -0
@@ -624,9 +624,17 @@ extern void raise_softirq_irqoff(unsigned int nr);extern void raise_softirq (unsigned int nr);#ifdef CONFIG_PREEMPT_RT +DECLARE_PER_CPU(struct task_struct *, timersd); +DECLARE_PER_CPU(unsigned long, pending_timer_softirq); +extern void raise_timer_softirq (void );extern void raise_hrtimer_softirq (void ); +static inline unsigned int local_pending_timers (void ) +{ +return __this_cpu_read (pending_timer_softirq); +} +#else static inline void raise_timer_softirq (void ) {
@@ -637,6 +645,11 @@ static inline void raise_hrtimer_softirq(void) {raise_softirq_irqoff (HRTIMER_SOFTIRQ ); } + +static inline unsigned int local_pending_timers (void ) +{ +return local_softirq_pending (); +}#endif DECLARE_PER_CPU(struct task_struct *, ksoftirqd);
include/linux/irqdesc.h +1 -0
@@ -169,6 +169,7 @@ int generic_handle_irq_safe(unsigned int irq);* conversion failed. */ int generic_handle_domain_irq (struct irq_domain *domain,unsigned int hwirq); +int generic_handle_domain_irq_safe (struct irq_domain *domain,unsigned int hwirq);int generic_handle_domain_nmi (struct irq_domain *domain,unsigned int hwirq);#endif
include/linux/lockdep.h +0 -1
@@ -431,7 +431,6 @@ enum xhlock_context_t { XHLOCK_CTX_NR, }; -#define lockdep_init_map_crosslock (m, n, k, s) do {} while (0)/* * To initialize a lockdep_map statically use this macro. * Note that _name must not be NULL.
kernel/irq/irq_sim.c +1 -1
@@ -181,7 +181,7 @@ struct irq_domain *irq_domain_create_sim(struct fwnode_handle *fwnode, goto err_free_bitmap; work_ctx->irq_count = num_irqs; -init_irq_work (&work_ctx->work, irq_sim_handle_irq); + work_ctx->work =IRQ_WORK_INIT_HARD (irq_sim_handle_irq);return work_ctx->domain;
kernel/irq/irqdesc.c +24 -0
@@ -706,6 +706,30 @@ int generic_handle_domain_irq(struct irq_domain *domain, unsigned int hwirq) }EXPORT_SYMBOL_GPL (generic_handle_domain_irq); +/** +* generic_handle_irq_safe - Invoke the handler for a HW irq belonging +* to a domain from any context. +* @domain: The domain where to perform the lookup +* @hwirq: The HW irq number to convert to a logical one +* +* Returns: 0 on success, a negative value on error. +* +* This function can be called from any context (IRQ or process context). It +* will report an error if not invoked from IRQ context and the irq has been +* marked to enforce IRQ-context only. +*/ +int generic_handle_domain_irq_safe (struct irq_domain *domain,unsigned int hwirq) +{ +unsigned long flags; +int ret; + +local_irq_save (flags); + ret =handle_irq_desc (irq_resolve_mapping (domain, hwirq)); +local_irq_restore (flags); +return ret; +} +EXPORT_SYMBOL_GPL (generic_handle_domain_irq_safe); +/** * generic_handle_domain_nmi - Invoke the handler for a HW nmi belonging * to a domain.
kernel/rcu/rcutorture.c +6 -0
@@ -3294,6 +3294,12 @@ rcu_torture_init(void)WARN_ON_ONCE (!t); sp.sched_priority =2 ;sched_setscheduler_nocheck (t,SCHED_FIFO , &sp); +#ifdef CONFIG_PREEMPT_RT + t =per_cpu (timersd, cpu); +WARN_ON_ONCE (!t); + sp.sched_priority =2 ; +sched_setscheduler_nocheck (t,SCHED_FIFO , &sp); +#endif } } }
kernel/softirq.c +2 -7
@@ -637,13 +637,8 @@ static inline void tick_irq_exit(void)#endif } -static DEFINE_PER_CPU(struct task_struct *, timersd); -static DEFINE_PER_CPU(unsigned long, pending_timer_softirq); - -static unsigned int local_pending_timers (void ) -{ -return __this_cpu_read (pending_timer_softirq); -} +DEFINE_PER_CPU(struct task_struct *, timersd); +DEFINE_PER_CPU(unsigned long, pending_timer_softirq);static void wake_timersd (void ) {
kernel/time/tick-sched.c +1 -1
@@ -780,7 +780,7 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)static inline bool local_timer_softirq_pending (void ) { -return local_softirq_pending () &BIT (TIMER_SOFTIRQ ); +return local_pending_timers () &BIT (TIMER_SOFTIRQ ); }static ktime_t tick_nohz_next_event (struct tick_sched *ts,int cpu)
localversion-rt +1 -1
@@ -1 +1 @@ --rt6 +-rt7