[PATCH] xen: define PADDR_BITS for riscv

Alistair Francis posted 1 patch 1 year, 3 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20221228052018.730671-1-alistair.francis@opensource.wdc.com
xen/arch/riscv/include/asm/page-bits.h | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/page-bits.h
[PATCH] xen: define PADDR_BITS for riscv
Posted by Alistair Francis 1 year, 3 months ago
From: Alistair Francis <alistair.francis@wdc.com>

Define PADDR_BITS and PAGE_SHIFT for the RISC-V 64-bit architecture.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 xen/arch/riscv/include/asm/page-bits.h | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/page-bits.h

diff --git a/xen/arch/riscv/include/asm/page-bits.h b/xen/arch/riscv/include/asm/page-bits.h
new file mode 100644
index 0000000000..d7bd7be098
--- /dev/null
+++ b/xen/arch/riscv/include/asm/page-bits.h
@@ -0,0 +1,7 @@
+#ifndef __RISCV_PAGE_SHIFT_H__
+#define __RISCV_PAGE_SHIFT_H__
+
+#define PAGE_SHIFT              12 /* 4 KiB Pages */
+#define PADDR_BITS              56 /* 44-bit PPN */
+
+#endif /* __RISCV_PAGE_SHIFT_H__ */
-- 
2.38.1
Re: [PATCH] xen: define PADDR_BITS for riscv
Posted by Andrew Cooper 1 year, 3 months ago
On 28/12/2022 5:20 am, Alistair Francis wrote:
> From: Alistair Francis <alistair.francis@wdc.com>
>
> Define PADDR_BITS and PAGE_SHIFT for the RISC-V 64-bit architecture.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Thanks.  I've committed this with a tweak to the subject (its not just
PADDR_BITS your adding), and a tweak to the include guards (SHIFT->BITS
to match the name of the file).

~Andrew

> ---
>  xen/arch/riscv/include/asm/page-bits.h | 7 +++++++
>  1 file changed, 7 insertions(+)
>  create mode 100644 xen/arch/riscv/include/asm/page-bits.h
>
> diff --git a/xen/arch/riscv/include/asm/page-bits.h b/xen/arch/riscv/include/asm/page-bits.h
> new file mode 100644
> index 0000000000..d7bd7be098
> --- /dev/null
> +++ b/xen/arch/riscv/include/asm/page-bits.h
> @@ -0,0 +1,7 @@
> +#ifndef __RISCV_PAGE_SHIFT_H__
> +#define __RISCV_PAGE_SHIFT_H__
> +
> +#define PAGE_SHIFT              12 /* 4 KiB Pages */
> +#define PADDR_BITS              56 /* 44-bit PPN */
> +
> +#endif /* __RISCV_PAGE_SHIFT_H__ */