Re: [PATCH][RFC] parisc: Use local tlb purges only on PA2.0 machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022-09-25 2:57 p.m., Helge Deller wrote:
+#ifdef CONFIG_PA20
+#define ALT_COND_PACACHE	ALT_COND_ALWAYS
+#else
+#define ALT_COND_PACACHE	ALT_COND_NO_SMP
+#endif
+
  ENTRY_CFI(flush_tlb_all_local)
  	/*
  	 * The pitlbe and pdtlbe instructions should only be used to
@@ -539,15 +545,10 @@ ENTRY_CFI(copy_user_page_asm)

  	/* Purge any old translations */

-#ifdef CONFIG_PA20
-	pdtlb,l		%r0(%r28)
-	pdtlb,l		%r0(%r29)
-#else
  0:	pdtlb		%r0(%r28)
  1:	pdtlb		%r0(%r29)
-	ALTERNATIVE(0b, 0b+4, ALT_COND_NO_SMP, INSN_PxTLB)
-	ALTERNATIVE(1b, 1b+4, ALT_COND_NO_SMP, INSN_PxTLB)
-#endif
+	ALTERNATIVE(0b, 0b+4, ALT_COND_PACACHE, INSN_PxTLB)
+	ALTERNATIVE(1b, 1b+4, ALT_COND_PACACHE, INSN_PxTLB)
This doesn't look correct.  If ALT_COND_PACACHE is defined as ALT_COND_NO_SMP, the pdtlb
instructions will be converted to pdtlb,l instructions when running UP.  These are not supported
on PA 1.1.  When running SMP, we have pdtlb purges.  For these, we need bus serialization.

These also don't look correct:

#define pdtlb(sr, addr) asm volatile("pdtlb 0(%%sr%0,%1)" \
                        ALTERNATIVE(ALT_COND_NO_SMP, INSN_PxTLB) \
                        : : "i"(sr), "r" (addr) : "memory")
#define pitlb(sr, addr) asm volatile("pitlb 0(%%sr%0,%1)" \
                        ALTERNATIVE(ALT_COND_NO_SMP, INSN_PxTLB) \
                        ALTERNATIVE(ALT_COND_NO_SPLIT_TLB, INSN_NOP) \
                        : : "i"(sr), "r" (addr) : "memory")

We only have local purge on PA 2.0 machines.

Dave

--
John David Anglin  dave.anglin@xxxxxxxx




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux