From patchwork Thu Apr 21 13:36:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Syrjala X-Patchwork-Id: 564460 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 62860C433F5 for ; Thu, 21 Apr 2022 13:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380032AbiDUNja (ORCPT ); Thu, 21 Apr 2022 09:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386507AbiDUNj3 (ORCPT ); Thu, 21 Apr 2022 09:39:29 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA7A436E38; Thu, 21 Apr 2022 06:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650548198; x=1682084198; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/B25oKD+PgAmoCfxJa+Caby+0Cg4cB73dUY3O11qt8I=; b=QOmm9e7GbX4++1H7CYh6sANr0LdQGVtBJYjMpzvTzPCJTcxokLLa2QKW Pc4WPIdZDBIye9qZmTpDH1fv0tsvb+F+NJQNDUWOsPNadLU+hs/A+kopI ecAzDd+yT1z1GuyEwUqBaoLAkMtKeDK9QhkeviYyDrTAoZmdqpXMIesY4 oc7HyGvj+4e9q3hCgZarjDl7XxmyOENJwkWG947gQPhvN3fnUP3BW2xIq vREvoVIWrzx5Zzjtv6m5U+4xKXuoIqEg6808MGEOZnIqpGyab1kFGeqqj J9Zg0h3BfMpR22G7iqTb4XVGBRON4rj6Bpf4H6jQpq1RjdyCQa5hBMhI5 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="264119166" X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="264119166" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 06:36:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="562575947" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.51]) by fmsmga007.fm.intel.com with SMTP; 21 Apr 2022 06:36:35 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 21 Apr 2022 16:36:34 +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 v2 1/2] ACPI: processor: Do not use C3 w/o ARB_DIS=1 Date: Thu, 21 Apr 2022 16:36:34 +0300 Message-Id: <20220421133634.19489-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420134417.24546-1-ville.syrjala@linux.intel.com> References: <20220420134417.24546-1-ville.syrjala@linux.intel.com> 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ä --- v2: Paint it in a different color (Rafael) drivers/acpi/processor_idle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 4556c86c3465..5f296e099bce 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -795,7 +795,8 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr) if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 || cx->type == ACPI_STATE_C3) { state->enter_dead = acpi_idle_play_dead; - drv->safe_state_index = count; + if (cx->type != ACPI_STATE_C3) + drv->safe_state_index = count; } /* * Halt-induced C1 is not good for ->enter_s2idle, because it