]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cxl: Ensure PSL interrupt is configured for contexts with no AFU IRQs
authorIan Munsie <imunsie@au1.ibm.com>
Wed, 4 May 2016 04:52:58 +0000 (14:52 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 11 May 2016 11:54:10 +0000 (21:54 +1000)
commit3c206fa77aaaac8cd7d4cfcd840c82495b01b288
tree359020d4afbb21676e01d3df6dbf903ccdd558a2
parent0e5b5ba17ac33a05d9f4a48b5eb8b5e30f2274d7
cxl: Ensure PSL interrupt is configured for contexts with no AFU IRQs

In the cxl kernel API, it is possible to create a context and start it
without allocating any interrupts. Since we assign or allocate the PSL
interrupt when allocating AFU interrupts this will lead to a situation
where we start the context with no means to take any faults.

The user API is not affected as it always goes through the cxl interrupt
allocation code paths and will have the PSL interrupt allocated or
assigned, even if no AFU interrupts were requested.

This checks that at least one interrupt is configured at the time of
attach, and if not it will assign the multiplexed PSL interrupt for
powernv, or allocate a single interrupt for PowerVM.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/guest.c
drivers/misc/cxl/native.c