summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/kernel.cpp14
-rw-r--r--src/core/hle/kernel/physical_core.cpp4
-rw-r--r--src/core/hle/kernel/physical_core.h7
-rw-r--r--src/core/hle/kernel/scheduler.cpp4
-rw-r--r--src/core/hle/kernel/scheduler.h4
5 files changed, 17 insertions, 16 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index dbb75416d..1f2af7a1b 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -472,16 +472,12 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const {
472} 472}
473 473
474void KernelCore::InvalidateAllInstructionCaches() { 474void KernelCore::InvalidateAllInstructionCaches() {
475 if (!IsMulticore()) { 475 auto& threads = GlobalScheduler().GetThreadList();
476 auto& threads = GlobalScheduler().GetThreadList(); 476 for (auto& thread : threads) {
477 for (auto& thread : threads) { 477 if (!thread->IsHLEThread()) {
478 if (!thread->IsHLEThread()) { 478 auto& arm_interface = thread->ArmInterface();
479 auto& arm_interface = thread->ArmInterface(); 479 arm_interface.ClearInstructionCache();
480 arm_interface.ClearInstructionCache();
481 }
482 } 480 }
483 } else {
484 UNIMPLEMENTED_MSG("Cache Invalidation unimplemented for multicore");
485 } 481 }
486} 482}
487 483
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp
index c82c60a16..c6bbdb080 100644
--- a/src/core/hle/kernel/physical_core.cpp
+++ b/src/core/hle/kernel/physical_core.cpp
@@ -37,6 +37,10 @@ void PhysicalCore::Shutdown() {
37 scheduler.Shutdown(); 37 scheduler.Shutdown();
38} 38}
39 39
40bool PhysicalCore::IsInterrupted() const {
41 return interrupt_handler.IsInterrupted();
42}
43
40void PhysicalCore::Interrupt() { 44void PhysicalCore::Interrupt() {
41 guard->lock(); 45 guard->lock();
42 interrupt_handler.SetInterrupt(true); 46 interrupt_handler.SetInterrupt(true);
diff --git a/src/core/hle/kernel/physical_core.h b/src/core/hle/kernel/physical_core.h
index 85f6dec05..d7a7a951c 100644
--- a/src/core/hle/kernel/physical_core.h
+++ b/src/core/hle/kernel/physical_core.h
@@ -7,8 +7,6 @@
7#include <cstddef> 7#include <cstddef>
8#include <memory> 8#include <memory>
9 9
10#include "core/arm/cpu_interrupt_handler.h"
11
12namespace Common { 10namespace Common {
13class SpinLock; 11class SpinLock;
14} 12}
@@ -19,6 +17,7 @@ class Scheduler;
19 17
20namespace Core { 18namespace Core {
21class ARM_Interface; 19class ARM_Interface;
20class CPUInterruptHandler;
22class ExclusiveMonitor; 21class ExclusiveMonitor;
23class System; 22class System;
24} // namespace Core 23} // namespace Core
@@ -45,9 +44,7 @@ public:
45 void ClearInterrupt(); 44 void ClearInterrupt();
46 45
47 /// Check if this core is interrupted 46 /// Check if this core is interrupted
48 bool IsInterrupted() const { 47 bool IsInterrupted() const;
49 return interrupt_handler.IsInterrupted();
50 }
51 48
52 // Shutdown this physical core. 49 // Shutdown this physical core.
53 void Shutdown(); 50 void Shutdown();
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index 61b8a396a..2b12c0dbf 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -658,7 +658,7 @@ void Scheduler::Reload() {
658 cpu_core.LoadContext(thread->GetContext64()); 658 cpu_core.LoadContext(thread->GetContext64());
659 cpu_core.SetTlsAddress(thread->GetTLSAddress()); 659 cpu_core.SetTlsAddress(thread->GetTLSAddress());
660 cpu_core.SetTPIDR_EL0(thread->GetTPIDR_EL0()); 660 cpu_core.SetTPIDR_EL0(thread->GetTPIDR_EL0());
661 cpu_core.ChangeProcessorId(this->core_id); 661 cpu_core.ChangeProcessorID(this->core_id);
662 cpu_core.ClearExclusiveState(); 662 cpu_core.ClearExclusiveState();
663 } 663 }
664 } 664 }
@@ -691,7 +691,7 @@ void Scheduler::SwitchContextStep2() {
691 cpu_core.LoadContext(new_thread->GetContext64()); 691 cpu_core.LoadContext(new_thread->GetContext64());
692 cpu_core.SetTlsAddress(new_thread->GetTLSAddress()); 692 cpu_core.SetTlsAddress(new_thread->GetTLSAddress());
693 cpu_core.SetTPIDR_EL0(new_thread->GetTPIDR_EL0()); 693 cpu_core.SetTPIDR_EL0(new_thread->GetTPIDR_EL0());
694 cpu_core.ChangeProcessorId(this->core_id); 694 cpu_core.ChangeProcessorID(this->core_id);
695 cpu_core.ClearExclusiveState(); 695 cpu_core.ClearExclusiveState();
696 } 696 }
697 } 697 }
diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h
index 348107160..b3b4b5169 100644
--- a/src/core/hle/kernel/scheduler.h
+++ b/src/core/hle/kernel/scheduler.h
@@ -240,6 +240,10 @@ public:
240 return switch_fiber; 240 return switch_fiber;
241 } 241 }
242 242
243 const std::shared_ptr<Common::Fiber>& ControlContext() const {
244 return switch_fiber;
245 }
246
243private: 247private:
244 friend class GlobalScheduler; 248 friend class GlobalScheduler;
245 249