Skip to contentSkip to conversation

xen: arm: remove unnecessary cache flush in write_pte

PATCH In review Ian Campbell 2 participants 5 messages Jul 17, 2013 – Jul 29, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: arm: remove unnecessary cache flush in write_pte

On a ARMv7/v8 SMP system the MMU is coherent

---
 xen/include/asm-arm/arm32/page.h |    2 --
 xen/include/asm-arm/arm64/page.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
xen/include/asm-arm/arm32/page.h +0 -2
index 38bcffd..3a06a22 100644
@@ -16,8 +16,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         /* Safely write the entry (STRD is atomic on CPUs that support LPAE) */
         "strd %0, %H0, [%1];"
         "dsb;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        STORE_CP32(1, DCCMVAC)
         /* Ensure that the data flush is completed before proceeding */
         "dsb;"
         : : "r" (pte.bits), "r" (p) : "memory");
xen/include/asm-arm/arm64/page.h +0 -2
index bd48fe3..542f886 100644
@@ -11,8 +11,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         "dsb sy;"
         "str %0, [%1];"         /* Write the entry */
         "dsb sy;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        "dc cvac, %1;"
         /* Ensure that the data flush is completed before proceeding */
         "dsb sy;"
         : : "r" (pte.bits), "r" (p) : "memory");
Signature · 1 line
1.7.2.5
#1 lore raw

ping?

Quoted 35 lines · Ian Campbell

On a ARMv7/v8 SMP system the MMU is coherent

---
 xen/include/asm-arm/arm32/page.h |    2 --
 xen/include/asm-arm/arm64/page.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
xen/include/asm-arm/arm32/page.h +0 -2
index 38bcffd..3a06a22 100644
@@ -16,8 +16,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         /* Safely write the entry (STRD is atomic on CPUs that support LPAE) */
         "strd %0, %H0, [%1];"
         "dsb;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        STORE_CP32(1, DCCMVAC)
         /* Ensure that the data flush is completed before proceeding */
         "dsb;"
         : : "r" (pte.bits), "r" (p) : "memory");
xen/include/asm-arm/arm64/page.h +0 -2
index bd48fe3..542f886 100644
@@ -11,8 +11,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         "dsb sy;"
         "str %0, [%1];"         /* Write the entry */
         "dsb sy;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        "dc cvac, %1;"
         /* Ensure that the data flush is completed before proceeding */
         "dsb sy;"
         : : "r" (pte.bits), "r" (p) : "memory");
#2 lore raw
Quoted 12 lines · Ian Campbell

ping?

Quoted 9 lines · Ian Campbell

On a ARMv7/v8 SMP system the MMU is coherent

---
 xen/include/asm-arm/arm32/page.h |    2 --
 xen/include/asm-arm/arm64/page.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
Quoted 12 lines

xen/include/asm-arm/arm32/page.h static inline void write_pte(lpae_t *p, lpae_t pte) · line 20

Quoted 12 lines
xen/include/asm-arm/arm32/page.h +0 -2
index 38bcffd..3a06a22 100644
@@ -16,8 +16,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         /* Safely write the entry (STRD is atomic on CPUs that support LPAE) */
         "strd %0, %H0, [%1];"
         "dsb;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        STORE_CP32(1, DCCMVAC)
         /* Ensure that the data flush is completed before proceeding */
         "dsb;"

We should drop this DSB and its comment too (likewise for the second 'dsb sy' below). With that change, Acked-by: Tim Deegan <[email protected]>.

Tim.

Quoted 16 lines
Quoted 14 lines
xen/include/asm-arm/arm32/page.h +0 -0
         : : "r" (pte.bits), "r" (p) : "memory");
xen/include/asm-arm/arm64/page.h +0 -2
index bd48fe3..542f886 100644
@@ -11,8 +11,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         "dsb sy;"
         "str %0, [%1];"         /* Write the entry */
         "dsb sy;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        "dc cvac, %1;"
         /* Ensure that the data flush is completed before proceeding */
         "dsb sy;"
         : : "r" (pte.bits), "r" (p) : "memory");
#3 lore raw
Quoted 13 lines · Tim Deegan
Quoted 12 lines · Ian Campbell

ping?

Quoted 9 lines · Ian Campbell

On a ARMv7/v8 SMP system the MMU is coherent

---
 xen/include/asm-arm/arm32/page.h |    2 --
 xen/include/asm-arm/arm64/page.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
xen/include/asm-arm/arm32/page.h +0 -0
index 38bcffd..3a06a22 100644
Quoted 8 lines

xen/include/asm-arm/arm32/page.h static inline void write_pte(lpae_t *p, lpae_t pte) · line 20

Quoted 8 lines
xen/include/asm-arm/arm32/page.h +0 -2
@@ -16,8 +16,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         /* Safely write the entry (STRD is atomic on CPUs that support LPAE) */
         "strd %0, %H0, [%1];"
         "dsb;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        STORE_CP32(1, DCCMVAC)
         /* Ensure that the data flush is completed before proceeding */
         "dsb;"

We should drop this DSB and its comment too (likewise for the second 'dsb sy' below).

True, thanks.

Quoted 1 line

With that change, Acked-by: Tim Deegan <[email protected]>.

Cheers.

#4 lore raw
Quoted 30 lines · Ian Campbell
Quoted 13 lines · Tim Deegan
Quoted 12 lines · Ian Campbell

ping?

Quoted 9 lines · Ian Campbell

On a ARMv7/v8 SMP system the MMU is coherent

---
 xen/include/asm-arm/arm32/page.h |    2 --
 xen/include/asm-arm/arm64/page.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
xen/include/asm-arm/arm32/page.h +0 -0
index 38bcffd..3a06a22 100644
Quoted 8 lines

xen/include/asm-arm/arm32/page.h static inline void write_pte(lpae_t *p, lpae_t pte) · line 20

Quoted 8 lines
xen/include/asm-arm/arm32/page.h +0 -2
@@ -16,8 +16,6 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
         /* Safely write the entry (STRD is atomic on CPUs that support LPAE) */
         "strd %0, %H0, [%1];"
         "dsb;"
-        /* Push this cacheline to the PoC so the rest of the system sees it. */
-        STORE_CP32(1, DCCMVAC)
         /* Ensure that the data flush is completed before proceeding */
         "dsb;"

We should drop this DSB and its comment too (likewise for the second 'dsb sy' below).

Quoted 5 lines

True, thanks.

Quoted 1 line

With that change, Acked-by: Tim Deegan <[email protected]>.

Cheers.

And now applied...

Quoted 8 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel