Thread (6 messages) flat view 6 messages, 3 authors, 2018-05-07

Re: [PATCH] cxl: disable the lazy approach for irqs in POWERVM environment.

From: Benjamin Herrenschmidt <hidden>
Date: 2018-03-23 02:14:57

On Thu, 2018-03-22 at 17:37 +0100, Christophe Lombard wrote:
The cxl driver cannot disable the interrupt at the device level and has
to use disable_irq[_nosync] instead.
To avoid the implementation of the lazy optimisation (the interrupt is
marked disabled, but the hardware is left unmasked), we can disable it,
for a particular irq line, by calling
'irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY)'.
Why do you need that ? What's wrong with the lazy approach ? It makes
disable_irq/enable_irq faster...

You shouldn't need that unless your device is generating a *LOT* of
irqs while disabled.
quoted hunk ↗ jump to hunk
Signed-off-by: Christophe Lombard <redacted>
---
 drivers/misc/cxl/guest.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
index f58b4b6c..dc476e1 100644
--- a/drivers/misc/cxl/guest.c
+++ b/drivers/misc/cxl/guest.c
@@ -389,6 +389,7 @@ static void disable_afu_irqs(struct cxl_context *ctx)
 		hwirq = ctx->irqs.offset[r];
 		for (i = 0; i < ctx->irqs.range[r]; hwirq++, i++) {
 			virq = irq_find_mapping(NULL, hwirq);
+			irq_set_status_flags(virq, IRQ_DISABLE_UNLAZY);
 			disable_irq(virq);
 		}
 	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help