summaryrefslogtreecommitdiff
path: root/Kernel/Arch
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-21 00:42:16 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-21 00:43:29 +0100
commit1bc859fb6883c3cb059016b056975ce7cfafd1e2 (patch)
tree502b90fad124fc9e4865b9eb7de0c358b399fd16 /Kernel/Arch
parentf23b29f60581667597fc7db27abd6f1d5911b5b0 (diff)
downloadserenity-1bc859fb6883c3cb059016b056975ce7cfafd1e2.zip
Kernel: Make UNMAP_AFTER_INIT imply NEVER_INLINE as well
We want to make sure these functions actually do get unmapped. If they were inlined somewhere, the inlined version(s) would remain mapped. Thanks to "thislooksfun" for the suggestion! :^)
Diffstat (limited to 'Kernel/Arch')
-rw-r--r--Kernel/Arch/i386/CPU.cpp4
-rw-r--r--Kernel/Arch/i386/CPU.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp
index dca97aef2a..4c8031e560 100644
--- a/Kernel/Arch/i386/CPU.cpp
+++ b/Kernel/Arch/i386/CPU.cpp
@@ -720,12 +720,12 @@ void exit_trap(TrapFrame* trap)
return Processor::current().exit_trap(*trap);
}
-NEVER_INLINE UNMAP_AFTER_INIT void write_cr0(u32 value)
+UNMAP_AFTER_INIT void write_cr0(u32 value)
{
asm volatile("movl %%eax, %%cr0" ::"a"(value));
}
-NEVER_INLINE UNMAP_AFTER_INIT void write_cr4(u32 value)
+UNMAP_AFTER_INIT void write_cr4(u32 value)
{
asm volatile("movl %%eax, %%cr4" ::"a"(value));
}
diff --git a/Kernel/Arch/i386/CPU.h b/Kernel/Arch/i386/CPU.h
index e2ea68b437..90e7e73e23 100644
--- a/Kernel/Arch/i386/CPU.h
+++ b/Kernel/Arch/i386/CPU.h
@@ -35,7 +35,7 @@
#include <LibC/sys/arch/i386/regs.h>
#define READONLY_AFTER_INIT __attribute__((section(".ro_after_init")))
-#define UNMAP_AFTER_INIT __attribute__((section(".unmap_after_init")))
+#define UNMAP_AFTER_INIT NEVER_INLINE __attribute__((section(".unmap_after_init")))
#define PAGE_SIZE 4096
#define GENERIC_INTERRUPT_HANDLERS_COUNT (256 - IRQ_VECTOR_BASE)