arm64: hibernate: add PUD_SECT_RDONLY
authorPavel Tatashin <pasha.tatashin@soleen.com>
Wed, 4 Dec 2019 15:59:22 +0000 (10:59 -0500)
committerWill Deacon <will@kernel.org>
Wed, 8 Jan 2020 16:32:55 +0000 (16:32 +0000)
There is PMD_SECT_RDONLY that is used in pud_* function which is confusing.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Acked-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/pgtable-hwdef.h
arch/arm64/kernel/hibernate.c

index d9fbd43..9961c7c 100644 (file)
 #define PUD_TABLE_BIT          (_AT(pudval_t, 1) << 1)
 #define PUD_TYPE_MASK          (_AT(pudval_t, 3) << 0)
 #define PUD_TYPE_SECT          (_AT(pudval_t, 1) << 0)
+#define PUD_SECT_RDONLY                (_AT(pudval_t, 1) << 7)         /* AP[2] */
 
 /*
  * Level 2 descriptor (PMD).
index 1ca8af6..ce60bce 100644 (file)
@@ -436,7 +436,7 @@ static int copy_pud(pgd_t *dst_pgdp, pgd_t *src_pgdp, unsigned long start,
                                return -ENOMEM;
                } else {
                        set_pud(dst_pudp,
-                               __pud(pud_val(pud) & ~PMD_SECT_RDONLY));
+                               __pud(pud_val(pud) & ~PUD_SECT_RDONLY));
                }
        } while (dst_pudp++, src_pudp++, addr = next, addr != end);