From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DATE_IN_PAST_12_24, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 231BDC4363A for ; Wed, 28 Oct 2020 23:02:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C246020757 for ; Wed, 28 Oct 2020 23:02:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jZLfqaHI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389975AbgJ1XCO (ORCPT ); Wed, 28 Oct 2020 19:02:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389973AbgJ1XCN (ORCPT ); Wed, 28 Oct 2020 19:02:13 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8518BC0613CF; Wed, 28 Oct 2020 16:02:12 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id n18so792135wrs.5; Wed, 28 Oct 2020 16:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=U5GSIAp/KF0yhINCIVb4W15ZsipvOkrRvQ9Lx8wRI08=; b=jZLfqaHISKoEcgTfUc+mK9YZzM14Hhti6pzljX1gp/x9TlfL6+ZVLjaGik9W8gAlTS vSRQ7IJ1AcA1aQvX+YlggAPTSKOZWwsS0enHFEpmxe0h7IUBGrm8jlAICkF98AJ170gF TVxQJijAMDJ2gU56gMvBR/BgQOY9mrpVNOKt2HyeYilv4NZLabRN7QV/ptMWZl6mlTFP AqjtIjfKFH//nLy5WEHEOwRwDgbErVB6Lc+QB8bgpr1Fbcfale1vg3unCGt3svqAxSmg JuEsMPWaV3ct33m9xD7h9DIaQpwYRhQtLLfEEsbUpli0DgZAFMtGKIEi4pZRE77gnSXY GrqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=U5GSIAp/KF0yhINCIVb4W15ZsipvOkrRvQ9Lx8wRI08=; b=JsAqXsTRSML7fmhlvqiml5B5BiLLRtdHfX4OMgytWHJd0xsF5D04r033FgLELFuiwO KfhW0DWrQDmht0Ymgl1RHSvQNkwTTLT8g63rSX8IizybD6OHWRCsWtFSy0WcTJqCTNtR 3WFyD9BIopwtUuOrySDGutGcwY5Mf+TF9Gxm1phHOn6qB5aV57mKgIKOz5nBw77LFz5B RxOI2pvBCFUFHuZCqf9ZAeJxMq+ppm7inuaBWCtcOkBG9sPtrZyqWiZlulROhxQHHnsW yXZqmXkQEuqy23elvdtT3vcduOt9GJ8mUTOdOtxlFvsrGzmBRV2xH3ldNRetgSPQUAJR 0jNg== X-Gm-Message-State: AOAM532SlhcNU5ne1nhbhbTXyZKOPklMlE4gT1G2jC7egNn8u5uSraix DFQQ3i1izYF+yQQ1ygsWBK4IKP39Li8feqzzBhTDOvnblxs= X-Google-Smtp-Source: ABdhPJyQzkAAbFIB0JGWi9pzmeojf1A+N5Mp14xzNvdV3ntVJka40VMMTCotKKAg0eDoHzteHoAxQQs7/Xp8YbPXd+g= X-Received: by 2002:a17:906:6dc6:: with SMTP id j6mr6277733ejt.354.1603864833350; Tue, 27 Oct 2020 23:00:33 -0700 (PDT) MIME-Version: 1.0 References: <2faef6f884aae9ae92e57e7c6a88a6195553c684.1603766889.git.sathyanarayanan.kuppuswamy@linux.intel.com> In-Reply-To: <2faef6f884aae9ae92e57e7c6a88a6195553c684.1603766889.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Ethan Zhao Date: Wed, 28 Oct 2020 14:00:21 +0800 Message-ID: Subject: Re: [PATCH v11 4/5] PCI/portdrv: Remove redundant pci_aer_available() check in DPC enable logic To: Kuppuswamy Sathyanarayanan Cc: Bjorn Helgaas , linux-pci , Linux Kernel Mailing List , Ashok Raj , knsathya@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Oct 27, 2020 at 10:00 PM Kuppuswamy Sathyanarayanan wrote: > > In DPC service enable logic, check for > services & PCIE_PORT_SERVICE_AER implies pci_aer_available() How about PCIE_PORT_SERVICE_AER is not configured, but pcie_aer_disable =3D=3D 0 =EF=BC=9F > is true. So there is no need to explicitly check it again. > > Also, passing pcie_ports=3Ddpc-native in kernel command line > implies DPC needs to be enabled in native mode irrespective > of AER ownership status. So checking for pci_aer_available() > without checking for pcie_ports status is incorrect. > > Signed-off-by: Kuppuswamy Sathyanarayanan > --- > drivers/pci/pcie/portdrv_core.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_c= ore.c > index 2c0278f0fdcc..e257a2ca3595 100644 > --- a/drivers/pci/pcie/portdrv_core.c > +++ b/drivers/pci/pcie/portdrv_core.c > @@ -252,7 +252,6 @@ static int get_port_device_capability(struct pci_dev = *dev) > * permission to use AER. > */ > if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) && > - pci_aer_available() && > (host->native_dpc || (services & PCIE_PORT_SERVICE_AER))) > services |=3D PCIE_PORT_SERVICE_DPC; > > -- > 2.17.1 >