File Index
Files and directories
Sign in
FILE

por.h

File preview with syntax highlighting.

linux-6.19.14/arch/arm64/include/asm/por.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Copyright (C) 2023 Arm Ltd.
 4 */
 5
 6#ifndef _ASM_ARM64_POR_H
 7#define _ASM_ARM64_POR_H
 8
 9#include <asm/sysreg.h>
10
11#define POR_EL0_INIT	POR_ELx_PERM_PREP(0, POE_RWX)
12
13static inline bool por_elx_allows_read(u64 por, u8 pkey)
14{
15	u8 perm = POR_ELx_PERM_GET(pkey, por);
16
17	return perm & POE_R;
18}
19
20static inline bool por_elx_allows_write(u64 por, u8 pkey)
21{
22	u8 perm = POR_ELx_PERM_GET(pkey, por);
23
24	return perm & POE_W;
25}
26
27static inline bool por_elx_allows_exec(u64 por, u8 pkey)
28{
29	u8 perm = POR_ELx_PERM_GET(pkey, por);
30
31	return perm & POE_X;
32}
33
34#endif /* _ASM_ARM64_POR_H */
~/ Read-only file preview.