Skip to content

Commit 7ea4088

Browse files
soleenwilldeacon
authored andcommitted
arm64: hibernate: add PUD_SECT_RDONLY
There is PMD_SECT_RDONLY that is used in pud_* function which is confusing. Signed-off-by: Pavel Tatashin <[email protected]> Acked-by: James Morse <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 13373f0 commit 7ea4088

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

arch/arm64/include/asm/pgtable-hwdef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
#define PUD_TABLE_BIT (_AT(pudval_t, 1) << 1)
111111
#define PUD_TYPE_MASK (_AT(pudval_t, 3) << 0)
112112
#define PUD_TYPE_SECT (_AT(pudval_t, 1) << 0)
113+
#define PUD_SECT_RDONLY (_AT(pudval_t, 1) << 7) /* AP[2] */
113114

114115
/*
115116
* Level 2 descriptor (PMD).

arch/arm64/kernel/hibernate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ static int copy_pud(pgd_t *dst_pgdp, pgd_t *src_pgdp, unsigned long start,
436436
return -ENOMEM;
437437
} else {
438438
set_pud(dst_pudp,
439-
__pud(pud_val(pud) & ~PMD_SECT_RDONLY));
439+
__pud(pud_val(pud) & ~PUD_SECT_RDONLY));
440440
}
441441
} while (dst_pudp++, src_pudp++, addr = next, addr != end);
442442

0 commit comments

Comments
 (0)