From patchwork Wed Apr 20 13:44:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 12820263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F1D9C433EF for ; Wed, 20 Apr 2022 13:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378962AbiDTNrQ (ORCPT ); Wed, 20 Apr 2022 09:47:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344322AbiDTNrI (ORCPT ); Wed, 20 Apr 2022 09:47:08 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48A243EF13; Wed, 20 Apr 2022 06:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650462262; x=1681998262; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qot943n4yvRPLIoDlpzQEY0XOrplScM5A1KZYGJHyNU=; b=K+39WCcG3GLvgkFxgjNkYXxFux7XAc6Xg9BK0pvYufaymRsoyqYIsRD8 OVst0wlLYM+GI1OItU8vNR3Hae3EygeymlYUH/8tnTU+hl1Ea2VFhcfuV ydX8CmLqFVJ+ooiCinRz5rJoRmOhEd0dtd+47IurUN17JMKZi0Wt5EB0q qcZ7KTgOYo7S/Oprb7y3NlfzpBOAuTVXDwLjOtoYKmaW5cP7y82AivBtn +N1hB+cEE439TTwH/s9cJaBkhrhO4+NPvZUdYN6KK6q/BiETxsxF74Khf u3P2OEbtpWTza69dSu2yT+gIo3QirLpqHDoQThphSfU4U1IqHidMZ/7qo g==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="251333930" X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="251333930" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 06:44:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="529754188" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.51]) by orsmga006.jf.intel.com with SMTP; 20 Apr 2022 06:44:18 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 20 Apr 2022 16:44:17 +0300 From: Ville Syrjala To: linux-acpi@vger.kernel.org Cc: Len Brown , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , stable@vger.kernel.org, Woody Suwalski , Mario Limonciello , Richard Gong , "Rafael J . Wysocki" Subject: [PATCH 1/2] ACPI: processor: Do not use C3 w/o ARB_DIS=1 Date: Wed, 20 Apr 2022 16:44:16 +0300 Message-Id: <20220420134417.24546-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Ville Syrjälä commit d6b88ce2eb9d ("ACPI: processor idle: Allow playing dead in C3 state") was supposedly just trying to enable C3 when the CPU is offlined, but it also mistakenly enabled C3 usage without setting ARB_DIS=1 in normal idle scenarios. This results in a machine that won't boot past the point when it first enters C3. Restore the correct behaviour (either demote to C1/C2, or use C3 but also set ARB_DIS=1). I hit this on a Fujitsu Siemens Lifebook S6010 (P3) machine. Cc: stable@vger.kernel.org Cc: Woody Suwalski Cc: Mario Limonciello Cc: Richard Gong Cc: Rafael J. Wysocki Fixes: d6b88ce2eb9d ("ACPI: processor idle: Allow playing dead in C3 state") Signed-off-by: Ville Syrjälä --- drivers/acpi/processor_idle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 4556c86c3465..54f0a1915025 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -793,10 +793,10 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr) state->flags = 0; if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 || - cx->type == ACPI_STATE_C3) { + cx->type == ACPI_STATE_C3) state->enter_dead = acpi_idle_play_dead; + if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2) drv->safe_state_index = count; - } /* * Halt-induced C1 is not good for ->enter_s2idle, because it * re-enables interrupts on exit. Moreover, C1 is generally not