Skip to content

Commit 50b77cb

Browse files
committed
arm64/sysreg: Move POR_EL0_INIT to asm/por.h
JIRA: https://issues.redhat.com/browse/RHEL-101059 commit 650701e Author: Kevin Brodsky <kevin.brodsky@arm.com> Date: Wed, 19 Feb 2025 16:40:29 +0000 The value of POR_EL0_INIT is not architectural, it is a software decision. Since we have a dedicated header for POR_ELx, we might as well define POR_EL0_INIT there. While at it also define POR_EL0_INIT using POR_ELx_PERM_PREP(), making it clearer that we are setting permissions for POIndex/pkey 0. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Link: https://lore.kernel.org/r/20250219164029.2309119-4-kevin.brodsky@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Mark Salter <msalter@redhat.com>
1 parent 878ed4a commit 50b77cb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

arch/arm64/include/asm/por.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#include <asm/sysreg.h>
1010

11+
#define POR_EL0_INIT POR_ELx_PERM_PREP(0, POE_RWX)
12+
1113
static inline bool por_elx_allows_read(u64 por, u8 pkey)
1214
{
1315
u8 perm = POR_ELx_PERM_GET(pkey, por);

arch/arm64/include/asm/sysreg.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,9 +1057,6 @@
10571057
#define POR_ELx_PERM_GET(idx, reg) (((reg) >> POR_ELx_PERM_SHIFT(idx)) & POE_MASK)
10581058
#define POR_ELx_PERM_PREP(idx, perm) (((perm) & POE_MASK) << POR_ELx_PERM_SHIFT(idx))
10591059

1060-
/* Initial value for Permission Overlay Extension for EL0 */
1061-
#define POR_EL0_INIT POE_RWX
1062-
10631060
/*
10641061
* Definitions for Guarded Control Stack
10651062
*/

0 commit comments

Comments
 (0)