git: d90e3482b638 - main - subr_devmap: Use the arm L1_S macro
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 02 May 2025 15:45:01 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=d90e3482b63859673a29854ebddabcd8b627162b
commit d90e3482b63859673a29854ebddabcd8b627162b
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-05-02 15:33:13 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-05-02 15:39:04 +0000
subr_devmap: Use the arm L1_S macro
These check if we can should use a superpage to create the static map.
As it is arm specific we can use an arm-specific macro here.
Reviewed by: mhorne
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D50013
---
sys/kern/subr_devmap.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c
index 3ab20a2a4d43..1592db1790d5 100644
--- a/sys/kern/subr_devmap.c
+++ b/sys/kern/subr_devmap.c
@@ -37,6 +37,10 @@
#include <vm/pmap.h>
#include <machine/vmparam.h>
+#ifdef __arm__
+#include <machine/pte.h>
+#endif
+
static const struct devmap_entry *devmap_table;
static boolean_t devmap_bootstrap_done = false;
@@ -139,7 +143,7 @@ devmap_add_entry(vm_paddr_t pa, vm_size_t sz)
* also align the virtual address to the next-lower 1MB boundary so that
* we end with a nice efficient section mapping.
*/
- if ((pa & 0x000fffff) == 0 && (sz & 0x000fffff) == 0) {
+ if ((pa & L1_S_OFFSET) == 0 && (sz & L1_S_OFFSET) == 0) {
akva_devmap_vaddr = trunc_1mpage(akva_devmap_vaddr - sz);
} else
#endif