Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1190082rwb; Wed, 28 Sep 2022 14:42:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5P1CKTIb596kogvqyQUH0+pXBPA9KbMiRhxaAtXEWb9nVr5otIDbu4eOvycSu/y35rLSpc X-Received: by 2002:a17:902:9b88:b0:179:c5d0:2b62 with SMTP id y8-20020a1709029b8800b00179c5d02b62mr33214plp.29.1664401327265; Wed, 28 Sep 2022 14:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664401327; cv=none; d=google.com; s=arc-20160816; b=Qx6mlxi1Jd5BLIwum3aX5NA5DmI0EAok3SK0c1S4kYGG4G5OtQQza75xULpFQu2x6N 5gJcd450bMfZF2UDkEKgpJZ2v+zY+rOcNCiIsNpBHnytwh52c+bTucjaD/t2dhrfBTLP tDwoNL8CLPhPEFHq/FB6WclrBDHKgs65ihidXEOEzIRpfEoeaw5hb9XkbKc1MbtCMGBX 5e+XhYK4crafKs0dCKJImGljCjoSnohjybW8jsTkosf89+xYWDo39e/hqTlO6HK6VXbS S01M+2Y57Xwgt2Gak0pOk+JWHo9OvgbVJHwtrCQlq6SsPuKaoJTmoxHQJYnYKMMJhyd/ wLyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=/7/6fMlH9SpLSb5WC3agLE+EC8j6tfkrmmhDoBaBRe8=; b=kDdQiHK8wEQNHky8mLvSTgH5Q0ZZJZOeH2AKmktkh761vrtmCRUKcRJKPXIAt1qdkz Kl2dDcng+9kDgPiXavpu85V3/jdrxiSSRQXP0K0mPTpOplwbE/UDPdPlme8SbCkZ3XQX okjzqG+Nu4G3q20cQ/sLVQQqa12q26f9IZX6y6OvzdWh04SagfJxD5jwO6pL/l6cZDNI bSD7WWxv7wH7EfczdhScLfPenqTcDI9l9ewB5SbgYz0ukwdIKUEb5YbT5VHKi3vAeT9t b3agp4EHqlSpUVklLC7f6n5p/kPGrq8uVUb5diD1kfi3lY0JkhpfCJiYzfIXXBeIxKNz uLPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZDbmfvT0; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp6-20020a17090b4a8600b001fafaf2e8fesi3657773pjb.104.2022.09.28.14.41.56; Wed, 28 Sep 2022 14:42:07 -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=@kernel.org header.s=k20201202 header.b=ZDbmfvT0; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234059AbiI1VcQ (ORCPT + 99 others); Wed, 28 Sep 2022 17:32:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233601AbiI1VcO (ORCPT ); Wed, 28 Sep 2022 17:32:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB5A4760FE; Wed, 28 Sep 2022 14:32:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 87E4AB820C2; Wed, 28 Sep 2022 21:32:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF589C433D6; Wed, 28 Sep 2022 21:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664400731; bh=MZ7K2L7OFQOceL1+MLNNgstlr1GNb++R4EBc4ueAOng=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZDbmfvT0Nqwdw0W3rCmJG4NfVwvy9Amgr3wcmdydyhC3g71yrMBs9njtt9swjj0gH iatX9M52PfnXCqnBWSVISElr2A3xqpU7lSmt2/Oli9dyb+bw/EYMZxWfwL+QF7yt4h DwcmjtlyLNRHLnQ0kCSB9nwPRD0nYggXQ6gWMOGk/+nsx/tW+ekYd2lWj3W3GaAQqo kn6+M2NOa6b6tyrAfD2bainkYXug9sYUgv0uIcdG3CBP4jSQYNIUOye05iOQa3wTjQ 0tcv0IIXDS2qsPcELMdTxwtyQqYZKNIyi5XsnRJN3Nx2cUMTPq9mloTyO458EaWRlG zLUqN2BX7YW8g== Date: Wed, 28 Sep 2022 16:32:09 -0500 From: Bjorn Helgaas To: Kai-Heng Feng Cc: bhelgaas@google.com, mika.westerberg@linux.intel.com, koba.ko@canonical.com, sathyanarayanan.kuppuswamy@linux.intel.com, Lukas Wunner , Jan Kiszka , Stuart Hayes , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] PCI/portdrv: Flag services when IRQ is shared with PME Message-ID: <20220928213209.GA1839792@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220727013255.269815-1-kai.heng.feng@canonical.com> X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 27, 2022 at 09:32:50AM +0800, Kai-Heng Feng wrote: > After commit cb1f65c1e142 ("PM: s2idle: ACPI: Fix wakeup interrupts > handling"), there's a system that always gets woken up by spurious PME > event when one of the root port is put to D3cold. > > '/sys/power/pm_wakeup_irq' shows 122, which is an IRQ shared between > PME, AER and DPC: > pcieport 0000:00:01.0: PME: Signaling with IRQ 122 > pcieport 0000:00:01.0: AER: enabled with IRQ 122 > pcieport 0000:00:01.0: DPC: enabled with IRQ 122 > > Disabling services one by one and the issue goes away when > PCIE_PORT_SERVICE_AER is not enabled. Following the lead, more info can > be found on resume when pci_aer_clear_status() is removed from > pci_restore_state() to print out what happened: > pcieport 0000:00:01.0: AER: Corrected error received: 0000:00:01.0 > pcieport 0000:00:01.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Receiver ID) > pcieport 0000:00:01.0: device [8086:4c01] error status/mask=00000001/00002000 > pcieport 0000:00:01.0: [ 0] RxErr > > Since the corrected AER error happens at physical layer when the root > port is transitioning to D3cold, making system be able to suspend is > more important than reporting issues like this. > > So introduce a new flag to indicate when IRQ is shared with PME, > therefore AER and DPC can be suspended to prevent any spurious wakeup. > HP already has its own suspend routine so it doesn't need to use this > flag. I think it probably does make sense to disable AER and DPC interrupts during suspend. I'm not sure it makes sense to do that conditionally based on whether the interrupt is shared. I think I'd rather disable them always, whether the interrupt is shared or not, because then we would do the same thing on all machines. What do you think? Bjorn