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: 568085 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 9107EC433EF for ; Thu, 21 Apr 2022 13:36:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245153AbiDUNj3 (ORCPT ); Thu, 21 Apr 2022 09:39:29 -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: stable@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 From patchwork Wed Apr 20 13:44:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Syrjala X-Patchwork-Id: 564308 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 5A9B4C433FE for ; Wed, 20 Apr 2022 13:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344322AbiDTNrQ (ORCPT ); Wed, 20 Apr 2022 09:47:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378976AbiDTNrM (ORCPT ); Wed, 20 Apr 2022 09:47:12 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 052CE433A9; Wed, 20 Apr 2022 06:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650462266; x=1681998266; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3A9McpqYvzVOVGdOMs077O3UyzxI9ty+KcdEkff5rjc=; b=DSJNpqOI8yNkNND6S8IyVJhn9guO6R/zGOBB0wcNPSfp8uoJ4F22aL32 GgYVRIv2VrtVnsmb4TWMyULNU9eBsqZJtD25fK/+KhW5qylmL9fKKavr6 ufRnsmfNyYpvv7LpwG0I0D+eril69X8XbTLSD/IMwrkkTQMokhWov9DaK i0SVWy9zk/RKyudkoyeCu4Kp/7kccbyY4aNQUukY6fWZi739Lc24WEt9h V792q0d1lgmX7NzI1X0vF3B6DpOqcUjZiaYAVsZwVSbGfdC62cX2tgO24 dRlfBBS6PyWsTN7GR9PffCI0c2TQrhfkdrh/2R+GFexsKPu8RXNb0HV08 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="244610510" X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="244610510" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 06:44:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="593179130" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.51]) by orsmga001.jf.intel.com with SMTP; 20 Apr 2022 06:44:22 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 20 Apr 2022 16:44:22 +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 2/2] Revert "ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40" Date: Wed, 20 Apr 2022 16:44:17 +0300 Message-Id: <20220420134417.24546-2-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: stable@vger.kernel.org From: Ville Syrjälä This reverts commit bfe55a1f7fd6bfede16078bf04c6250fbca11588. This was presumably misdiagnosed as an inability to use C3 at all when I suspect the real problem is just misconfiguration of C3 vs. ARB_DIS. Cc: stable@vger.kernel.org Cc: Woody Suwalski Cc: Mario Limonciello Cc: Richard Gong Cc: Rafael J. Wysocki Signed-off-by: Ville Syrjälä --- drivers/acpi/processor_idle.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 54f0a1915025..d4632b8adbc5 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -96,11 +96,6 @@ static const struct dmi_system_id processor_power_dmi_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")}, (void *)1}, - /* T40 can not handle C3 idle state */ - { set_max_cstate, "IBM ThinkPad T40", { - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), - DMI_MATCH(DMI_PRODUCT_NAME, "23737CU")}, - (void *)2}, {}, };