linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] Skip unnecessary pte makeup when clearing it
@ 2012-01-30  1:47 bill4carson at gmail.com
  2012-01-30  1:47 ` [PATCH] " bill4carson at gmail.com
  0 siblings, 1 reply; 16+ messages in thread
From: bill4carson at gmail.com @ 2012-01-30  1:47 UTC (permalink / raw)
  To: linux-arm-kernel


If we are only about to clear a hardware pte entry, then pte makeup code is
unnecessary for cpu_v7_set_pte_ext and armv6_set_pte_ext, so just skip it.

Signeed-off-by: Bill Carson <bill4carson@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: arm-mail-list <linux-arm-kernel@lists.infradead.org>


Changes for V2:
    - Use "1f" instead of "set_pte" as label
    - Build/bootup test with thumb mode
    - checkpatch script shows:
total: 0 errors, 0 warnings, 44 lines checked

./0001-Skip-unnecessary-pte-makeup-when-clearing-it.patch has no obvious style problems and is ready for submission.

 arch/arm/mm/proc-macros.S    |   10 +++++-----
 arch/arm/mm/proc-v7-2level.S |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH V3] Skip unnecessary pte makeup when clearing it
@ 2012-01-30  8:36 bill4carson at gmail.com
  2012-01-30  8:36 ` [PATCH] " bill4carson at gmail.com
  0 siblings, 1 reply; 16+ messages in thread
From: bill4carson at gmail.com @ 2012-01-30  8:36 UTC (permalink / raw)
  To: linux-arm-kernel



If we are only about to clear a hardware pte entry, then pte makeup code is
unnecessary for cpu_v7_set_pte_ext and armv6_set_pte_ext, so just skip it.

Signeed-off-by: Bill Carson <bill4carson@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: arm-mail-list <linux-arm-kernel@lists.infradead.org>


Changes for V3:
    - Fix double tab issue pointed out by Uwe Kleine-K?nig

Changes for V2:
    - Use "1f" instead of "set_pte" as label
    - Build/bootup test with thumb mode
    - checkpatch script shows:
total: 0 errors, 0 warnings, 44 lines checked

./0001-Skip-unnecessary-pte-makeup-when-clearing-it.patch has no obvious style problems and is ready for submission.

 arch/arm/mm/proc-macros.S    |   10 +++++-----
 arch/arm/mm/proc-v7-2level.S |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH] Skip unnecessary pte makeup when clearing it.
@ 2012-01-18  9:52 bill4carson at gmail.com
  2012-01-18 10:20 ` Uwe Kleine-König
  2012-01-18 10:33 ` Catalin Marinas
  0 siblings, 2 replies; 16+ messages in thread
From: bill4carson at gmail.com @ 2012-01-18  9:52 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bill Carson <bill4carson@gmail.com>

If we are only about to clear a hardware pte entry, then pte makeup code is
unnecessary for cpu_v7_set_pte_ext and armv6_set_pte_ext, so just skip it.

Signed-off-by: Bill Carson <bill4carson@gmail.com>
---
 arch/arm/mm/proc-macros.S    |   10 +++++-----
 arch/arm/mm/proc-v7-2level.S |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S
index 2d8ff3a..11288b3 100644
--- a/arch/arm/mm/proc-macros.S
+++ b/arch/arm/mm/proc-macros.S
@@ -138,6 +138,10 @@
 	.macro	armv6_set_pte_ext pfx
 	str	r1, [r0], #2048			@ linux version
 
+	tst	r1, #L_PTE_YOUNG
+	tstne	r1, #L_PTE_PRESENT
+	moveq	r3, #0
+	moveq	set_pte
 	bic	r3, r1, #0x000003fc
 	bic	r3, r3, #PTE_TYPE_MASK
 	orr	r3, r3, r2
@@ -163,11 +167,7 @@
 	orrne	r3, r3, #PTE_EXT_XN
 
 	orr	r3, r3, r2
-
-	tst	r1, #L_PTE_YOUNG
-	tstne	r1, #L_PTE_PRESENT
-	moveq	r3, #0
-
+set_pte:
 	str	r3, [r0]
 	mcr	p15, 0, r0, c7, c10, 1		@ flush_pte
 	.endm
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S
index 3a4b3e7..3e17ec2 100644
--- a/arch/arm/mm/proc-v7-2level.S
+++ b/arch/arm/mm/proc-v7-2level.S
@@ -76,6 +76,10 @@ ENTRY(cpu_v7_set_pte_ext)
 #ifdef CONFIG_MMU
 	str	r1, [r0]			@ linux version
 
+	tst	r1, #L_PTE_YOUNG
+	tstne	r1, #L_PTE_PRESENT
+	moveq	r3, #0
+	beq		set_pte
 	bic	r3, r1, #0x000003f0
 	bic	r3, r3, #PTE_TYPE_MASK
 	orr	r3, r3, r2
@@ -98,11 +102,7 @@ ENTRY(cpu_v7_set_pte_ext)
 
 	tst	r1, #L_PTE_XN
 	orrne	r3, r3, #PTE_EXT_XN
-
-	tst	r1, #L_PTE_YOUNG
-	tstne	r1, #L_PTE_PRESENT
-	moveq	r3, #0
-
+set_pte:
  ARM(	str	r3, [r0, #2048]! )
  THUMB(	add	r0, r0, #2048 )
  THUMB(	str	r3, [r0] )
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-02-03 11:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30  1:47 [PATCH V2] Skip unnecessary pte makeup when clearing it bill4carson at gmail.com
2012-01-30  1:47 ` [PATCH] " bill4carson at gmail.com
2012-01-30  7:58   ` Uwe Kleine-König
2012-01-30  8:29     ` bill4carson
  -- strict thread matches above, loose matches on Subject: below --
2012-01-30  8:36 [PATCH V3] " bill4carson at gmail.com
2012-01-30  8:36 ` [PATCH] " bill4carson at gmail.com
2012-02-03  6:54   ` Uwe Kleine-König
2012-02-03  7:43     ` bill4carson
2012-02-03  7:48       ` bill4carson
2012-02-03  9:35       ` Uwe Kleine-König
2012-02-03 10:09         ` bill4carson
2012-02-03 11:27   ` Catalin Marinas
2012-01-18  9:52 bill4carson at gmail.com
2012-01-18 10:20 ` Uwe Kleine-König
2012-01-19  1:52   ` bill4carson
2012-01-18 10:33 ` Catalin Marinas
2012-01-19  1:57   ` bill4carson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).