|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/arm: mpu: Ensure that the page size is 4KB
commit de0254b90922a8644bb2c4c1593786d45c80ea22
Author: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
AuthorDate: Tue Mar 4 17:57:08 2025 +0000
Commit: Michal Orzel <michal.orzel@xxxxxxx>
CommitDate: Thu Mar 6 08:09:29 2025 +0100
xen/arm: mpu: Ensure that the page size is 4KB
Similar to commit (d736b6eb451b, "xen/arm: mpu: Define Xen start address for
MPU systems"), one needs to add a build assertion to ensure that the page
size
is 4KB on arm32 based systems as well.
The existing build assertion is moved under "xen/arch/arm/mpu" as it applies
for both arm64 and arm32 based systems.
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
---
xen/arch/arm/Makefile | 1 +
xen/arch/arm/arm64/mpu/Makefile | 1 -
xen/arch/arm/arm64/mpu/mm.c | 15 ---------------
xen/arch/arm/mpu/Makefile | 1 +
xen/arch/arm/mpu/mm.c | 15 +++++++++++++++
5 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 43ab5e8f25..fb0948f067 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -1,6 +1,7 @@
obj-$(CONFIG_ARM_32) += arm32/
obj-$(CONFIG_ARM_64) += arm64/
obj-$(CONFIG_MMU) += mmu/
+obj-$(CONFIG_MPU) += mpu/
obj-$(CONFIG_ACPI) += acpi/
obj-$(CONFIG_HAS_PCI) += pci/
ifneq ($(CONFIG_NO_PLAT),y)
diff --git a/xen/arch/arm/arm64/mpu/Makefile b/xen/arch/arm/arm64/mpu/Makefile
index a8a750a3d0..3340058c08 100644
--- a/xen/arch/arm/arm64/mpu/Makefile
+++ b/xen/arch/arm/arm64/mpu/Makefile
@@ -1,2 +1 @@
obj-y += head.o
-obj-y += mm.o
diff --git a/xen/arch/arm/arm64/mpu/mm.c b/xen/arch/arm/arm64/mpu/mm.c
deleted file mode 100644
index 0b8748e575..0000000000
--- a/xen/arch/arm/arm64/mpu/mm.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <xen/lib.h>
-#include <xen/init.h>
-#include <xen/sizes.h>
-
-static void __init __maybe_unused build_assertions(void)
-{
- /*
- * Unlike MMU, MPU does not use pages for translation. However, we continue
- * to use PAGE_SIZE to denote 4KB. This is so that the existing memory
- * management based on pages, continue to work for now.
- */
- BUILD_BUG_ON(PAGE_SIZE != SZ_4K);
-}
diff --git a/xen/arch/arm/mpu/Makefile b/xen/arch/arm/mpu/Makefile
new file mode 100644
index 0000000000..b18cec4836
--- /dev/null
+++ b/xen/arch/arm/mpu/Makefile
@@ -0,0 +1 @@
+obj-y += mm.o
diff --git a/xen/arch/arm/mpu/mm.c b/xen/arch/arm/mpu/mm.c
new file mode 100644
index 0000000000..0b8748e575
--- /dev/null
+++ b/xen/arch/arm/mpu/mm.c
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <xen/lib.h>
+#include <xen/init.h>
+#include <xen/sizes.h>
+
+static void __init __maybe_unused build_assertions(void)
+{
+ /*
+ * Unlike MMU, MPU does not use pages for translation. However, we continue
+ * to use PAGE_SIZE to denote 4KB. This is so that the existing memory
+ * management based on pages, continue to work for now.
+ */
+ BUILD_BUG_ON(PAGE_SIZE != SZ_4K);
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |