Re: [PATCH] scsi: ufs: core: Avoid sleeping in hard interrupt context when PREEMP_RT is enabled.

From: Bart Van Assche

Date: Mon Jul 06 2026 - 11:52:49 EST


On 6/30/26 7:15 AM, Sebastian Andrzej Siewior wrote:
From ufshcd_intr():
| intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
| enabled_intr_status = intr_status & ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
|
| ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);

What does this do? Does it disable the IRQ source? If so then
IRQF_ONESHOT should be removed.

Writing into the REG_INTERRUPT_STATUS register clears the bits that are
set in the first argument of writel().

| /* Directly handle interrupts since MCQ ESI handlers does the hard job */
| return ufshcd_sl_intr(hba, enabled_intr_status);

If not, why is this not part of the threaded handler?
If MCQ is disabled, ufshcd_sl_intr() processes all types of interrupts.
If MCQ is enabled, the ESI interrupt handlers process I/O completions
and ufshcd_sl_intr() processes the remaining interrupt types.

Bart.