From ea6c1193fbfa95e586bb6d129dc684163a12cb3e Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Thu, 29 Oct 2026 03:39:29 -0400 Subject: Revert "Import experimental NS2 support and accumulated GPU fixes" This reverts commit 535b676970. The Switch 2 support comes from the nx2 work instead, merged next. --- src/core/hle/kernel/svc/svc_thread.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/core/hle/kernel/svc/svc_thread.cpp') diff --git a/src/core/hle/kernel/svc/svc_thread.cpp b/src/core/hle/kernel/svc/svc_thread.cpp index b4eb0b5719..dbca13dd26 100644 --- a/src/core/hle/kernel/svc/svc_thread.cpp +++ b/src/core/hle/kernel/svc/svc_thread.cpp @@ -16,11 +16,8 @@ namespace Kernel::Svc { namespace { -bool IsValidVirtualCoreId(const KProcess& process, int32_t core_id) { - // Extended processes use the kernel's existing virtual-core mapping. - const auto core_count = process.UsesPAuthReturns() ? Core::Hardware::NumVirtualCores - : Core::Hardware::NUM_CPU_CORES; - return 0 <= core_id && core_id < static_cast(core_count); +constexpr bool IsValidVirtualCoreId(int32_t core_id) { + return (0 <= core_id && core_id < static_cast(Core::Hardware::NUM_CPU_CORES)); } } // Anonymous namespace @@ -41,7 +38,7 @@ Result CreateThread(Core::System& system, Handle* out_handle, u64 entry_point, u } // Validate arguments. - R_UNLESS(IsValidVirtualCoreId(process, core_id), ResultInvalidCoreId); + R_UNLESS(IsValidVirtualCoreId(core_id), ResultInvalidCoreId); R_UNLESS(((1ull << core_id) & process.GetCoreMask()) != 0, ResultInvalidCoreId); R_UNLESS(HighestThreadPriority <= priority && priority <= LowestThreadPriority, @@ -265,7 +262,7 @@ Result SetThreadCoreMask(Core::System& system, Handle thread_handle, s32 core_id R_UNLESS(affinity_mask != 0, ResultInvalidCombination); // Validate the core id. - if (IsValidVirtualCoreId(GetCurrentProcess(system.Kernel()), core_id)) { + if (IsValidVirtualCoreId(core_id)) { R_UNLESS(((1ULL << core_id) & affinity_mask) != 0, ResultInvalidCombination); } else { R_UNLESS(core_id == IdealCoreNoUpdate || core_id == IdealCoreDontCare, -- cgit v1.2.3