Message ID | 20230601221151.670-1-mario.limonciello@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp652739vqr; Thu, 1 Jun 2023 15:32:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ykAeEXraw80BLg0gVzoWDtCbkhcdgMYNUuAssu8nVTtUOeTTrTuoINjmED3Lu8f6fteBP X-Received: by 2002:a05:6a20:9f0f:b0:10c:49e:6c67 with SMTP id mk15-20020a056a209f0f00b0010c049e6c67mr7312909pzb.33.1685658777242; Thu, 01 Jun 2023 15:32:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685658777; cv=pass; d=google.com; s=arc-20160816; b=ubf+Eq+dsUrQsFcqFZckd/op/MzsBO80rGJtAR6PPZx9297VW2R6mdufSP2AdoKHpt 9154Zj754amgSJ1+XsaX1qLG2HjOrPbAqcu0fSZ5r8OUIFuBQljlNj6ZJql2vsQhgBGd +ASxzoMNryZEJPeXMX+CF4mljxUHQMSQotMRhpz2UdZMTt/+p8k0CsDQ23PDe5FyFVv7 0HStkeKsDzx68m3oMSi2uzAfp8qqGnUgQ8pjtLDZxFEmbz0phorAmvxXhRBpmq2P2Z9M jSAgTxiKAaoxb6s/QEGO6jOQ/m+9D2cswSggJna7145Id0vNaXeReU4EN5GS5jnKR1n9 K1dA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=A2uvnyadgmPv/UplCy3dfHolCS1iQD6or73uaLQ6l4c=; b=AeGmjuADt8vCJQduuh7zfsVxjTEo0dY4IMplS/3unihxBBYVjuTmUU/blL+stmBO/K WrSbTyHAZdoB47XfBhTUaeg1xYPKASmgRgVV+LMKYbewm++hI8Yg9YgbCWhCkqEAYjSF 9M/9m3E5bgne8a67o5ZV8O1SvgirNV/rdB/I5y5VYr4ie7gXEwZ9xOxipj+Ppv1KqH9a W+T2ip9+8ESQo1TsqPniWkDirOP5XZjYxzs8Qg6kRY0A8Av6zMEbyvMViXNxNG54NWJY n9T1x2KyECcykWcFupbB/DDwzv55/X5fzRljD8Kemv9Ij7T6hkZxXdNZJ3UJSxvg6IWO PzfQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=FCnTumqE; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w128-20020a626286000000b0063286f81d35si6050447pfb.262.2023.06.01.15.32.45; Thu, 01 Jun 2023 15:32:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=FCnTumqE; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232986AbjFAWM4 (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Thu, 1 Jun 2023 18:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbjFAWMt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Jun 2023 18:12:49 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2086.outbound.protection.outlook.com [40.107.94.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A49B18D; Thu, 1 Jun 2023 15:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=le5joztdBVSdCOJAz5HmViaDRK6E32+Or/3byNAPxGM+FTinmmiJ49yiCVWuxlQ39SiRPg5teq7Kb18rNj2qZK+3/rGW9domxzamtsPLDhLYUb3qfskCykUliPRvHQGFh3JXjbIweM87hW7dJBm92RruoPSW0ZEPbRMngOvHo//k1Mn2bfWOuBz589Q0qWc5bfVGq6CqVRBK+SlKAp82BaaZVFF624XqjBdTW1WYzI9QqzFs44f9z9YP1vctuFlrqgdD7hCqNuCNlXuf24b/4lFZNpF3KHpuL8Y2J1ON8ZQvOk65gotX5j1Drb7W92IKCr8ksQ8tTpx8kDqiins+VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A2uvnyadgmPv/UplCy3dfHolCS1iQD6or73uaLQ6l4c=; b=D+26heNBkij45LzY9LmCDJpChCTl1Spbb72ZwpMh2aHSu0RQb5VB8fcelqS5XClKjWoZFeruUMvROn++3Ll27sgIBytO0wjTXMhOWtZCFbs7QLM00QAs8Bm8BLqLCh7w2nlP2vglqZqLZz1zq/2gIvEmxk63+v9395RypU+Y+L0yTIH2waWbRzT0/E0zi6fqT0Crg1cneo5NtlOnTCIcm+k1wvogQFKwW20clU6EVVXd1RNblevBEL0qZ5zFD4xY+LPFHrVXtdxEM+p36D9XVcweaXLeXsEKuMJ+8U5Y+YML9F+hc4o8kMw24CIytukQ/trnkn3fYZOlaSNkTtmbyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A2uvnyadgmPv/UplCy3dfHolCS1iQD6or73uaLQ6l4c=; b=FCnTumqEKrTMqujE4Yag4djkJbe/HKrn6pna/auerDlmYd1yZXCOTFEOdPHSp/W68wK93xKc5Bwt1t8GnXkjaAsXAJPk1rbe93KdfMQMyLfl4vCru9fT+ZYkCVibHywenGj+3dur+U/N8LC8i/q+LQqnDjeTOi1RUdFKUBySuW8= Received: from MW4P222CA0009.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::14) by PH0PR12MB8006.namprd12.prod.outlook.com (2603:10b6:510:28d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Thu, 1 Jun 2023 22:12:41 +0000 Received: from CO1NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:303:114:cafe::69) by MW4P222CA0009.outlook.office365.com (2603:10b6:303:114::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Thu, 1 Jun 2023 22:12:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT019.mail.protection.outlook.com (10.13.175.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Thu, 1 Jun 2023 22:12:41 +0000 Received: from SITE-L-T34-2.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 1 Jun 2023 17:12:40 -0500 From: Mario Limonciello <mario.limonciello@amd.com> To: <linux-acpi@vger.kernel.org>, <rafael@kernel.org> CC: <linux-kernel@vger.kernel.org>, Mario Limonciello <mario.limonciello@amd.com>, <ofenfisch@googlemail.com>, <wse@tuxedocomputers.com>, <adam.niederer@gmail.com>, <adrian@freund.io>, <jirislaby@kernel.org>, <Renjith.Pananchikkal@amd.com>, <anson.tsao@amd.com>, <Richard.Gong@amd.com>, Chuanhong Guo <gch981213@gmail.com>, <evilsnoo@proton.me>, <ruinairas1992@gmail.com>, <nmschulte@gmail.com> Subject: [PATCH v3] ACPI: resource: Remove "Zen" specific match and quirks Date: Thu, 1 Jun 2023 17:11:51 -0500 Message-ID: <20230601221151.670-1-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT019:EE_|PH0PR12MB8006:EE_ X-MS-Office365-Filtering-Correlation-Id: e3dd9812-acf7-4f12-2c4a-08db62ed516b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: phR9WnBwNhSLKCkV3U9b+6BrCSwl2/Wp/+loX/lEmHgnAeqQe3WK0EUzdHuzdllcLYS+d9OXaogEM5ohtsIiBSA66jfer8ILD346bixuCPIXjXGlbjgqHV5nupkW/KlPw6OE5jMihR3D/AIfY6uy20MjMg9+JW1uxBDLhGdcm8nLVQ0chGTwHoa2tWq9qWOhq6lzRjRbgIoWGnOd1hYuZ2WJGFFY3+8ROif7BwHL0zvCa/2lmwzEarx1QxFl/hlhX8B43tTciwIGRK4+XN2RZXW7Gb3ykeR42xAlsgOPpfoWM19Q+ylTPNb6gtAS9IJ0uOgVTYjzUsVF5DeIHe8/zJobECPYTfecVaAdcC7reLS48BOr967NS8VD1fhRqKQGhjhVpPrYUcNLXJYZHBsSRoYbLxUpYGKpVkXxgYj5scXF0MEkXW7dJekBCeNOSsLdtelS7I+DsdHpE1AFgs2RnCLZVC6ZQhhguxcwk6dPdf6u9w6UsoJyPLmOrmHsUR0RbLtmHYjhGPjIzTkaLLpFh6/ZZYWxOk3pn8UH/Ax6Avu5klZkZze/Dt6NUlHwrT34oY/2+86CNQ1IYhK3IQ3NVw0MuOzJREXzNxSnWV7uNtjoGcL+94gHDKw1Q6phaL2AbgxRX4YSCApYTXoSmcHFx7eKHUebWw6NYPSzEBenSUn5M9KLz+Ai00en0R/qztgy1U2ZQ3fc0WyVNS4hv+HUWGttujY4QmDYxVaSHAFzkUzoEONdB8useQnNwYJHEAT/y4a6IzGzNo/VbOCcy/ZsqhLVS3lYv49zvkjhqeLaRA0= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(136003)(346002)(396003)(451199021)(40470700004)(46966006)(36840700001)(36756003)(82740400003)(86362001)(110136005)(4326008)(478600001)(316002)(54906003)(70206006)(966005)(70586007)(7416002)(44832011)(6666004)(83380400001)(41300700001)(2906002)(8676002)(40480700001)(82310400005)(7696005)(81166007)(2616005)(356005)(5660300002)(36860700001)(47076005)(426003)(26005)(336012)(1076003)(16526019)(8936002)(186003)(40460700003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 22:12:41.4400 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3dd9812-acf7-4f12-2c4a-08db62ed516b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8006 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767541337982644079?= X-GMAIL-MSGID: =?utf-8?q?1767541337982644079?= |
Series |
[v3] ACPI: resource: Remove "Zen" specific match and quirks
|
|
Commit Message
Mario Limonciello
June 1, 2023, 10:11 p.m. UTC
commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on
AMD Zen platforms") attempted to overhaul the override logic so it
didn't apply on X86 AMD Zen systems. This was intentional so that
systems would prefer DSDT values instead of default MADT value for
IRQ 1 on Ryzen 6000 systems which typically uses ActiveLow for IRQ1.
This turned out to be a bad assumption because several vendors
add Interrupt Source Override but don't fix the DSDT. A pile of
quirks was collecting that proved this wasn't sustaintable.
Furthermore some vendors have used ActiveHigh for IRQ1.
To solve this problem revert the following commits:
* commit 17bb7046e7ce ("ACPI: resource: Do IRQ override on all TongFang
GMxRGxx")
* commit f3cb9b740869 ("ACPI: resource: do IRQ override on Lenovo 14ALC7")
* commit bfcdf58380b1 ("ACPI: resource: do IRQ override on LENOVO IdeaPad")
* commit 7592b79ba4a9 ("ACPI: resource: do IRQ override on XMG Core 15")
* commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen
platforms")
Cc: ofenfisch@googlemail.com
Cc: wse@tuxedocomputers.com
Cc: adam.niederer@gmail.com
Cc: adrian@freund.io
Cc: jirislaby@kernel.org
Cc: Renjith.Pananchikkal@amd.com
Cc: anson.tsao@amd.com
Cc: Richard.Gong@amd.com
Cc: Chuanhong Guo <gch981213@gmail.com>
Reported-by: evilsnoo@proton.me
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217394
Reported-by: ruinairas1992@gmail.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217406
Reported-by: nmschulte@gmail.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v2->v3:
* Adjust to drop heuristics entirely
* Drop tested tags
* Add more links and people to Cc
* Drop Fixes tag as this got a lot more risky
v1->v2:
* Rebase on 71a485624c4c ("ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P")
* Pick up tag
Rafael,
Please hold off on picking this up until the majority of those on CC
have tested it on hardware they have and reported results.
Everyone else,
Please test. If you have problems with this applied, please share
an acpidump and dmesg either on a bug or to me privately.
---
drivers/acpi/resource.c | 60 -----------------------------------------
1 file changed, 60 deletions(-)
Comments
Works for TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD Tested-by: Werner Sembach <wse@tuxedocomputers.com> Am 02.06.23 um 00:11 schrieb Mario Limonciello: > commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on > AMD Zen platforms") attempted to overhaul the override logic so it > didn't apply on X86 AMD Zen systems. This was intentional so that > systems would prefer DSDT values instead of default MADT value for > IRQ 1 on Ryzen 6000 systems which typically uses ActiveLow for IRQ1. > > This turned out to be a bad assumption because several vendors > add Interrupt Source Override but don't fix the DSDT. A pile of > quirks was collecting that proved this wasn't sustaintable. > > Furthermore some vendors have used ActiveHigh for IRQ1. > To solve this problem revert the following commits: > * commit 17bb7046e7ce ("ACPI: resource: Do IRQ override on all TongFang > GMxRGxx") > * commit f3cb9b740869 ("ACPI: resource: do IRQ override on Lenovo 14ALC7") > * commit bfcdf58380b1 ("ACPI: resource: do IRQ override on LENOVO IdeaPad") > * commit 7592b79ba4a9 ("ACPI: resource: do IRQ override on XMG Core 15") > * commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen > platforms") > > Cc: ofenfisch@googlemail.com > Cc: wse@tuxedocomputers.com > Cc: adam.niederer@gmail.com > Cc: adrian@freund.io > Cc: jirislaby@kernel.org > Cc: Renjith.Pananchikkal@amd.com > Cc: anson.tsao@amd.com > Cc: Richard.Gong@amd.com > Cc: Chuanhong Guo <gch981213@gmail.com> > Reported-by: evilsnoo@proton.me > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217394 > Reported-by: ruinairas1992@gmail.com > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217406 > Reported-by: nmschulte@gmail.com > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336 > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> > --- > v2->v3: > * Adjust to drop heuristics entirely > * Drop tested tags > * Add more links and people to Cc > * Drop Fixes tag as this got a lot more risky > v1->v2: > * Rebase on 71a485624c4c ("ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P") > * Pick up tag > > Rafael, > Please hold off on picking this up until the majority of those on CC > have tested it on hardware they have and reported results. > > Everyone else, > Please test. If you have problems with this applied, please share > an acpidump and dmesg either on a bug or to me privately. > --- > drivers/acpi/resource.c | 60 ----------------------------------------- > 1 file changed, 60 deletions(-) > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c > index 0800a9d77558..1dd8d5aebf67 100644 > --- a/drivers/acpi/resource.c > +++ b/drivers/acpi/resource.c > @@ -470,52 +470,6 @@ static const struct dmi_system_id asus_laptop[] = { > { } > }; > > -static const struct dmi_system_id lenovo_laptop[] = { > - { > - .ident = "LENOVO IdeaPad Flex 5 14ALC7", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > - DMI_MATCH(DMI_PRODUCT_NAME, "82R9"), > - }, > - }, > - { > - .ident = "LENOVO IdeaPad Flex 5 16ALC7", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > - DMI_MATCH(DMI_PRODUCT_NAME, "82RA"), > - }, > - }, > - { } > -}; > - > -static const struct dmi_system_id tongfang_gm_rg[] = { > - { > - .ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD", > - .matches = { > - DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), > - }, > - }, > - { } > -}; > - > -static const struct dmi_system_id maingear_laptop[] = { > - { > - .ident = "MAINGEAR Vector Pro 2 15", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), > - DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-15A3070T"), > - } > - }, > - { > - .ident = "MAINGEAR Vector Pro 2 17", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), > - DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"), > - }, > - }, > - { } > -}; > - > static const struct dmi_system_id lg_laptop[] = { > { > .ident = "LG Electronics 17U70P", > @@ -539,10 +493,6 @@ struct irq_override_cmp { > static const struct irq_override_cmp override_table[] = { > { medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, > { asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, > - { lenovo_laptop, 6, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true }, > - { lenovo_laptop, 10, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true }, > - { tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, > - { maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, > { lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, > }; > > @@ -562,16 +512,6 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity, > return entry->override; > } > > -#ifdef CONFIG_X86 > - /* > - * IRQ override isn't needed on modern AMD Zen systems and > - * this override breaks active low IRQs on AMD Ryzen 6000 and > - * newer systems. Skip it. > - */ > - if (boot_cpu_has(X86_FEATURE_ZEN)) > - return false; > -#endif > - > return true; > } >
This seems to work as well for the ASUS TUF Gaming A16 Advantage Edition FA617XT; both Linux 6.3 and 6.4. Disabling the ITE5570 EC [I/O] is required for a "truly" functional experience, of course. On Thu, Jun 1, 2023 at 5:12 PM Mario Limonciello <mario.limonciello@amd.com> wrote: > > commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on > AMD Zen platforms") attempted to overhaul the override logic so it > didn't apply on X86 AMD Zen systems. This was intentional so that > systems would prefer DSDT values instead of default MADT value for > IRQ 1 on Ryzen 6000 systems which typically uses ActiveLow for IRQ1. > > This turned out to be a bad assumption because several vendors > add Interrupt Source Override but don't fix the DSDT. A pile of > quirks was collecting that proved this wasn't sustaintable. > > Furthermore some vendors have used ActiveHigh for IRQ1. > To solve this problem revert the following commits: > * commit 17bb7046e7ce ("ACPI: resource: Do IRQ override on all TongFang > GMxRGxx") > * commit f3cb9b740869 ("ACPI: resource: do IRQ override on Lenovo 14ALC7") > * commit bfcdf58380b1 ("ACPI: resource: do IRQ override on LENOVO IdeaPad") > * commit 7592b79ba4a9 ("ACPI: resource: do IRQ override on XMG Core 15") > * commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen > platforms") > > Cc: ofenfisch@googlemail.com > Cc: wse@tuxedocomputers.com > Cc: adam.niederer@gmail.com > Cc: adrian@freund.io > Cc: jirislaby@kernel.org > Cc: Renjith.Pananchikkal@amd.com > Cc: anson.tsao@amd.com > Cc: Richard.Gong@amd.com > Cc: Chuanhong Guo <gch981213@gmail.com> > Reported-by: evilsnoo@proton.me > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217394 > Reported-by: ruinairas1992@gmail.com > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217406 > Reported-by: nmschulte@gmail.com > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336 > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> > --- > v2->v3: > * Adjust to drop heuristics entirely > * Drop tested tags > * Add more links and people to Cc > * Drop Fixes tag as this got a lot more risky > v1->v2: > * Rebase on 71a485624c4c ("ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P") > * Pick up tag > > Rafael, > Please hold off on picking this up until the majority of those on CC > have tested it on hardware they have and reported results. > > Everyone else, > Please test. If you have problems with this applied, please share > an acpidump and dmesg either on a bug or to me privately. > --- > drivers/acpi/resource.c | 60 ----------------------------------------- > 1 file changed, 60 deletions(-) > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c > index 0800a9d77558..1dd8d5aebf67 100644 > --- a/drivers/acpi/resource.c > +++ b/drivers/acpi/resource.c > @@ -470,52 +470,6 @@ static const struct dmi_system_id asus_laptop[] = { > { } > }; > > -static const struct dmi_system_id lenovo_laptop[] = { > - { > - .ident = "LENOVO IdeaPad Flex 5 14ALC7", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > - DMI_MATCH(DMI_PRODUCT_NAME, "82R9"), > - }, > - }, > - { > - .ident = "LENOVO IdeaPad Flex 5 16ALC7", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > - DMI_MATCH(DMI_PRODUCT_NAME, "82RA"), > - }, > - }, > - { } > -}; > - > -static const struct dmi_system_id tongfang_gm_rg[] = { > - { > - .ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD", > - .matches = { > - DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), > - }, > - }, > - { } > -}; > - > -static const struct dmi_system_id maingear_laptop[] = { > - { > - .ident = "MAINGEAR Vector Pro 2 15", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), > - DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-15A3070T"), > - } > - }, > - { > - .ident = "MAINGEAR Vector Pro 2 17", > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), > - DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"), > - }, > - }, > - { } > -}; > - > static const struct dmi_system_id lg_laptop[] = { > { > .ident = "LG Electronics 17U70P", > @@ -539,10 +493,6 @@ struct irq_override_cmp { > static const struct irq_override_cmp override_table[] = { > { medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, > { asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, > - { lenovo_laptop, 6, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true }, > - { lenovo_laptop, 10, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true }, > - { tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, > - { maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, > { lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, > }; > > @@ -562,16 +512,6 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity, > return entry->override; > } > > -#ifdef CONFIG_X86 > - /* > - * IRQ override isn't needed on modern AMD Zen systems and > - * this override breaks active low IRQs on AMD Ryzen 6000 and > - * newer systems. Skip it. > - */ > - if (boot_cpu_has(X86_FEATURE_ZEN)) > - return false; > -#endif > - > return true; > } > > -- > 2.34.1 >
Hi! On Fri, Jun 2, 2023 at 6:12 AM Mario Limonciello <mario.limonciello@amd.com> wrote: > > commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on > AMD Zen platforms") attempted to overhaul the override logic so it > didn't apply on X86 AMD Zen systems. This was intentional so that > systems would prefer DSDT values instead of default MADT value for > IRQ 1 on Ryzen 6000 systems which typically uses ActiveLow for IRQ1. > > This turned out to be a bad assumption because several vendors > add Interrupt Source Override but don't fix the DSDT. A pile of > quirks was collecting that proved this wasn't sustaintable. > > Furthermore some vendors have used ActiveHigh for IRQ1. > To solve this problem revert the following commits: > * commit 17bb7046e7ce ("ACPI: resource: Do IRQ override on all TongFang > GMxRGxx") > * commit f3cb9b740869 ("ACPI: resource: do IRQ override on Lenovo 14ALC7") > * commit bfcdf58380b1 ("ACPI: resource: do IRQ override on LENOVO IdeaPad") > * commit 7592b79ba4a9 ("ACPI: resource: do IRQ override on XMG Core 15") > * commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen > platforms") > > Cc: ofenfisch@googlemail.com > Cc: wse@tuxedocomputers.com > Cc: adam.niederer@gmail.com > Cc: adrian@freund.io > Cc: jirislaby@kernel.org > Cc: Renjith.Pananchikkal@amd.com > Cc: anson.tsao@amd.com > Cc: Richard.Gong@amd.com > Cc: Chuanhong Guo <gch981213@gmail.com> > Reported-by: evilsnoo@proton.me > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217394 > Reported-by: ruinairas1992@gmail.com > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217406 > Reported-by: nmschulte@gmail.com > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336 > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> > --- > v2->v3: > * Adjust to drop heuristics entirely > * Drop tested tags > * Add more links and people to Cc > * Drop Fixes tag as this got a lot more risky > v1->v2: > * Rebase on 71a485624c4c ("ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P") > * Pick up tag > > Rafael, > Please hold off on picking this up until the majority of those on CC > have tested it on hardware they have and reported results. > > Everyone else, > Please test. If you have problems with this applied, please share > an acpidump and dmesg either on a bug or to me privately. I was expecting this patch to break my keyboard again but that didn't happen. I'm on the latest UEFI from Lenovo. By dumping ACPI APIC I found that there's this: [0C4h 0196 1] Subtable Type : 02 [Interrupt Source Override] [0C5h 0197 1] Length : 0A [0C6h 0198 1] Bus : 00 [0C7h 0199 1] Source : 01 [0C8h 0200 4] Interrupt : 00000001 [0CCh 0204 2] Flags (decoded below) : 0007 Polarity : 3 Trigger Mode : 1 I don't have a dump of the ACPI table from older UEFIs anymore. Tested on Lenovo Thinkbook 14G4+ ARA with the latest UEFI (J6CN45WW). Tested-by: Chuanhong Guo <gch981213@gmail.com>
On 6/3/2023 5:19 AM, Chuanhong Guo wrote: > Hi! > > On Fri, Jun 2, 2023 at 6:12 AM Mario Limonciello > <mario.limonciello@amd.com> wrote: >> commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on >> AMD Zen platforms") attempted to overhaul the override logic so it >> didn't apply on X86 AMD Zen systems. This was intentional so that >> systems would prefer DSDT values instead of default MADT value for >> IRQ 1 on Ryzen 6000 systems which typically uses ActiveLow for IRQ1. >> >> This turned out to be a bad assumption because several vendors >> add Interrupt Source Override but don't fix the DSDT. A pile of >> quirks was collecting that proved this wasn't sustaintable. >> >> Furthermore some vendors have used ActiveHigh for IRQ1. >> To solve this problem revert the following commits: >> * commit 17bb7046e7ce ("ACPI: resource: Do IRQ override on all TongFang >> GMxRGxx") >> * commit f3cb9b740869 ("ACPI: resource: do IRQ override on Lenovo 14ALC7") >> * commit bfcdf58380b1 ("ACPI: resource: do IRQ override on LENOVO IdeaPad") >> * commit 7592b79ba4a9 ("ACPI: resource: do IRQ override on XMG Core 15") >> * commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen >> platforms") >> >> Cc: ofenfisch@googlemail.com >> Cc: wse@tuxedocomputers.com >> Cc: adam.niederer@gmail.com >> Cc: adrian@freund.io >> Cc: jirislaby@kernel.org >> Cc: Renjith.Pananchikkal@amd.com >> Cc: anson.tsao@amd.com >> Cc: Richard.Gong@amd.com >> Cc: Chuanhong Guo <gch981213@gmail.com> >> Reported-by: evilsnoo@proton.me >> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217394 >> Reported-by: ruinairas1992@gmail.com >> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217406 >> Reported-by: nmschulte@gmail.com >> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336 >> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> >> --- >> v2->v3: >> * Adjust to drop heuristics entirely >> * Drop tested tags >> * Add more links and people to Cc >> * Drop Fixes tag as this got a lot more risky >> v1->v2: >> * Rebase on 71a485624c4c ("ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P") >> * Pick up tag >> >> Rafael, >> Please hold off on picking this up until the majority of those on CC >> have tested it on hardware they have and reported results. >> >> Everyone else, >> Please test. If you have problems with this applied, please share >> an acpidump and dmesg either on a bug or to me privately. > I was expecting this patch to break my keyboard again but > that didn't happen. I'm on the latest UEFI from Lenovo. > By dumping ACPI APIC I found that there's this: > > [0C4h 0196 1] Subtable Type : 02 [Interrupt Source Override] > [0C5h 0197 1] Length : 0A > [0C6h 0198 1] Bus : 00 > [0C7h 0199 1] Source : 01 > [0C8h 0200 4] Interrupt : 00000001 > [0CCh 0204 2] Flags (decoded below) : 0007 > Polarity : 3 > Trigger Mode : 1 > > I don't have a dump of the ACPI table from older UEFIs anymore. > > Tested on Lenovo Thinkbook 14G4+ ARA with the latest > UEFI (J6CN45WW). > > Tested-by: Chuanhong Guo <gch981213@gmail.com> Thanks! Yours is the one I was most worried about.
On Mon, Jun 5, 2023 at 4:46 PM Limonciello, Mario <mario.limonciello@amd.com> wrote: > > > On 6/3/2023 5:19 AM, Chuanhong Guo wrote: > > Hi! > > > > On Fri, Jun 2, 2023 at 6:12 AM Mario Limonciello > > <mario.limonciello@amd.com> wrote: > >> commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on > >> AMD Zen platforms") attempted to overhaul the override logic so it > >> didn't apply on X86 AMD Zen systems. This was intentional so that > >> systems would prefer DSDT values instead of default MADT value for > >> IRQ 1 on Ryzen 6000 systems which typically uses ActiveLow for IRQ1. > >> > >> This turned out to be a bad assumption because several vendors > >> add Interrupt Source Override but don't fix the DSDT. A pile of > >> quirks was collecting that proved this wasn't sustaintable. > >> > >> Furthermore some vendors have used ActiveHigh for IRQ1. > >> To solve this problem revert the following commits: > >> * commit 17bb7046e7ce ("ACPI: resource: Do IRQ override on all TongFang > >> GMxRGxx") > >> * commit f3cb9b740869 ("ACPI: resource: do IRQ override on Lenovo 14ALC7") > >> * commit bfcdf58380b1 ("ACPI: resource: do IRQ override on LENOVO IdeaPad") > >> * commit 7592b79ba4a9 ("ACPI: resource: do IRQ override on XMG Core 15") > >> * commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen > >> platforms") > >> > >> Cc: ofenfisch@googlemail.com > >> Cc: wse@tuxedocomputers.com > >> Cc: adam.niederer@gmail.com > >> Cc: adrian@freund.io > >> Cc: jirislaby@kernel.org > >> Cc: Renjith.Pananchikkal@amd.com > >> Cc: anson.tsao@amd.com > >> Cc: Richard.Gong@amd.com > >> Cc: Chuanhong Guo <gch981213@gmail.com> > >> Reported-by: evilsnoo@proton.me > >> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217394 > >> Reported-by: ruinairas1992@gmail.com > >> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217406 > >> Reported-by: nmschulte@gmail.com > >> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217336 > >> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> > >> --- > >> v2->v3: > >> * Adjust to drop heuristics entirely > >> * Drop tested tags > >> * Add more links and people to Cc > >> * Drop Fixes tag as this got a lot more risky > >> v1->v2: > >> * Rebase on 71a485624c4c ("ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P") > >> * Pick up tag > >> > >> Rafael, > >> Please hold off on picking this up until the majority of those on CC > >> have tested it on hardware they have and reported results. > >> > >> Everyone else, > >> Please test. If you have problems with this applied, please share > >> an acpidump and dmesg either on a bug or to me privately. > > I was expecting this patch to break my keyboard again but > > that didn't happen. I'm on the latest UEFI from Lenovo. > > By dumping ACPI APIC I found that there's this: > > > > [0C4h 0196 1] Subtable Type : 02 [Interrupt Source Override] > > [0C5h 0197 1] Length : 0A > > [0C6h 0198 1] Bus : 00 > > [0C7h 0199 1] Source : 01 > > [0C8h 0200 4] Interrupt : 00000001 > > [0CCh 0204 2] Flags (decoded below) : 0007 > > Polarity : 3 > > Trigger Mode : 1 > > > > I don't have a dump of the ACPI table from older UEFIs anymore. > > > > Tested on Lenovo Thinkbook 14G4+ ARA with the latest > > UEFI (J6CN45WW). > > > > Tested-by: Chuanhong Guo <gch981213@gmail.com> > Thanks! Yours is the one I was most worried about. I've applied the patch as 6.5 material, thanks!
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 0800a9d77558..1dd8d5aebf67 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -470,52 +470,6 @@ static const struct dmi_system_id asus_laptop[] = { { } }; -static const struct dmi_system_id lenovo_laptop[] = { - { - .ident = "LENOVO IdeaPad Flex 5 14ALC7", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_NAME, "82R9"), - }, - }, - { - .ident = "LENOVO IdeaPad Flex 5 16ALC7", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_NAME, "82RA"), - }, - }, - { } -}; - -static const struct dmi_system_id tongfang_gm_rg[] = { - { - .ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD", - .matches = { - DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), - }, - }, - { } -}; - -static const struct dmi_system_id maingear_laptop[] = { - { - .ident = "MAINGEAR Vector Pro 2 15", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), - DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-15A3070T"), - } - }, - { - .ident = "MAINGEAR Vector Pro 2 17", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), - DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"), - }, - }, - { } -}; - static const struct dmi_system_id lg_laptop[] = { { .ident = "LG Electronics 17U70P", @@ -539,10 +493,6 @@ struct irq_override_cmp { static const struct irq_override_cmp override_table[] = { { medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, { asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, - { lenovo_laptop, 6, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true }, - { lenovo_laptop, 10, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true }, - { tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, - { maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, { lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, }; @@ -562,16 +512,6 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity, return entry->override; } -#ifdef CONFIG_X86 - /* - * IRQ override isn't needed on modern AMD Zen systems and - * this override breaks active low IRQs on AMD Ryzen 6000 and - * newer systems. Skip it. - */ - if (boot_cpu_has(X86_FEATURE_ZEN)) - return false; -#endif - return true; }