Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp516496ybt; Mon, 6 Jul 2020 15:20:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWxtZc5SGkqVRG1YOmw3hmk+7vOI+/ESIwt8UlF/ii1j++hwCmlbd+Lo8SUMAQzC8up+11 X-Received: by 2002:a17:906:a0c8:: with SMTP id bh8mr46535849ejb.190.1594074024684; Mon, 06 Jul 2020 15:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594074024; cv=none; d=google.com; s=arc-20160816; b=iK8wWeUD9YVC0ZMWdgynxCMbowZ4mcrDCWR+3uqjxN+8aBIRx7NeFsGfkLRlh8P13C HlXiGDDbVh2lbfHEAveo0DjTbB6zIryXD9D3VD1D2p/LhKNNh+irFByIp0FURMLw5C03 gW8BRkCU12+uDDfxd1Rtp9PKINeYAYnw+A4HvnUT/UzxnHfLKeXBWlPWD3kUlYSc/RVj mKH9uo6xB3flNlY1FMw5MlT0CmhWLEZF7NCHnTK4KdId4zwQ7mPFPmsw9FMoluPTTKp8 IuMvUr2tiYsLEkz2xIOgOtPwj6J8SJsqsobXlfHykJjpBh7OeqLy+tt5I1t9VizW/WDx ZzpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VcTg7znjs5NM9gvezTd2PmxFMdpOTVCMT/3yPB+Qgb4=; b=aRjJFgvgOesvPwlTs9J0Hf1lceSFfPwnn5WBnG7YDWmwYfoD+31f2Pg6DVx7uonYzw uMpzEUm9qrYhOZOfXvpU/Lp5OoCaaTGXKMboiejpcgIleKQ67bs7pjytamV5Iv3klXgy ol05DFQPG54yQrGy/y911Oemxl5lfGWWHO8vPLFYCjzz5IphpT9KCNMGbwSufX6mYicB nZVB4gHBlKu/59KQRpzLD1s8oDRN/tMn+XFl4BxVbVqcL2QHWDxjRK90pYThQDRAJHkA 8OFi97Iomm0pOhdJG2fMQyz0f5HlVuOKA36ASlius5bP1v9zzn0qrexOt4ckiWZ3tLBm 47gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vNzVRDUl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf17si13748173ejb.86.2020.07.06.15.20.00; Mon, 06 Jul 2020 15:20:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vNzVRDUl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbgGFWRV (ORCPT + 99 others); Mon, 6 Jul 2020 18:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbgGFWRV (ORCPT ); Mon, 6 Jul 2020 18:17:21 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AE4BC061755 for ; Mon, 6 Jul 2020 15:17:21 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id y13so23584060lfe.9 for ; Mon, 06 Jul 2020 15:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VcTg7znjs5NM9gvezTd2PmxFMdpOTVCMT/3yPB+Qgb4=; b=vNzVRDUl4U537XT+jFySQw2TYQYIYbNVvMi2vI75OS8G/oHkzYqETbWDdsyWrqnJvB ZDagRVkHhKD8zrtLYJJ8qIXo0AuuWaJckY5WFye6ln6rpJlD+AplVS4Ho5fxKhazVYd+ WwNgl/fOyzqH2mIWWEgJom7RS2Ys5J/RcL078JbEZFoB+AoMeXlDAL/+dvD25aT6hP7g cRY8zFElRYhBxqOzi9A+D7S29ctaddBPIC5OT/Ic4cekOp6Ldlh3Lmc0aMJePc/BbAgT 305sc89OsH87ksxbW1okc8uaJtthTw6avN9JtPmDdA9CbRbhBy4vF/SiokD2ssfDaKPU KjfA== 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=VcTg7znjs5NM9gvezTd2PmxFMdpOTVCMT/3yPB+Qgb4=; b=Q3O7fG8kvqYvuauKqhcOs24hIkH7saAcNAAyccP6u3NLp8aT4rtLQJnxa7gWMiLlum bix3FK2YQ2uy9qulkvzBK/vjnaW+y93kLww63Mak/Oifa83YBV0HoFpenm6jzFrzO/Li QAnTVQ98qhWDSoYrruvle/b9/Qbpz2oU15korqKjN1wNP4WaWyuSITx6BXcJR0NebCbV C1cIvk2P1ObQbEdiqmuOBu8Ngv7vHYVsy03btmKxd1L5I4xn3/UAIUHn/D4UKHMGmCdT LCBiBmSITvtvKdou7gDLx5L839lF5t9Y6eokkiFJK5QwLKrp8U6WG75JRWp4YiMca0Zs KLFw== X-Gm-Message-State: AOAM533aD5cRJ8yl5VCsYwItZul/HW8G6xbyBaf2jc0bgijvNQqO91nm CAFuViP6mqgz58bwKWG/hAQbWFGjVtSbQTfMjjnrUQ== X-Received: by 2002:a19:435b:: with SMTP id m27mr31417703lfj.40.1594073839263; Mon, 06 Jul 2020 15:17:19 -0700 (PDT) MIME-Version: 1.0 References: <20200630044943.3425049-2-rajatja@google.com> <20200706155815.GA119406@bjorn-Precision-5520> In-Reply-To: <20200706155815.GA119406@bjorn-Precision-5520> From: Rajat Jain Date: Mon, 6 Jul 2020 15:16:42 -0700 Message-ID: Subject: Re: [PATCH v2 1/7] PCI: Keep the ACS capability offset in device To: Bjorn Helgaas Cc: David Woodhouse , Lu Baolu , Joerg Roedel , Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , "open list:AMD IOMMU (AMD-VI)" , Linux Kernel Mailing List , linux-pci , ACPI Devel Maling List , Raj Ashok , "Krishnakumar, Lalithambika" , Mika Westerberg , Jean-Philippe Brucker , Prashant Malani , Benson Leung , Todd Broch , Alex Levin , Mattias Nissler , Rajat Jain , Bernie Keany , Aaron Durbin , Diego Rivas , Duncan Laurie , Furquan Shaikh , Jesse Barnes , Christian Kellner , Alex Williamson , Greg Kroah-Hartman , "Oliver O'Halloran" , Saravana Kannan , Suzuki K Poulose , Arnd Bergmann , Heikki Krogerus Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, Thanks for taking a look. On Mon, Jul 6, 2020 at 8:58 AM Bjorn Helgaas wrote: > > On Mon, Jun 29, 2020 at 09:49:37PM -0700, Rajat Jain wrote: > > Currently this is being looked up at a number of places. Read and store= it > > once at bootup so that it can be used by all later. > > Write the commit log so it is complete even without the subject. > Right now, you have to read the subject to know what "this" refers to. > > The subject is like the title; the log is like the body of an article. > The title isn't *part* of the article, so the article has to make > sense all by itself. Fixed. > > > +static void pci_enable_acs(struct pci_dev *dev); > > I don't think we need this forward declaration, do we? We need it unless we move its definition further up in the file: drivers/pci/pci.c: In function =E2=80=98pci_restore_state=E2=80=99: drivers/pci/pci.c:1551:2: error: implicit declaration of function =E2=80=98pci_enable_acs=E2=80=99; did you mean =E2=80=98pci_enable_ats=E2= =80=99? [-Werror=3Dimplicit-function-declaration] 1551 | pci_enable_acs(dev); Do you want me to move it up in the file so that we do not need the forward declaration? > > > @@ -4653,7 +4653,7 @@ static int pci_quirk_intel_spt_pch_acs(struct pci= _dev *dev, u16 acs_flags) > > if (!pci_quirk_intel_spt_pch_acs_match(dev)) > > return -ENOTTY; > > > > - pos =3D pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS); > > + pos =3D dev->acs_cap; > > I assume you verified that all these quirks are FINAL quirks, since > pci_init_capabilities() is called after HEADER quirks. I'll > double-check before applying this. None of these quirks are applied via DECLARE_PCI_FIXUP_*(). All these quirks are called (directly or indirectly) from either pci_enable_acs() or pci_acs_enabled(), EXCEPT pci_idt_bus_quirk(). That one is called from pci_bus_read_dev_vendor_id() which should be called only after the parent bridge has been added and setup correctly. So it looks all good to me. Thanks, Rajat > > Bjorn