mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Kernel/SMP: Don't process SMP messages in non-SMP mode
Processing SMP messages outside of non-SMP mode is a waste of time, and now that we don't rely on the side effects of calling the message processing function, let's stop calling it entirely. :^)
This commit is contained in:
parent
a971de89d3
commit
74e6a70958
2 changed files with 11 additions and 1 deletions
|
@ -42,6 +42,11 @@ extern "C" void context_first_init(Thread* from_thread, Thread* to_thread, TrapF
|
|||
extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread) __attribute__((used));
|
||||
extern "C" FlatPtr do_init_context(Thread* thread, u32 flags) __attribute__((used));
|
||||
|
||||
bool Processor::is_smp_enabled()
|
||||
{
|
||||
return s_smp_enabled;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT static void sse_init()
|
||||
{
|
||||
write_cr0((read_cr0() & 0xfffffffbu) | 0x2);
|
||||
|
@ -807,6 +812,8 @@ void Processor::smp_cleanup_message(ProcessorMessage& msg)
|
|||
|
||||
bool Processor::smp_process_pending_messages()
|
||||
{
|
||||
VERIFY(s_smp_enabled);
|
||||
|
||||
bool did_process = false;
|
||||
u32 prev_flags;
|
||||
enter_critical(prev_flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue