aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/fault.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2017-07-27 02:24:55 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2017-08-17 09:31:52 -0400
commit0f4bc0932e51817105fdee77a4668069a89581d5 (patch)
tree248a04eb03e004057d208b0ede68903bf2e13462 /drivers/misc/cxl/fault.c
parentfa4531f753f1c80d21b5eb86ec5c0229310c5fb0 (diff)
powerpc/mm/cxl: Add the fault handling cpu to mm cpumask
We use mm cpumask for serializing against lockless page table walk. Anybody who is doing a lockless page table walk is expected to disable irq and only cpus in mm cpumask is expected do the lockless walk. This ensure that a THP split can send IPI to only cpus in the mm cpumask, to make sure there are no parallel lockless page table walk. Add the CAPI fault handling cpu to the mm cpumask so that we can do the lockless page table walk while inserting hash page table entries. Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl/fault.c')
-rw-r--r--drivers/misc/cxl/fault.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c
index 6eed7d03e2b5..ab507e4ed69b 100644
--- a/drivers/misc/cxl/fault.c
+++ b/drivers/misc/cxl/fault.c
@@ -138,6 +138,12 @@ int cxl_handle_mm_fault(struct mm_struct *mm, u64 dsisr, u64 dar)
138 int result; 138 int result;
139 unsigned long access, flags, inv_flags = 0; 139 unsigned long access, flags, inv_flags = 0;
140 140
141 /*
142 * Add the fault handling cpu to task mm cpumask so that we
143 * can do a safe lockless page table walk when inserting the
144 * hash page table entry.
145 */
146 cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
141 if ((result = copro_handle_mm_fault(mm, dar, dsisr, &flt))) { 147 if ((result = copro_handle_mm_fault(mm, dar, dsisr, &flt))) {
142 pr_devel("copro_handle_mm_fault failed: %#x\n", result); 148 pr_devel("copro_handle_mm_fault failed: %#x\n", result);
143 return result; 149 return result;