blob: f6ea3d10c09ad95465341bd993970c234f8d5671 [file] [log] [blame]
From d53344b2e88bce55195245391326c83366b5e82e Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Fri, 6 Mar 2020 10:53:42 -0500
Subject: [PATCH] Revert "powerpc/vcpu: Assume dedicated processors as
non-preempt"
This reverts commit c2cf1ccb3cf5b10007984e958b2a07637b116d8c which is
commit 14c73bd344da60abaf7da3ea2e7733ddda35bbac upstream.
According to v5.4.x-stable it caused build issues with some kernel
configurations, so we do a similar revert here.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h
index 897f26f45b4f..a47f827bc5f1 100644
--- a/arch/powerpc/include/asm/spinlock.h
+++ b/arch/powerpc/include/asm/spinlock.h
@@ -36,12 +36,10 @@
#endif
#ifdef CONFIG_PPC_PSERIES
-DECLARE_STATIC_KEY_FALSE(shared_processor);
-
#define vcpu_is_preempted vcpu_is_preempted
static inline bool vcpu_is_preempted(int cpu)
{
- if (!static_branch_unlikely(&shared_processor))
+ if (!firmware_has_feature(FW_FEATURE_SPLPAR))
return false;
return !!(be32_to_cpu(lppaca_of(cpu).yield_count) & 1);
}
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index c0a87b1cee24..cc682759feae 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -71,9 +71,6 @@
#include "pseries.h"
#include "../../../../drivers/pci/pci.h"
-DEFINE_STATIC_KEY_FALSE(shared_processor);
-EXPORT_SYMBOL_GPL(shared_processor);
-
int CMO_PrPSP = -1;
int CMO_SecPSP = -1;
unsigned long CMO_PageSize = (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K);
@@ -783,10 +780,6 @@ static void __init pSeries_setup_arch(void)
if (firmware_has_feature(FW_FEATURE_LPAR)) {
vpa_init(boot_cpuid);
-
- if (lppaca_shared_proc(get_lppaca()))
- static_branch_enable(&shared_processor);
-
ppc_md.power_save = pseries_lpar_idle;
ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
#ifdef CONFIG_PCI_IOV
--
2.7.4