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: Ville Syrjala X-Patchwork-Id: 564053 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 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: 565361 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 4A433C4332F for ; Wed, 20 Apr 2022 13:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378974AbiDTNrQ (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: linux-acpi@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}, {}, };