Skip to contentSkip to conversation

powerpc-e500-dont-pre-check-write-access-on-data-tlb-error.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 12, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: powerpc/e500: don't pre-check write access on data TLB error
has been removed from the -mm tree. Its filename was
powerpc-e500-dont-pre-check-write-access-on-data-tlb-error.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Christophe Leroy <[email protected]>
Subject: powerpc/e500: don't pre-check write access on data TLB error
Date: Tue, 2 Jul 2024 15:51:30 +0200

Don't pre-check write access on read-only pages on data TLB error.

Load the TLB anyway and take a DSI exception when it happens. This avoids reading SPRN_ESR at every data TLB error exception.

---

 arch/powerpc/kernel/head_85xx.S |   15 ---------------
 1 file changed, 15 deletions(-)
arch/powerpc/kernel/head_85xx.S renamed from arch/powerpc/kernel/head_85xx.S~powerpc-e500-dont-pre-check-write-access-on-data-tlb-error +0 -15
@@ -472,27 +472,12 @@ END_BTB_FLUSH_SECTION
 #endif
 
 4:
-	/* Mask of required permission bits. Note that while we
-	 * do copy ESR:ST to _PAGE_WRITE position as trying to write
-	 * to an RO page is pretty common, we don't do it with
-	 * _PAGE_DIRTY. We could do it, but it's a fairly rare
-	 * event so I'd rather take the overhead when it happens
-	 * rather than adding an instruction here. We should measure
-	 * whether the whole thing is worth it in the first place
-	 * as we could avoid loading SPRN_ESR completely in the first
-	 * place...
-	 *
-	 * TODO: Is it worth doing that mfspr & rlwimi in the first
-	 *       place or can we save a couple of instructions here ?
-	 */
-	mfspr	r12,SPRN_ESR
 #ifdef CONFIG_PTE_64BIT
 	li	r13,_PAGE_PRESENT|_PAGE_BAP_SR
 	oris	r13,r13,_PAGE_ACCESSED@h
 #else
 	li	r13,_PAGE_PRESENT|_PAGE_READ|_PAGE_ACCESSED
 #endif
-	rlwimi	r13,r12,11,29,29
 
 	FIND_PTE
 	andc.	r13,r13,r11		/* Check permission */

_

Patches currently in -mm which might be from [email protected] are