Message ID | 20230601232923.1248-3-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 k13csp680399vqr; Thu, 1 Jun 2023 16:34:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7iFTZnb6IPLaXhqHo9mshlSq1l2hEg98l64a06TBZOtNvfwXuH6eQT8k7FRLEpsMGsgJMw X-Received: by 2002:a05:6358:42a5:b0:123:5674:1545 with SMTP id s37-20020a05635842a500b0012356741545mr4484343rwc.19.1685662457254; Thu, 01 Jun 2023 16:34:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685662457; cv=pass; d=google.com; s=arc-20160816; b=UfQKpTOdVyRBTcGlGYt8UxNMRBfTMjH1TW8FEXh/tO7YhebhRJ5wVuJs9rN8JGYNmp XHQBo7zaxHjMZ4PKEfu7DZoz7BU7guw69pJXPS7OebNmrPfvMc0QrLV6PM5YeLFqnIZk 65u3ipkfTXsqB3rBRFeXHI0OYM554QsHuacT/pHnC/fFENvCd9kb6KetDTDT1mBFtPAE Jm6CVeM4Say0R9XpGKH0yzb8Cf9yemciLq1P8EWPaT0Ne5MWMF2ywHB38595k/DtOmb3 +vOaRbOu680/j7m5bwtp6z+R6T4cplrndzta6Ovi2c3dSdNkX0HnVBwdGGoHPeCbT5Qz 7VQg== 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=HCtaCSh2xp3TLU3Jn9duTu+a0ilJ5rZJIXMRb1Vd+cU=; b=MaZRCQWZPklIemot9IRYCgYBtLKP7x6Yq0K57MC19QLlDUaeu9TmUPG5eWOYYpem6C 39Q5a6veA+tLdExJz+FHOIrkeBq9gDm50entbRD1ZqAUkSaKdKRcl48wa7ljIDgAm4uF 5vlWjU037malLisSEg8bD21TjwiP7jiNqhaz33XVqf7Ypa+S4FaMExNJScXsVDtbjV4m 3U3DCSfV7XitSI7JFu50/fM2oVN68oVr7coN3rHRKJVo+2r8k1HV1DLaJySiy/7PPQEu SrdGhCY8mxn1uLfymQ99ITBr7gDQk7Sp77+iFdU79xbiCyGwryDCHXU+BJFaiRqj3jLE i26Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ORWt2kzz; 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 z11-20020a6552cb000000b00541481274a0si1070261pgp.531.2023.06.01.16.34.03; Thu, 01 Jun 2023 16:34:17 -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=ORWt2kzz; 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 S232932AbjFAX3y (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Thu, 1 Jun 2023 19:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231863AbjFAX3q (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Jun 2023 19:29:46 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2055.outbound.protection.outlook.com [40.107.244.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E42A136; Thu, 1 Jun 2023 16:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dizkZMI5ZJVWcuf0tPAvS9K53vnBKc2o2yM9ellUiSkwpQuc00NfG2x3nC6z/EpccuCUmmhC90rlJ9SdhNzVtSPrGln0CL8XXfNWfiJ8hr9shzz1vSq6Xe4twOQi1V4G2j7xR6LiftGneaAf8XlDIZChgIDKqj780rnN5xomgpGQZ8I2OEcxKpGWsxoxIO3ZjJde5CGOy54Kw8TO+NGXrLDZS2/KyQ3u3nPDEJ22sh0jtf9P3/kWZLMtD3KUeu3knuIY4TbmAHQYck8Pov09OpWjFZSBJVCIAkV9Y//EKNBbv8mGcoIm59QqhRilaHLw7a3cTh6xZsNp4BkUaPlFzg== 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=HCtaCSh2xp3TLU3Jn9duTu+a0ilJ5rZJIXMRb1Vd+cU=; b=Cxj1EkoTB5xr2Wt7gkGm1SaqMKlyGBWGMIhA7GJr7Qs4iSuSt7MXr0C41MWIiKRpWZa1bDQ4KDrLJAKt/OpfZXF2SR1coWZQd5CRQYHi27Ix30180+fPhJSiftQOuT+2qeLfs5yhh3ZIu2AkZUUCQN4UDbYtubLntYSCd0Rzaoar1tpefp5zFmfyaJZaBPM+8dhHvV26Pi2mXaULsgYeCvs7BOBSZ3k4kppYNMqZUiv/yn8T0I+z7MrQ2nXINlG6L7uCUDXC3F6/cTfx0UCn7/lU0R/cnPn3GCSprITbVrherMeOnN1Zf8HRtgAPi/29XXo8nqP20j3DL8Bt8I0EPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=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=HCtaCSh2xp3TLU3Jn9duTu+a0ilJ5rZJIXMRb1Vd+cU=; b=ORWt2kzztJm9REpBfs1fLP1Z5FkZhbG/qauYKzMhvoDvOn0/CMM1JVG7g9v9SFdjFT42lk2/gGvttCsH3hLDeKTSQccaSZ115RCSQG4YBL8HQtagp+4kiULy6jv2YPxP/PBrsxrpzTpy4ySgRPmrpVhZUyvXzPaYiHMNFVRhJxM= Received: from DM6PR21CA0010.namprd21.prod.outlook.com (2603:10b6:5:174::20) by CY8PR12MB7337.namprd12.prod.outlook.com (2603:10b6:930:53::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.25; Thu, 1 Jun 2023 23:29:43 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::4f) by DM6PR21CA0010.outlook.office365.com (2603:10b6:5:174::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.9 via Frontend Transport; Thu, 1 Jun 2023 23:29:43 +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 DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) 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 23:29:43 +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 18:29:42 -0500 From: Mario Limonciello <mario.limonciello@amd.com> To: Rafael Wysocki <rafael@kernel.org>, <hdegoede@redhat.com>, <linus.walleij@linaro.org> CC: <linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-gpio@vger.kernel.org>, <platform-driver-x86@vger.kernel.org>, <linux-pm@vger.kernel.org>, S-k Shyam-sundar <Shyam-sundar.S-k@amd.com>, Natikar Basavaraj <Basavaraj.Natikar@amd.com>, Mario Limonciello <mario.limonciello@amd.com> Subject: [PATCH v3 3/4] pinctrl: amd: Use pm_pr_dbg to show debugging messages Date: Thu, 1 Jun 2023 18:29:22 -0500 Message-ID: <20230601232923.1248-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601232923.1248-1-mario.limonciello@amd.com> References: <20230601232923.1248-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: DM6NAM11FT053:EE_|CY8PR12MB7337:EE_ X-MS-Office365-Filtering-Correlation-Id: 77336892-228a-420d-972a-08db62f8141f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RTMcIr/8bHc99V113LydJUuy0CiOT6Ii1qiI2Q9Oqc9NTGKfnhAb+d520z8wU7gmsxibgDccusa+w0qO0e6hnXO6SPnW1ky2JLsCLv9A7vLN/vb9adOxS4dXTkiCAz1Ad3+NdBeEi5/KIDjlf05U4A/vUfqaqNve1LZkBl+VeJ+loPMqApHKggfuXcaqsO1i7hEGXITmFjKLsHSJjnVdBKl8kzNajmrFMfmPYnCqx9mI9Pi9pX36CjF5ex8mS/X7fMDjNIpNQPTQb0F8gvwE3koyNdvPXKEr2jX5MZb2WsNxWomjtaMFKHLgzzHuQbmy4Q0KQr2Qqlx/1tlQCTYmkfnMpq9BbG5QGk0C7P1xlWHhJD/oArV/dgts56LSkDBCIPV3C5ld6j5I04Emaoj3vHbueagO1REpzS7F8BWjckmwQ3PnM6R9VK4uniqz/xz5dZeFliVNxhkTdQDXaLSGq1YNEFT9H6XGyyXYAnWISou2L/2cqtNt2WHWQfVnnOFVk4voOtaJ7bzezW7x8yazT+FTE3wzmSvlCZAz+Qptb3cnXN4nwTt9DuxInN1o1ms0crIvaXAVtyzyvniO9ILWTXUMIfpusieTvBIwoQcQkqfQwj6Q0DFQ7FnPcj921WrfEUMZnCJtULPbLAZThJ1yhMYO+NhpnxO8BgJMUgamb+gQnVurs5K3px/vpVhXXrXLHvJ2RoRPv+Aq51A0G0PPKwQym1b310prslxBK+iGLWMNCxStlhrRFJvAMaMeH6U7j2DqlMkF7asNfQno7l/xiA== 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)(346002)(39860400002)(136003)(396003)(451199021)(40470700004)(36840700001)(46966006)(110136005)(186003)(4326008)(83380400001)(70586007)(47076005)(54906003)(36756003)(15650500001)(2906002)(70206006)(478600001)(16526019)(1076003)(2616005)(40460700003)(26005)(8936002)(336012)(356005)(82740400003)(8676002)(426003)(82310400005)(81166007)(316002)(44832011)(36860700001)(40480700001)(5660300002)(7696005)(6666004)(86362001)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 23:29:43.1302 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77336892-228a-420d-972a-08db62f8141f 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: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7337 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?1767545196387477247?= X-GMAIL-MSGID: =?utf-8?q?1767545196387477247?= |
Series |
[v3,1/4] include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume
|
|
Commit Message
Mario Limonciello
June 1, 2023, 11:29 p.m. UTC
To make the GPIO tracking around suspend easier for end users to
use, link it with pm_debug_messages. This will make discovering
sources of spurious GPIOs around suspend easier.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/pinctrl/pinctrl-amd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
Hi Mario,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 7736c431466abb54a2679dc257f739fddfa84295]
url: https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-x86-Add-pm_debug_messages-for-LPS0-_DSM-state-tracking/20230602-073044
base: 7736c431466abb54a2679dc257f739fddfa84295
patch link: https://lore.kernel.org/r/20230601232923.1248-3-mario.limonciello%40amd.com
patch subject: [PATCH v3 3/4] pinctrl: amd: Use pm_pr_dbg to show debugging messages
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20230602/202306021143.5D8Xmq0r-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/61f4d28eda8f5bf19179080626ec4f1276c1cbae
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Mario-Limonciello/ACPI-x86-Add-pm_debug_messages-for-LPS0-_DSM-state-tracking/20230602-073044
git checkout 61f4d28eda8f5bf19179080626ec4f1276c1cbae
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=mips olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/pinctrl/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306021143.5D8Xmq0r-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/pinctrl/pinctrl-amd.c: In function 'do_amd_gpio_irq_handler':
>> drivers/pinctrl/pinctrl-amd.c:639:28: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
639 | if (regval & PIN_IRQ_PENDING)
| ^
vim +/else +639 drivers/pinctrl/pinctrl-amd.c
ba714a9c1dea85 Thomas Gleixner 2017-05-23 608
2d54067fcd23aa Mario Limonciello 2021-10-31 609 static bool do_amd_gpio_irq_handler(int irq, void *dev_id)
dbad75dd1f25e0 Ken Xue 2015-03-10 610 {
ba714a9c1dea85 Thomas Gleixner 2017-05-23 611 struct amd_gpio *gpio_dev = dev_id;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 612 struct gpio_chip *gc = &gpio_dev->gc;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 613 unsigned int i, irqnr;
dbad75dd1f25e0 Ken Xue 2015-03-10 614 unsigned long flags;
10ff58aa3c2e2a Ben Dooks (Codethink 2019-10-22 615) u32 __iomem *regs;
2d54067fcd23aa Mario Limonciello 2021-10-31 616 bool ret = false;
10ff58aa3c2e2a Ben Dooks (Codethink 2019-10-22 617) u32 regval;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 618 u64 status, mask;
dbad75dd1f25e0 Ken Xue 2015-03-10 619
ba714a9c1dea85 Thomas Gleixner 2017-05-23 620 /* Read the wake status */
229710fecdd805 Julia Cartwright 2017-03-09 621 raw_spin_lock_irqsave(&gpio_dev->lock, flags);
ba714a9c1dea85 Thomas Gleixner 2017-05-23 622 status = readl(gpio_dev->base + WAKE_INT_STATUS_REG1);
ba714a9c1dea85 Thomas Gleixner 2017-05-23 623 status <<= 32;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 624 status |= readl(gpio_dev->base + WAKE_INT_STATUS_REG0);
229710fecdd805 Julia Cartwright 2017-03-09 625 raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
dbad75dd1f25e0 Ken Xue 2015-03-10 626
ba714a9c1dea85 Thomas Gleixner 2017-05-23 627 /* Bit 0-45 contain the relevant status bits */
ba714a9c1dea85 Thomas Gleixner 2017-05-23 628 status &= (1ULL << 46) - 1;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 629 regs = gpio_dev->base;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 630 for (mask = 1, irqnr = 0; status; mask <<= 1, regs += 4, irqnr += 4) {
ba714a9c1dea85 Thomas Gleixner 2017-05-23 631 if (!(status & mask))
ba714a9c1dea85 Thomas Gleixner 2017-05-23 632 continue;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 633 status &= ~mask;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 634
ba714a9c1dea85 Thomas Gleixner 2017-05-23 635 /* Each status bit covers four pins */
dbad75dd1f25e0 Ken Xue 2015-03-10 636 for (i = 0; i < 4; i++) {
ba714a9c1dea85 Thomas Gleixner 2017-05-23 637 regval = readl(regs + i);
1d66e379731f79 Mario Limonciello 2022-10-13 638
1d66e379731f79 Mario Limonciello 2022-10-13 @639 if (regval & PIN_IRQ_PENDING)
61f4d28eda8f5b Mario Limonciello 2023-06-01 640 pm_pr_dbg("GPIO %d is active: 0x%x",
2d54067fcd23aa Mario Limonciello 2021-10-31 641 irqnr + i, regval);
1d66e379731f79 Mario Limonciello 2022-10-13 642
1d66e379731f79 Mario Limonciello 2022-10-13 643 /* caused wake on resume context for shared IRQ */
1d66e379731f79 Mario Limonciello 2022-10-13 644 if (irq < 0 && (regval & BIT(WAKE_STS_OFF)))
2d54067fcd23aa Mario Limonciello 2021-10-31 645 return true;
2d54067fcd23aa Mario Limonciello 2021-10-31 646
8bbed1eef001fd Daniel Kurtz 2018-07-16 647 if (!(regval & PIN_IRQ_PENDING) ||
8bbed1eef001fd Daniel Kurtz 2018-07-16 648 !(regval & BIT(INTERRUPT_MASK_OFF)))
ba714a9c1dea85 Thomas Gleixner 2017-05-23 649 continue;
f460c70125bcb1 Sebastian Andrzej Siewior 2022-09-19 650 generic_handle_domain_irq_safe(gc->irq.domain, irqnr + i);
6afb10267c1692 Daniel Drake 2017-10-02 651
6afb10267c1692 Daniel Drake 2017-10-02 652 /* Clear interrupt.
6afb10267c1692 Daniel Drake 2017-10-02 653 * We must read the pin register again, in case the
6afb10267c1692 Daniel Drake 2017-10-02 654 * value was changed while executing
a9cb09b7be84a7 Marc Zyngier 2021-05-04 655 * generic_handle_domain_irq() above.
d21b8adbd475db Daniel Drake 2019-08-14 656 * If we didn't find a mapping for the interrupt,
d21b8adbd475db Daniel Drake 2019-08-14 657 * disable it in order to avoid a system hang caused
d21b8adbd475db Daniel Drake 2019-08-14 658 * by an interrupt storm.
6afb10267c1692 Daniel Drake 2017-10-02 659 */
6afb10267c1692 Daniel Drake 2017-10-02 660 raw_spin_lock_irqsave(&gpio_dev->lock, flags);
6afb10267c1692 Daniel Drake 2017-10-02 661 regval = readl(regs + i);
d21b8adbd475db Daniel Drake 2019-08-14 662 if (irq == 0) {
d21b8adbd475db Daniel Drake 2019-08-14 663 regval &= ~BIT(INTERRUPT_ENABLE_OFF);
d21b8adbd475db Daniel Drake 2019-08-14 664 dev_dbg(&gpio_dev->pdev->dev,
d21b8adbd475db Daniel Drake 2019-08-14 665 "Disabling spurious GPIO IRQ %d\n",
d21b8adbd475db Daniel Drake 2019-08-14 666 irqnr + i);
d21b8adbd475db Daniel Drake 2019-08-14 667 }
ba714a9c1dea85 Thomas Gleixner 2017-05-23 668 writel(regval, regs + i);
6afb10267c1692 Daniel Drake 2017-10-02 669 raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
2d54067fcd23aa Mario Limonciello 2021-10-31 670 ret = true;
dbad75dd1f25e0 Ken Xue 2015-03-10 671 }
dbad75dd1f25e0 Ken Xue 2015-03-10 672 }
2d54067fcd23aa Mario Limonciello 2021-10-31 673 /* did not cause wake on resume context for shared IRQ */
2d54067fcd23aa Mario Limonciello 2021-10-31 674 if (irq < 0)
2d54067fcd23aa Mario Limonciello 2021-10-31 675 return false;
dbad75dd1f25e0 Ken Xue 2015-03-10 676
ba714a9c1dea85 Thomas Gleixner 2017-05-23 677 /* Signal EOI to the GPIO unit */
229710fecdd805 Julia Cartwright 2017-03-09 678 raw_spin_lock_irqsave(&gpio_dev->lock, flags);
ba714a9c1dea85 Thomas Gleixner 2017-05-23 679 regval = readl(gpio_dev->base + WAKE_INT_MASTER_REG);
ba714a9c1dea85 Thomas Gleixner 2017-05-23 680 regval |= EOI_MASK;
ba714a9c1dea85 Thomas Gleixner 2017-05-23 681 writel(regval, gpio_dev->base + WAKE_INT_MASTER_REG);
229710fecdd805 Julia Cartwright 2017-03-09 682 raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
dbad75dd1f25e0 Ken Xue 2015-03-10 683
ba714a9c1dea85 Thomas Gleixner 2017-05-23 684 return ret;
dbad75dd1f25e0 Ken Xue 2015-03-10 685 }
dbad75dd1f25e0 Ken Xue 2015-03-10 686
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index f279b360c20d..43d3530bab48 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -30,6 +30,7 @@ #include <linux/pinctrl/pinconf.h> #include <linux/pinctrl/pinconf-generic.h> #include <linux/pinctrl/pinmux.h> +#include <linux/suspend.h> #include "core.h" #include "pinctrl-utils.h" @@ -636,9 +637,8 @@ static bool do_amd_gpio_irq_handler(int irq, void *dev_id) regval = readl(regs + i); if (regval & PIN_IRQ_PENDING) - dev_dbg(&gpio_dev->pdev->dev, - "GPIO %d is active: 0x%x", - irqnr + i, regval); + pm_pr_dbg("GPIO %d is active: 0x%x", + irqnr + i, regval); /* caused wake on resume context for shared IRQ */ if (irq < 0 && (regval & BIT(WAKE_STS_OFF)))