Message ID | 20230705104824.174396-1-alistair@alistair23.me |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1802878vqx; Wed, 5 Jul 2023 04:41:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlGm7ZMUy+KHcm+q3dWahtrUhZBKVYY9ICLDSmRoFP6AeC/BVgudQTQs3mcTHCJTRZhxbGN7 X-Received: by 2002:a25:14c4:0:b0:c41:415b:5792 with SMTP id 187-20020a2514c4000000b00c41415b5792mr13937454ybu.35.1688557296482; Wed, 05 Jul 2023 04:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688557296; cv=none; d=google.com; s=arc-20160816; b=PJogo8fBntPSCaVv2H6ASK9GvO6nXMEyT7+H2o6cWT0vLUV9bGZdnl4KWvLSYqzfSt qb6kR9QioXuAmZnS+e3loGE6eXRUCzCx6bgD7wgdZUneRUkkvYGJHe/aj3droMMN6Y5x fuQJzBqZUicdJkx66XAAQEAZipXVQZesn82+d5yY6VfR6RXQPQZEaM9s2XKSbqJGa4HZ OPhGk0Dl8YVgtC/lueXVZAVTZT1G0Y3xIb2uoZ7eXuakkUm+eAttOunZirvA+caaGfi8 N1S8TAhmt/oB87VADPsEZJ2zG0cbXZGc4cUV/EsL1uGDxK50fE2uclL5D7k7aKuvRHOp BvFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=bm1rZDhTtyYs6D2nwqafptF7MtTTmEoZYqei0YwqitQ=; fh=+o9PpJprrSk37r1VIMFVHhOJy8HuKU7rjcgSl7i8KwU=; b=yX5A7VFyEzX1PVnk00yHvkHCohaLH6TWHW0MFmuZzaeeb/u53hFsVJ/Ibo94wlG/gh cWkNBF7i0hFurHnWSqwxGa20m6/ou5YNerKThkd8YfLeUk3TC5+KX/QLaOxb+N8XEtUX 2mGnYbLciAe7ni/WopLMLUdJVENH+UEJHUoZklEgOe7py3MRd4rvVXbra+5Blm5YiKoH W87DlM3JALgTzlBHxCCYOps19zF6rrAUtieRiSNzQV3MZ+lDtRVSvatQ/xykPSgPqRV0 tHtiO/gLyfXCCMeDDLoWtIOjtt9C6msVKMJ0PYLnosHm5uBkyr8klzmMlH38mfQUteen keoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm2 header.b=ciOCYmh1; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=XmEqP7yO; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a63610a000000b0055bce775e67si2459416pgb.159.2023.07.05.04.41.21; Wed, 05 Jul 2023 04:41:36 -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=@alistair23.me header.s=fm2 header.b=ciOCYmh1; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=XmEqP7yO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232235AbjGEKs7 (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 06:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232212AbjGEKsz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Jul 2023 06:48:55 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AF46171A; Wed, 5 Jul 2023 03:48:53 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A7D215C02B0; Wed, 5 Jul 2023 06:48:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 05 Jul 2023 06:48:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm2; t=1688554132; x=1688640532; bh=bm 1rZDhTtyYs6D2nwqafptF7MtTTmEoZYqei0YwqitQ=; b=ciOCYmh1a7/03nnbDK XYTb4WI+eqF88UGTIfzfrP1O3/bT+y4I4MlW5bbu9X7m4BA0kUyYWvgpr7rs7PpJ sghd6RF+Zq0EG7m00DOtd9KwTtjdTA3hei4Srw5R32CFWC5jJvQz/oMVxQ728IId 7ow56qohaSAkVzue05PLENxQvRuIygwDWSmlEnUAw46R4OZHJTuWNno6wyrPf8bP cTGJPKzBnhHK3BGa1OZNVhNFHvdpYjnf0zc0SiAQpbUBOXNKtzwk+dihnHf96n03 ggPdLDFZ4cSbZWzE3h3974jvMhu7nOzBLIAn2nQN6bORdicQN5pWK3hU2XD1F4yc wAEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688554132; x=1688640532; bh=bm1rZDhTtyYs6 D2nwqafptF7MtTTmEoZYqei0YwqitQ=; b=XmEqP7yOa1x166q6mPPd1phvptpD2 NOs3Psw4ipDLyNMydkAHtNABMU/WMABF9QTe0Plkl+7mCA2j/wtBssjPlZMkdPxN DiGwZVNk414ykSDQ9VDiNrg7Zab96tq96ZGCSqTnEwmidTCez4bqmrunfpnTVLcl sGIdjTBMxihr4FrJINv1wd9X3W0UNsSZkEQ8ypn5KWJMaqP+uRlVOLAEYLyr+8BU DWKE4Q1Sp9sTXnC+ELOAG7LWBhzFQkWpXGzruhkViFJBEEYR7fgY9mACzgMffdmj wbYaG0GNsDihZ7yw8FJNBW0lCB04H1EmmOeMBsoNXRoXvYUr2pvUGzFxw== X-ME-Sender: <xms:lEqlZD4Ddys2jNn7V7mqgwRpt1ZNtm43fGgc4ygV-vaV9TvZrfDAOg> <xme:lEqlZI4xtHfag1qIu_QzEMN1vYFDA5csLj0Q4OB_7JpiKHYMA7-ry5uQMPjV6xf3c B6tzDcrpHDqEp-An0Y> X-ME-Received: <xmr:lEqlZKcFh6ZUTXtpin9hFucjo5j0aqSNigaVqaYUgIywtW8gZ4GdgS8pTnLVWllR0ZFBFLEN6HZO> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeigdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekredtre dttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhr segrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeegheejueehgeekje ffjeehhfejieelfeduudfhgeetieegueehvdeftefhgffhtdenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsth grihhrvdefrdhmvg X-ME-Proxy: <xmx:lEqlZELeaIMsF5xt7nxfutUsfFTyT0CYGUzq8LnjO67axMtWc7Etzw> <xmx:lEqlZHKycYjI6vLYlq6t_7xosKOSm5CKhjwMlkyNtK87a3pLcTKRsg> <xmx:lEqlZNwCuhy5g82QHGToJuyECoeBPlzS2A-wic2-HTAGB0TSassdCA> <xmx:lEqlZEDFUbSZFymqdjw6zOYC6k1_r_TikdEwILEDAP9OYRHnnYKIAA> Feedback-ID: ifd214418:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Jul 2023 06:48:45 -0400 (EDT) From: Alistair Francis <alistair@alistair23.me> To: marek.vasut+renesas@gmail.com, yoshihiro.shimoda.uh@renesas.com, linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, alistair23@gmail.com, dlemoal@kernel.org, Alistair Francis <alistair@alistair23.me> Subject: [PATCH] PCI: rcar-ep: Include linux/pci-epf.h instead of linux/pci-epc.h Date: Wed, 5 Jul 2023 20:48:24 +1000 Message-ID: <20230705104824.174396-1-alistair@alistair23.me> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <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?1770580655820228923?= X-GMAIL-MSGID: =?utf-8?q?1770580655820228923?= |
Series |
PCI: rcar-ep: Include linux/pci-epf.h instead of linux/pci-epc.h
|
|
Commit Message
Alistair Francis
July 5, 2023, 10:48 a.m. UTC
pci-epc.h doesn't define the members of the pci_epf_header struct, so
trying to access them results in errors like this:
error: invalid use of undefined type 'struct pci_epf_header'
167 | val = hdr->vendorid;
Instead let's include pci-epf.h which not only defines the
pci_epf_header but also includes pci-epc.h.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
drivers/pci/controller/pcie-rcar-ep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 7/5/23 19:48, Alistair Francis wrote: > pci-epc.h doesn't define the members of the pci_epf_header struct, so > trying to access them results in errors like this: > > error: invalid use of undefined type 'struct pci_epf_header' > 167 | val = hdr->vendorid; > > Instead let's include pci-epf.h which not only defines the > pci_epf_header but also includes pci-epc.h. > > Signed-off-by: Alistair Francis <alistair@alistair23.me> It is odd that the the build bot did not detect this... Looks good. Reviewed-by: Damien Le Moal <dlemoal@kernel.org> > --- > drivers/pci/controller/pcie-rcar-ep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/pcie-rcar-ep.c b/drivers/pci/controller/pcie-rcar-ep.c > index f9682df1da61..5afc91d11eef 100644 > --- a/drivers/pci/controller/pcie-rcar-ep.c > +++ b/drivers/pci/controller/pcie-rcar-ep.c > @@ -10,7 +10,7 @@ > #include <linux/of_address.h> > #include <linux/of_platform.h> > #include <linux/pci.h> > -#include <linux/pci-epc.h> > +#include <linux/pci-epf.h> > #include <linux/platform_device.h> > #include <linux/pm_runtime.h> >
Hello, > > pci-epc.h doesn't define the members of the pci_epf_header struct, so > > trying to access them results in errors like this: > > > > error: invalid use of undefined type 'struct pci_epf_header' > > 167 | val = hdr->vendorid; > > > > Instead let's include pci-epf.h which not only defines the > > pci_epf_header but also includes pci-epc.h. [...] > It is odd that the the build bot did not detect this... This is a bit of a surprise to me too, especially since none of the usual bots pick this up, and I can't seem to find such a failure in the nightly CI logs either. Alistair, how did you stumble into this issue? Also, which version or a tree would that be? Thank you! Krzysztof
On Wed, Jul 5, 2023 at 9:44 PM Krzysztof Wilczyński <kw@linux.com> wrote: > > Hello, > > > > pci-epc.h doesn't define the members of the pci_epf_header struct, so > > > trying to access them results in errors like this: > > > > > > error: invalid use of undefined type 'struct pci_epf_header' > > > 167 | val = hdr->vendorid; > > > > > > Instead let's include pci-epf.h which not only defines the > > > pci_epf_header but also includes pci-epc.h. > > [...] > > It is odd that the the build bot did not detect this... > > This is a bit of a surprise to me too, especially since none of the usual > bots pick this up, and I can't seem to find such a failure in the nightly > CI logs either. > > Alistair, how did you stumble into this issue? Also, which version or > a tree would that be? I was building the kernel with this defconfig [1] inside OpenEmbedded. It was the 6.4-rc7 kernel, specifically this one [2]. 1: https://github.com/damien-lemoal/buildroot/blob/rockpro64_ep_v23/board/pine64/rockpro64_ep/linux.config 2: https://github.com/damien-lemoal/linux/tree/rockpro64_ep_v23 Alistair > > Thank you! > > Krzysztof
Hello, > > > > pci-epc.h doesn't define the members of the pci_epf_header struct, so > > > > trying to access them results in errors like this: > > > > > > > > error: invalid use of undefined type 'struct pci_epf_header' > > > > 167 | val = hdr->vendorid; > > > > > > > > Instead let's include pci-epf.h which not only defines the > > > > pci_epf_header but also includes pci-epc.h. > > > > [...] > > > It is odd that the the build bot did not detect this... > > > > This is a bit of a surprise to me too, especially since none of the usual > > bots pick this up, and I can't seem to find such a failure in the nightly > > CI logs either. > > > > Alistair, how did you stumble into this issue? Also, which version or > > a tree would that be? > > I was building the kernel with this defconfig [1] inside OpenEmbedded. > It was the 6.4-rc7 kernel, specifically this one [2]. > > 1: https://github.com/damien-lemoal/buildroot/blob/rockpro64_ep_v23/board/pine64/rockpro64_ep/linux.config > 2: https://github.com/damien-lemoal/linux/tree/rockpro64_ep_v23 Thank you! Much appreciated. So, the vanilla kernel does not have headers arranged like this custom tree that Damien maintains for his own needs, per: - https://elixir.bootlin.com/linux/v6.4-rc7/source/include/linux/pci-epc.h - https://elixir.bootlin.com/linux/v6.4-rc7/source/include/linux/pci-epf.h I suppose, there are some changes that break it for you, for example: https://github.com/damien-lemoal/linux/commit/c7aa8ddd76a141b975a097532050a76c6a58c436 So, I cannot take this patch as it would break vanilla kernel for us. :) Try building using vanilla kernel, and see if that helps. Krzysztof
On 7/5/23 22:15, Krzysztof Wilczyński wrote: > Hello, > >>>>> pci-epc.h doesn't define the members of the pci_epf_header struct, so >>>>> trying to access them results in errors like this: >>>>> >>>>> error: invalid use of undefined type 'struct pci_epf_header' >>>>> 167 | val = hdr->vendorid; >>>>> >>>>> Instead let's include pci-epf.h which not only defines the >>>>> pci_epf_header but also includes pci-epc.h. >>> >>> [...] >>>> It is odd that the the build bot did not detect this... >>> >>> This is a bit of a surprise to me too, especially since none of the usual >>> bots pick this up, and I can't seem to find such a failure in the nightly >>> CI logs either. >>> >>> Alistair, how did you stumble into this issue? Also, which version or >>> a tree would that be? >> >> I was building the kernel with this defconfig [1] inside OpenEmbedded. >> It was the 6.4-rc7 kernel, specifically this one [2]. >> >> 1: https://github.com/damien-lemoal/buildroot/blob/rockpro64_ep_v23/board/pine64/rockpro64_ep/linux.config >> 2: https://github.com/damien-lemoal/linux/tree/rockpro64_ep_v23 > > Thank you! Much appreciated. > > So, the vanilla kernel does not have headers arranged like this custom tree > that Damien maintains for his own needs, per: > > - https://elixir.bootlin.com/linux/v6.4-rc7/source/include/linux/pci-epc.h > - https://elixir.bootlin.com/linux/v6.4-rc7/source/include/linux/pci-epf.h > > I suppose, there are some changes that break it for you, for example: > > https://github.com/damien-lemoal/linux/commit/c7aa8ddd76a141b975a097532050a76c6a58c436 Arg ! Yes, my bad ! The patches in this tree are a work-in-progress and I am waiting for 6.5-rc1 to rebase everything and re-testing before posting them. This is all tested using the rockchip-ep controller and I did not compile test other controllers. I will make sure to do that before posting :) Apologies for the noise. > > So, I cannot take this patch as it would break vanilla kernel for us. :) > > Try building using vanilla kernel, and see if that helps. > > Krzysztof
On Wed, Jul 5, 2023 at 11:15 PM Krzysztof Wilczyński <kw@linux.com> wrote: > > Hello, > > > > > > pci-epc.h doesn't define the members of the pci_epf_header struct, so > > > > > trying to access them results in errors like this: > > > > > > > > > > error: invalid use of undefined type 'struct pci_epf_header' > > > > > 167 | val = hdr->vendorid; > > > > > > > > > > Instead let's include pci-epf.h which not only defines the > > > > > pci_epf_header but also includes pci-epc.h. > > > > > > [...] > > > > It is odd that the the build bot did not detect this... > > > > > > This is a bit of a surprise to me too, especially since none of the usual > > > bots pick this up, and I can't seem to find such a failure in the nightly > > > CI logs either. > > > > > > Alistair, how did you stumble into this issue? Also, which version or > > > a tree would that be? > > > > I was building the kernel with this defconfig [1] inside OpenEmbedded. > > It was the 6.4-rc7 kernel, specifically this one [2]. > > > > 1: https://github.com/damien-lemoal/buildroot/blob/rockpro64_ep_v23/board/pine64/rockpro64_ep/linux.config > > 2: https://github.com/damien-lemoal/linux/tree/rockpro64_ep_v23 > > Thank you! Much appreciated. > > So, the vanilla kernel does not have headers arranged like this custom tree > that Damien maintains for his own needs, per: > > - https://elixir.bootlin.com/linux/v6.4-rc7/source/include/linux/pci-epc.h > - https://elixir.bootlin.com/linux/v6.4-rc7/source/include/linux/pci-epf.h > > I suppose, there are some changes that break it for you, for example: > > https://github.com/damien-lemoal/linux/commit/c7aa8ddd76a141b975a097532050a76c6a58c436 > > So, I cannot take this patch as it would break vanilla kernel for us. :) Urgh! Sorry about that. I should have double checked if it was an issue upstream. Thanks for looking into it though Alistair > > Try building using vanilla kernel, and see if that helps. > > Krzysztof
diff --git a/drivers/pci/controller/pcie-rcar-ep.c b/drivers/pci/controller/pcie-rcar-ep.c index f9682df1da61..5afc91d11eef 100644 --- a/drivers/pci/controller/pcie-rcar-ep.c +++ b/drivers/pci/controller/pcie-rcar-ep.c @@ -10,7 +10,7 @@ #include <linux/of_address.h> #include <linux/of_platform.h> #include <linux/pci.h> -#include <linux/pci-epc.h> +#include <linux/pci-epf.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h>