mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
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! :^)
This commit is contained in:
parent
f23b29f605
commit
1bc859fb68
Notes:
sideshowbarker
2024-07-18 22:04:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1bc859fb688
2 changed files with 3 additions and 3 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue