Message ID | 20230427053338.16653-2-mario.limonciello@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp53753vqo; Wed, 26 Apr 2023 22:52:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CIJR3+eT0fPsbQ7vteVM9WWIoM5mDoedMFkFXzldUk4cbikhjFaugqVpib0T81R7asKGh X-Received: by 2002:a05:6a20:429e:b0:f5:b4a5:73b4 with SMTP id o30-20020a056a20429e00b000f5b4a573b4mr581288pzj.27.1682574738953; Wed, 26 Apr 2023 22:52:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682574738; cv=pass; d=google.com; s=arc-20160816; b=Buk0pdKs/YxSlEG4hGMCoVgeA5dOAWKEb/W/oGrEAx4yBf/Vbsc3bGD46USIUBbxea EqB4DUqB1X6+6vhd6PPp9sj60pdfH3+k0zFmNdZ9W2LieDQdaX+Z2Sn15/ECRwfqFu/0 1aWfeqOrai1NtlksDkBXhSZzjIyUAsoQrBi2MsPmt/lpFVuI6cdDl7MaxbOvoMgAPpME qI5wqT1eHr6lvwk0dM3YVJtXBPaP7mSVYwcGEUev7vlA7wB+12Kb27iJuUvSgXlf5baf eVb9d0GSMKLLphOrM86uxeDMHrQ9ykmV0UhdVisxyqUzuQcX8tlctS+HnDCB3KCqoICa jBrg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ddIU3m+Sm+uKTF7l8g1GkIxPn9oe6x3D0wp471Zgy/o=; b=PzK04OKy0sI65Kgotga8Dz1myukqjOHAlemDboRqC2Iv39cJjz1mQfVzGBM6Faqw55 KqBqZSk9GM+UN5h5qpNO85Bds3HwSkks6JpCLo0Ap2T75BWKnEW7+YAYqhmqvQk5iPvz a5XY/O00k1ks9Ifx/WoSVGRovvyPOorRjBzYbjALDP65YebQp213x8gvZhAfDIdv6n6S SBFWpkdZ7BfGfLM5fFnRD7BSWXjQl9O6/fpJZ2NU/dSQZTQ/VRtxXYHpbhinCzjZ13zp 1jBR3i+CBghSUwCvs1CjDF25M67Dl9jSM5bWpQhIXXPoKLKObOPwi3Q7C1PZL14vQ4VF hvDg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=xgkbIuny; 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 v20-20020a634654000000b005139e0d2b5csi12901194pgk.487.2023.04.26.22.52.05; Wed, 26 Apr 2023 22:52:18 -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=xgkbIuny; 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 S242841AbjD0FeC (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Thu, 27 Apr 2023 01:34:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242821AbjD0FeA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Apr 2023 01:34:00 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2045.outbound.protection.outlook.com [40.107.212.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B35A2D69; Wed, 26 Apr 2023 22:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D6vGhsZjjA7NzGtGU0pwSzIiRQcI795oYMwMPM+/c3bVhO8kOUkcqjSZqKpT0r2a4yhB9nrkpJXb2QCWCRuUfPkfpy9XJNeYJUN1j6e0XPwigPdHiD7oJjQx262GISpnMMx/zvyThlcRCM+Lr3CfTl9WjuKY2Gc39OZgSISBFWpMNFUKZR6uMNRGmZ4eFmyFblGaclxgc9tFPdI3gu46WfOQI+d5opVI2PWPHwNDyAQ9zuSsXL187cqojiRVk/EhPFBkc1XSXWYUawBTmFxz471QEBGX8XUgoNQaC1VMuJivEyAyWLTQrrkeaagbxD5grYdEqVOt6uYlXskOND0b8g== 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=ddIU3m+Sm+uKTF7l8g1GkIxPn9oe6x3D0wp471Zgy/o=; b=T0dmdGwCC2thHBnLZ3/8HTKM2b1CM7dljMBnb9XVp/lt1tUZPW1+HrmiTf/HtCCt8PCQ3KLb0J50NVat1OKvit6Lxb788aZMBm/5a/zbl5Kz2RvzsZAcii5HXHJArB51AD6W0RF6jXmQdjgHENeZmFk8hVbtn7UBavhylIsTiMn0VFm0nci8BVJX7oKo1v0WCtqU+8tz4QPBe5evCg7DsH6o/WkTqwp/v+2QbwXy5IptdCmiJl1mBse/ohXvMwIk3pI68Vg2LX0ljvo5sFxZuYcOZSvkVUeXoB54Fvto7W5KVUXzY9hGxr+ieCdoguBHFhwMk7TALFN2SeWY8wAk2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=google.com 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=ddIU3m+Sm+uKTF7l8g1GkIxPn9oe6x3D0wp471Zgy/o=; b=xgkbIunyPYzoUxYsBmIwTMAL6CHshByeDBWX+NWtGSZLbnErIN3WCUrq3YtYABFLnK2pLt/jTmQkY1laLAude4QMTnwtOOMxRz2oC0j7x9CuuxDkUU435ztGCkDCARZHedl2dkHtdjUXDS7rJ7VE6PQmXkCbK6j67UKPXBFqrOg= Received: from DS7PR03CA0267.namprd03.prod.outlook.com (2603:10b6:5:3b3::32) by MN6PR12MB8591.namprd12.prod.outlook.com (2603:10b6:208:471::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.22; Thu, 27 Apr 2023 05:33:56 +0000 Received: from DS1PEPF0000E644.namprd02.prod.outlook.com (2603:10b6:5:3b3:cafe::3d) by DS7PR03CA0267.outlook.office365.com (2603:10b6:5:3b3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.21 via Frontend Transport; Thu, 27 Apr 2023 05:33:56 +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 DS1PEPF0000E644.mail.protection.outlook.com (10.167.17.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6340.15 via Frontend Transport; Thu, 27 Apr 2023 05:33:56 +0000 Received: from AUS-LX-MLIMONCI.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, 27 Apr 2023 00:33:54 -0500 From: Mario Limonciello <mario.limonciello@amd.com> To: Bjorn Helgaas <bhelgaas@google.com>, Hans de Goede <hdegoede@redhat.com>, Shyam Sundar S K <Shyam-sundar.S-k@amd.com>, Sanket Goswami <Sanket.Goswami@amd.com> CC: Richard gong <richard.gong@amd.com>, Mario Limonciello <mario.limonciello@amd.com>, Thomas Gleixner <tglx@linutronix.de>, "Ingo Molnar" <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>, <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org> Subject: [PATCH 1/2] amd_nb: Add PCI ID for family 19h model 78h Date: Thu, 27 Apr 2023 00:33:36 -0500 Message-ID: <20230427053338.16653-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230427053338.16653-1-mario.limonciello@amd.com> References: <20230427053338.16653-1-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E644:EE_|MN6PR12MB8591:EE_ X-MS-Office365-Filtering-Correlation-Id: 1db783eb-415a-4d67-2550-08db46e0ff05 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7a0jCyqW3hvKIltE2tNrzwEsKKmnOzf/r51CD6pUqGtGNCrffxSbmIzdJiw1zluTI9FNeo6Rs7jnBQMHGWNuQ3rVwkNOcPsQFMkD7tKQabD7NbS/L7Q8owNUPUx8eR6345yHXRV6Lpyu6b/iViq+E51J1wn/NPIC03O7r391mtW5vtBUQ+44Wfqt9t3Zx6J5XAU5H+B3yNPxqL7rn4FitrTvTyL7Df7IOy0YfAX1BYvcSxZFmOqIwICVjpteYyoBCAvFKCtWL8FK0dOw5irgYKaNJHG2m932CXLnvQKo5ryU1/qqrcWUF1w8ObdDfCORsThgRSvzZAGPggUx3yW8Ge88MAi0D2tmb7ys/dO2l1vvxQiNI89oNE8m3kdvOUW/gUHCxVK+yeMEOcYfG+xGIv/pAXkJsuBRnCeR+Sn/0SkUZ+zrKakAQlldpTXsf1n7prdRYW/+7A6ITjI+oDC33UiGvoioL6yPR32UMKG5Ypqo+dAn9939r8NwiaXe+unOOzb5ChYm0MGIrEYh9gDcpYNLu/adNnuW9K6i2HI3YsMMlf1pf3HL83+ENrd9mLu2fAtqndUb/orkZKpOUnNrIdn6DzUwzS3rPZP0zRiCgz3F1IqJRWMruNz2xV8kfcEh6KYN2tQ8fbl0bZ6TEZd4KxrxiR2ioqjctXsLXdXdM0JWCr97lFcbioVl8jAGKGIfxQCIhLRGM8K/irBwPL6c8PQiuO/Sgs4S8JRA2/JohIs= 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)(346002)(376002)(39860400002)(396003)(136003)(451199021)(46966006)(36840700001)(40470700004)(47076005)(336012)(426003)(70586007)(4326008)(6636002)(36860700001)(478600001)(7696005)(6666004)(2616005)(1076003)(16526019)(186003)(26005)(110136005)(54906003)(7416002)(2906002)(44832011)(5660300002)(36756003)(40460700003)(356005)(81166007)(82740400003)(8676002)(41300700001)(8936002)(70206006)(82310400005)(316002)(86362001)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2023 05:33:56.7109 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1db783eb-415a-4d67-2550-08db46e0ff05 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: DS1PEPF0000E644.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8591 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?1764307488936504118?= X-GMAIL-MSGID: =?utf-8?q?1764307488936504118?= |
Series |
Regression in s2idle for family 19h model 78h
|
|
Commit Message
Mario Limonciello
April 27, 2023, 5:33 a.m. UTC
s2idle previously worked on this system, but it regressed in kernel
6.4 due to commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN
index 0 for driver probe").
The reason for the regression is that before this commit the SMN
communication was hardcoded, but after amd_smn_read() is used which
relies upon the misc PCI ID used by DF function 3 being included in
a table. The ID was missing for model 78h, so this meant that the
amd_smn_read() wouldn't work.
Add the missing ID into amd_nb, restoring s2idle on this system.
Fixes: 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN index 0 for driver probe")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
arch/x86/kernel/amd_nb.c | 2 ++
include/linux/pci_ids.h | 1 +
2 files changed, 3 insertions(+)
Comments
On Thu, Apr 27, 2023 at 12:33:36AM -0500, Mario Limonciello wrote: > s2idle previously worked on this system, but it regressed in kernel > 6.4 due to commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN > index 0 for driver probe"). > > The reason for the regression is that before this commit the SMN > communication was hardcoded, but after amd_smn_read() is used which > relies upon the misc PCI ID used by DF function 3 being included in > a table. The ID was missing for model 78h, so this meant that the > amd_smn_read() wouldn't work. > > Add the missing ID into amd_nb, restoring s2idle on this system. Is there a long-term solution for this that will not require adding new IDs every time new hardware comes out? drivers/platform/x86/amd/pmc.c already matches ACPI IDs; maybe there's some way for the platform to provide the information you need via ACPI or something? Bjorn
On Thu, Apr 27, 2023 at 12:33:36AM -0500, Mario Limonciello wrote: > s2idle previously worked on this system, but it regressed in kernel > 6.4 due to commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN > index 0 for driver probe"). > > The reason for the regression is that before this commit the SMN > communication was hardcoded, but after amd_smn_read() is used which > relies upon the misc PCI ID used by DF function 3 being included in > a table. The ID was missing for model 78h, so this meant that the > amd_smn_read() wouldn't work. > > Add the missing ID into amd_nb, restoring s2idle on this system. > > Fixes: 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN index 0 for driver probe") > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Grudgingly, because this really isn't a maintainable strategy: Acked-by: Bjorn Helgaas <bhelgaas@google.com> # pci_ids.h > --- > arch/x86/kernel/amd_nb.c | 2 ++ > include/linux/pci_ids.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c > index 4266b64631a4..7e331e8f3692 100644 > --- a/arch/x86/kernel/amd_nb.c > +++ b/arch/x86/kernel/amd_nb.c > @@ -36,6 +36,7 @@ > #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e > #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4 > #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 > +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc > > /* Protect the PCI config register pairs used for SMN. */ > static DEFINE_MUTEX(smn_mutex); > @@ -79,6 +80,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { > { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, > { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, > { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, > + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, > {} > }; > > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h > index 45c3d62e616d..95f33dadb2be 100644 > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -567,6 +567,7 @@ > #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d > #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3 > #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3 > +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb > #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 > #define PCI_DEVICE_ID_AMD_LANCE 0x2000 > #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 > -- > 2.34.1 >
[Public] > On Thu, Apr 27, 2023 at 12:33:36AM -0500, Mario Limonciello wrote: > > s2idle previously worked on this system, but it regressed in kernel > > 6.4 due to commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN > > index 0 for driver probe"). > > > > The reason for the regression is that before this commit the SMN > > communication was hardcoded, but after amd_smn_read() is used which > > relies upon the misc PCI ID used by DF function 3 being included in > > a table. The ID was missing for model 78h, so this meant that the > > amd_smn_read() wouldn't work. > > > > Add the missing ID into amd_nb, restoring s2idle on this system. > > Is there a long-term solution for this that will not require adding > new IDs every time new hardware comes out? > > drivers/platform/x86/amd/pmc.c already matches ACPI IDs; maybe there's > some way for the platform to provide the information you need via > ACPI or something? > > Bjorn I had the same question when I came up with this and found out the ACPI tables don't encode the information needed right now. But, yes there are discussions ongoing to make this more scalable in a future generation.
On Thu, Apr 27, 2023 at 12:33:36AM -0500, Mario Limonciello wrote: > s2idle previously worked on this system, but it regressed in kernel > 6.4 due to commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN > index 0 for driver probe"). > > The reason for the regression is that before this commit the SMN > communication was hardcoded, but after amd_smn_read() is used which > relies upon the misc PCI ID used by DF function 3 being included in > a table. The ID was missing for model 78h, so this meant that the > amd_smn_read() wouldn't work. > > Add the missing ID into amd_nb, restoring s2idle on this system. > > Fixes: 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN index 0 for driver probe") > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> FWIW: Acked-by: Guenter Roeck <linux@roeck-us.net> Note that this patch is not upstream, meaning the second patch in the series can not be applied either. I am not sure if that is because of "regressed in kernel 6.4" - after all, that kernel does not exist yet. The offending patch _is_ in the upstream kernel, though. It might make sense to inform the regression bot if the problem is not fixed when v6.4-rc1 is made available. Guenter > --- > arch/x86/kernel/amd_nb.c | 2 ++ > include/linux/pci_ids.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c > index 4266b64631a4..7e331e8f3692 100644 > --- a/arch/x86/kernel/amd_nb.c > +++ b/arch/x86/kernel/amd_nb.c > @@ -36,6 +36,7 @@ > #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e > #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4 > #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 > +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc > > /* Protect the PCI config register pairs used for SMN. */ > static DEFINE_MUTEX(smn_mutex); > @@ -79,6 +80,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { > { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, > { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, > { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, > + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, > {} > }; > > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h > index 45c3d62e616d..95f33dadb2be 100644 > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -567,6 +567,7 @@ > #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d > #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3 > #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3 > +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb > #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 > #define PCI_DEVICE_ID_AMD_LANCE 0x2000 > #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 > -- > 2.34.1 >
On 5/6/23 09:05, Guenter Roeck wrote: > On Thu, Apr 27, 2023 at 12:33:36AM -0500, Mario Limonciello wrote: >> s2idle previously worked on this system, but it regressed in kernel >> 6.4 due to commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN >> index 0 for driver probe"). >> >> The reason for the regression is that before this commit the SMN >> communication was hardcoded, but after amd_smn_read() is used which >> relies upon the misc PCI ID used by DF function 3 being included in >> a table. The ID was missing for model 78h, so this meant that the >> amd_smn_read() wouldn't work. >> >> Add the missing ID into amd_nb, restoring s2idle on this system. >> >> Fixes: 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN index 0 for driver probe") >> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> > FWIW: > > Acked-by: Guenter Roeck <linux@roeck-us.net> > > Note that this patch is not upstream, meaning the second patch > in the series can not be applied either. I am not sure if that is > because of "regressed in kernel 6.4" - after all, that kernel does not > exist yet. The offending patch _is_ in the upstream kernel, though. > It might make sense to inform the regression bot if the problem is > not fixed when v6.4-rc1 is made available. You're right; the commit message should: s,but it regressed in kernel 6.4 due,but it regressed in, Boris told me that he's waiting for 6.4-rc1 to pick this series up. #regzbot ^introduced 310e782a99c7 > > Guenter > >> --- >> arch/x86/kernel/amd_nb.c | 2 ++ >> include/linux/pci_ids.h | 1 + >> 2 files changed, 3 insertions(+) >> >> diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c >> index 4266b64631a4..7e331e8f3692 100644 >> --- a/arch/x86/kernel/amd_nb.c >> +++ b/arch/x86/kernel/amd_nb.c >> @@ -36,6 +36,7 @@ >> #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e >> #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4 >> #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 >> +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc >> >> /* Protect the PCI config register pairs used for SMN. */ >> static DEFINE_MUTEX(smn_mutex); >> @@ -79,6 +80,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { >> { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, >> { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, >> { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, >> + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, >> {} >> }; >> >> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h >> index 45c3d62e616d..95f33dadb2be 100644 >> --- a/include/linux/pci_ids.h >> +++ b/include/linux/pci_ids.h >> @@ -567,6 +567,7 @@ >> #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d >> #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3 >> #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3 >> +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb >> #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 >> #define PCI_DEVICE_ID_AMD_LANCE 0x2000 >> #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 >> -- >> 2.34.1 >>
On Thu, Apr 27, 2023 at 11:48:16AM -0500, Bjorn Helgaas wrote: > Grudgingly, because this really isn't a maintainable strategy: > > Acked-by: Bjorn Helgaas <bhelgaas@google.com> # pci_ids.h I was wondering whether that define should even go into pci_ids.h but there's a patch 2 which uses it and which is *not* in my mbox. Mario, please CC everybody on all patches in the future. I'll take the k10temp one too so that there's no cross-tree deps. Thx.
On 07.05.23 14:51, Mario Limonciello wrote: > On 5/6/23 09:05, Guenter Roeck wrote: >> On Thu, Apr 27, 2023 at 12:33:36AM -0500, Mario Limonciello wrote: >>> s2idle previously worked on this system, but it regressed in kernel >>> 6.4 due to commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN >>> index 0 for driver probe"). >>> >>> The reason for the regression is that before this commit the SMN >>> communication was hardcoded, but after amd_smn_read() is used which >>> relies upon the misc PCI ID used by DF function 3 being included in >>> a table. The ID was missing for model 78h, so this meant that the >>> amd_smn_read() wouldn't work. >>> >>> Add the missing ID into amd_nb, restoring s2idle on this system. >>> >>> Fixes: 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN index 0 for >>> driver probe") >>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> >> FWIW: >> >> Acked-by: Guenter Roeck <linux@roeck-us.net> >> >> Note that this patch is not upstream, meaning the second patch >> in the series can not be applied either. I am not sure if that is >> because of "regressed in kernel 6.4" - after all, that kernel does not >> exist yet. The offending patch _is_ in the upstream kernel, though. >> It might make sense to inform the regression bot if the problem is >> not fixed when v6.4-rc1 is made available. > > You're right; the commit message should: > > s,but it regressed in kernel 6.4 due,but it regressed in, > > Boris told me that he's waiting for 6.4-rc1 to pick this series up. Which afaics means that users of -rc1 are now affected by this and might waste time bisecting a known issue that could easily have been fixed already. :-/ That doesn't feel right. Or am I missing something? /me wonders I he should start tracking regressions more closely during the merge window to catch and prevent situations like this... > #regzbot ^introduced 310e782a99c7 Thx for adding it. #regzbot fix: 7d8accfaa0ab65e42 Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr If I did something stupid, please tell me, as explained on that page.
On Mon, May 08, 2023 at 01:13:14PM +0200, Thorsten Leemhuis wrote: > Which afaics means that users of -rc1 are now affected by this and might > waste time bisecting a known issue that could easily have been fixed > already. :-/ That doesn't feel right. Or am I missing something? -rc1 is pretty much the most broken tree there is. And it is not an officially released tree but a, well, the first release candidate. So fixes are trickling in, there's lag between what gets found, when the maintainers pick it up and when it ends up upstream and so on and so on. Some fixes need longer testing because there have been cases where a fix breaks something else. And yes, maintainers can always expedite a fix or Linus will pick it up directly if it breaks a lot of boxes in a nasty way. So, long story short, I don't think you should track -rcs. You are tracking the reports already and you're tracking where their fixes land so I guess that's good enough. > /me wonders I he should start tracking regressions more closely during > the merge window to catch and prevent situations like this... I don't see a "situation" here. rcs can be broken for some use cases and that is fine as long as that breakage doesn't get released. Thx.
On Mon, May 08, 2023 at 01:25:43PM +0200, Borislav Petkov wrote: > On Mon, May 08, 2023 at 01:13:14PM +0200, Thorsten Leemhuis wrote: > > Which afaics means that users of -rc1 are now affected by this and might > > waste time bisecting a known issue that could easily have been fixed > > already. :-/ That doesn't feel right. Or am I missing something? > > -rc1 is pretty much the most broken tree there is. And it is not an > officially released tree but a, well, the first release candidate. So > fixes are trickling in, there's lag between what gets found, when the > maintainers pick it up and when it ends up upstream and so on and so on. > > Some fixes need longer testing because there have been cases where a fix > breaks something else. > > And yes, maintainers can always expedite a fix or Linus will pick it up > directly if it breaks a lot of boxes in a nasty way. > > So, long story short, I don't think you should track -rcs. You are > tracking the reports already and you're tracking where their fixes land > so I guess that's good enough. > I absolutely disagree. Without Thorsten's tracking, Linus would have no idea what the status of the kernel is. > > /me wonders I he should start tracking regressions more closely during > > the merge window to catch and prevent situations like this... > > I don't see a "situation" here. rcs can be broken for some use cases and > that is fine as long as that breakage doesn't get released. > Again, I disagree. The whole point of testing release candidates is to get problems fixed. If issues are not fixed timely, they just pile up on top of each other and make it difficult to identify new issues (and, in many cases, to test the kernel in the first place). I find it quite annoying that problems are identfied, often even in -next, the patch intoducing them is applied to mainline anyway, and then it sometimes takes until -rc5 or even later to get the fix applied (even if the fix has been known for weeks or even months). It sometimes even takes Linus' intervention to get fixes applied to the upstream kernel. That really should not be necessary. Telling those who track regressions to stay away from release candidates is absolutely the wrong thing to do and would only serve to make release candidates quite pointless. v6.4-rc1 is a good example. Fixes for all build breakages were published before the commit window opened, yet at least one of them did not make it into -rc1. Together with this patch there are now at least two regressions if -rc1 whch could have been avoided and may impact testability on affected systems. Guenter
On Mon, May 08, 2023 at 06:28:03AM -0700, Guenter Roeck wrote: > Together with this patch there are now at least two regressions if > -rc1 whch could have been avoided and may impact testability on > affected systems. Are you saying that this patch which fixes s2idle on some random box should've gone to Linus *immediately*? And read my mail again: "Some fixes need longer testing because there have been cases where a fix breaks something else." So yes, I disagree with rushing fixes immediately. If they're obvious - whatever that means - then sure but not all of them are such.
[AMD Official Use Only - General] +stable, Sasha > > Together with this patch there are now at least two regressions if > > -rc1 whch could have been avoided and may impact testability on > > affected systems. > > Are you saying that this patch which fixes s2idle on some random box > should've gone to Linus *immediately*? > > And read my mail again: > > "Some fixes need longer testing because there have been cases where > a fix breaks something else." > > So yes, I disagree with rushing fixes immediately. If they're obvious > - whatever that means - then sure but not all of them are such. > > -- Unfortunately, it looks like the broken commit got backported into 6.1.28, but the fix still isn't in Linus' tree. Sasha, Can you please pick up https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/urgent&id=23a5b8bb022c1e071ca91b1a9c10f0ad6a0966e9 for 6.1.29 to fix the regression? Thanks,
On 11.05.23 21:51, Limonciello, Mario wrote: > [AMD Official Use Only - General] > > +stable, Sasha > >>> Together with this patch there are now at least two regressions if >>> -rc1 whch could have been avoided and may impact testability on >>> affected systems. >> >> Are you saying that this patch which fixes s2idle on some random box >> should've gone to Linus *immediately*? >> >> And read my mail again: >> >> "Some fixes need longer testing because there have been cases where >> a fix breaks something else." >> >> So yes, I disagree with rushing fixes immediately. If they're obvious >> - whatever that means - then sure but not all of them are such. >> >> -- > > Unfortunately, it looks like the broken commit got backported into 6.1.28, > but the fix still isn't in Linus' tree. > > Sasha, > > Can you please pick up > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/urgent&id=23a5b8bb022c1e071ca91b1a9c10f0ad6a0966e9 > for 6.1.29 to fix the regression? FWIW, the stable team afaics usually does not fix anything in stable trees before it's fixed in mainline. IOW: that fix now quickly needs to go to Linus to get it quickly fixed in 6.1.y. Side note: I'll soon post a rewritten section of 'Prioritize work on fixing regressions' which is part of Documentation/process/handling-regressions.rst. It among others will cover this case: ``` * Whenever you want to swiftly resolve a regression that recently also made it into a proper mainline, stable, or longterm release, fix it quickly in mainline; when appropriate thus involve Linus to fast-track the fix. That's because the stable team normally does neither revert nor fix any changes that cause a regression in mainline, too. ``` Ciao, Thorsten
On Thu, May 11, 2023 at 07:51:42PM +0000, Limonciello, Mario wrote: >[AMD Official Use Only - General] > >+stable, Sasha > >> > Together with this patch there are now at least two regressions if >> > -rc1 whch could have been avoided and may impact testability on >> > affected systems. >> >> Are you saying that this patch which fixes s2idle on some random box >> should've gone to Linus *immediately*? >> >> And read my mail again: >> >> "Some fixes need longer testing because there have been cases where >> a fix breaks something else." >> >> So yes, I disagree with rushing fixes immediately. If they're obvious >> - whatever that means - then sure but not all of them are such. >> >> -- > >Unfortunately, it looks like the broken commit got backported into 6.1.28, >but the fix still isn't in Linus' tree. > >Sasha, > >Can you please pick up >https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/urgent&id=23a5b8bb022c1e071ca91b1a9c10f0ad6a0966e9 >for 6.1.29 to fix the regression? Happily, once it lands upstream :)
On Thu, May 11, 2023 at 07:51:42PM +0000, Limonciello, Mario wrote: > [AMD Official Use Only - General] > > +stable, Sasha > > > > Together with this patch there are now at least two regressions if > > > -rc1 whch could have been avoided and may impact testability on > > > affected systems. > > > > Are you saying that this patch which fixes s2idle on some random box > > should've gone to Linus *immediately*? > > > > And read my mail again: > > > > "Some fixes need longer testing because there have been cases where > > a fix breaks something else." > > > > So yes, I disagree with rushing fixes immediately. If they're obvious > > - whatever that means - then sure but not all of them are such. > > > > -- > > Unfortunately, it looks like the broken commit got backported into 6.1.28, > but the fix still isn't in Linus' tree. > > Sasha, > > Can you please pick up > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/urgent&id=23a5b8bb022c1e071ca91b1a9c10f0ad6a0966e9 > for 6.1.29 to fix the regression? Now that this is in Linus's tree, it's queued up, thanks. greg k-h
diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 4266b64631a4..7e331e8f3692 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -36,6 +36,7 @@ #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc /* Protect the PCI config register pairs used for SMN. */ static DEFINE_MUTEX(smn_mutex); @@ -79,6 +80,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, {} }; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 45c3d62e616d..95f33dadb2be 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -567,6 +567,7 @@ #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3 +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001