arm: remove TTB_SECT_XN_MASK in DCACHE_WRITETHROUGH
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Fri, 5 Feb 2021 12:53:34 +0000 (13:53 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 2 Mar 2021 20:53:37 +0000 (15:53 -0500)
The normal memory (other that DCACHE_OFF) should be executable by default,
only the device memory (DCACHE_OFF) used for peripheral access should have
the bit execute never (TTB_SECT_XN_MASK).

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/arm/include/asm/system.h

index 5fe8369..9db64dd 100644 (file)
@@ -489,7 +489,7 @@ enum dcache_option {
  */
 enum dcache_option {
        DCACHE_OFF = TTB_SECT_DOMAIN(0) | TTB_SECT_XN_MASK | TTB_SECT,
-       DCACHE_WRITETHROUGH = DCACHE_OFF | TTB_SECT_C_MASK,
+       DCACHE_WRITETHROUGH = TTB_SECT_DOMAIN(0) | TTB_SECT | TTB_SECT_C_MASK,
        DCACHE_WRITEBACK = DCACHE_WRITETHROUGH | TTB_SECT_B_MASK,
        DCACHE_WRITEALLOC = DCACHE_WRITEBACK | TTB_SECT_TEX(1),
 };