summaryrefslogtreecommitdiff
path: root/Kernel/Prekernel
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-12-04 09:11:10 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-04 11:59:59 -0800
commit9b90f1fed5a81c52f006203ee2212f28bdc470d3 (patch)
treecb2ce91419cd6a5ee4cd8d8df114df8c9f34b8d8 /Kernel/Prekernel
parent8e2d0c8d5cbbc8a2773c187090f2b652157fd5f5 (diff)
downloadserenity-9b90f1fed5a81c52f006203ee2212f28bdc470d3.zip
Kernel: Do not do integer to pointer conversion in constexpr functions
Creating pointers from arbitrary values is not a valid thing to do in constexpr functions. Furthermore, this functions is always called with runtime values anyways, so there's no use in having it be constexpr. Instead, make it ALWAYS_INLINE.
Diffstat (limited to 'Kernel/Prekernel')
-rw-r--r--Kernel/Prekernel/Arch/aarch64/PrekernelMMU.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Prekernel/Arch/aarch64/PrekernelMMU.cpp b/Kernel/Prekernel/Arch/aarch64/PrekernelMMU.cpp
index 47ac13632d..7aa1c6593a 100644
--- a/Kernel/Prekernel/Arch/aarch64/PrekernelMMU.cpp
+++ b/Kernel/Prekernel/Arch/aarch64/PrekernelMMU.cpp
@@ -48,7 +48,7 @@ constexpr u32 INNER_SHAREABLE = (3 << 8);
constexpr u32 NORMAL_MEMORY = (0 << 2);
constexpr u32 DEVICE_MEMORY = (1 << 2);
-constexpr u64* descriptor_to_pointer(FlatPtr descriptor)
+ALWAYS_INLINE static u64* descriptor_to_pointer(FlatPtr descriptor)
{
return (u64*)(descriptor & DESCRIPTOR_MASK);
}