aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/vas.h
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.ibm.com>2022-10-09 20:41:25 -0700
committerMichael Ellerman <mpe@ellerman.id.au>2022-10-18 22:46:18 +1100
commit89ed0b769d6adf30364f60e6b1566961821a9893 (patch)
treea81ce13c5e00a6a22c35782d190aa316a54d186e /arch/powerpc/platforms/pseries/vas.h
parentLinux 6.1-rc1 (diff)
downloadlinux-dev-89ed0b769d6adf30364f60e6b1566961821a9893.tar.xz
linux-dev-89ed0b769d6adf30364f60e6b1566961821a9893.zip
powerpc/pseries/vas: Add VAS IRQ primary handler
irq_default_primary_handler() can be used only with IRQF_ONESHOT flag, but the flag disables IRQ before executing the thread handler and enables it after the interrupt is handled. But this IRQ disable sets the VAS IRQ OFF state in the hypervisor. In case if NX faults during this window, the hypervisor will not deliver the fault interrupt to the partition and the user space may wait continuously for the CSB update. So use VAS specific IRQ handler instead of calling the default primary handler. Increment pending_faults counter in IRQ handler and the bottom thread handler will process all faults based on this counter. In case if the another interrupt is received while the thread is running, it will be processed using this counter. The synchronization of top and bottom handlers will be done with IRQTF_RUNTHREAD flag and will re-enter to bottom half if this flag is set. Signed-off-by: Haren Myneni <haren@linux.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/aaad8813b4762a6753cfcd0b605a7574a5192ec7.camel@linux.ibm.com
Diffstat (limited to '')
-rw-r--r--arch/powerpc/platforms/pseries/vas.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/vas.h b/arch/powerpc/platforms/pseries/vas.h
index 333ffa2f9f42..a2cb12a31c17 100644
--- a/arch/powerpc/platforms/pseries/vas.h
+++ b/arch/powerpc/platforms/pseries/vas.h
@@ -132,6 +132,7 @@ struct pseries_vas_window {
u64 flags;
char *name;
int fault_virq;
+ atomic_t pending_faults; /* Number of pending faults */
};
int sysfs_add_vas_caps(struct vas_cop_feat_caps *caps);