Thread (6 messages) 6 messages, 4 authors, 2017-03-24

Re: [PATCH 3/3] powerpc/powernv: Introduce address translation services for Nvlink2

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-03-24 12:28:49
Also in: linux-devicetree, lkml

Alistair Popple [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h
index 6095575..fc61fca 100644
--- a/arch/powerpc/include/asm/tlb.h
+++ b/arch/powerpc/include/asm/tlb.h
@@ -63,15 +63,21 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
 }
 
 #ifdef CONFIG_SMP
+/* If there is an NPU context associated with this thread it may have
+ * been active on a GPU which has issued translation requests via the
+ * nest mmu. In this case we need to do a broadcast tlb to invalidate
+ * any caches on the nest mmu. Invalidations on the GPU are handled
+ * via mmu notfiers.
+ */
 static inline int mm_is_core_local(struct mm_struct *mm)
 {
-	return cpumask_subset(mm_cpumask(mm),
+	return !mm->context.npu_context && cpumask_subset(mm_cpumask(mm),
 			      topology_sibling_cpumask(smp_processor_id()));
 }
This breaks the BookE build (corenet64_smp_defconfig):

23:22:58 In file included from arch/powerpc/mm/pgtable-book3e.c:15:0:
23:22:58 ./arch/powerpc/include/asm/tlb.h: In function 'mm_is_core_local':
23:22:58 ./arch/powerpc/include/asm/tlb.h:75:21: error: 'mm_context_t {aka struct <anonymous>}' has no member named 'npu_context'
23:22:58   return !mm->context.npu_context && cpumask_subset(mm_cpumask(mm),
23:22:58                      ^

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help