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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 CCF70C04E53 for ; Wed, 15 May 2019 16:43:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A6DEC20873 for ; Wed, 15 May 2019 16:43:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726672AbfEOQn2 (ORCPT ); Wed, 15 May 2019 12:43:28 -0400 Received: from foss.arm.com ([217.140.101.70]:48622 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726645AbfEOQn1 (ORCPT ); Wed, 15 May 2019 12:43:27 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 31B9B80D; Wed, 15 May 2019 09:43:27 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 870C83F703; Wed, 15 May 2019 09:43:25 -0700 (PDT) Date: Wed, 15 May 2019 17:41:10 +0100 From: Lorenzo Pieralisi To: Robin Murphy Cc: Will Deacon , Kefeng Wang , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, guohanjun@huawei.com, Jean-Philippe Brucker , Hulk Robot , joro@8bytes.org Subject: Re: [PATCH RESEND] ACPI/IORT: Fix build error when IOMMU_SUPPORT disabled Message-ID: <20190515164110.GA22536@e121166-lin.cambridge.arm.com> References: <20190515033406.79020-1-wangkefeng.wang@huawei.com> <20190515034253.79348-1-wangkefeng.wang@huawei.com> <20190515101534.GF24357@fuggles.cambridge.arm.com> <20190515120652.GA27269@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, May 15, 2019 at 01:46:28PM +0100, Robin Murphy wrote: > On 15/05/2019 13:06, Lorenzo Pieralisi wrote: > > [+Joerg, Robin] > > > > On Wed, May 15, 2019 at 11:15:34AM +0100, Will Deacon wrote: > > > On Wed, May 15, 2019 at 11:42:53AM +0800, Kefeng Wang wrote: > > > > drivers/acpi/arm64/iort.c: In function iort_iommu_configure: > > > > drivers/acpi/arm64/iort.c:1079:21: error: struct iommu_fwspec has no member named flags > > > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > > > ^~ > > > > drivers/acpi/arm64/iort.c:1079:32: error: IOMMU_FWSPEC_PCI_RC_ATS > > > > undeclared (first use in this function) > > > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > > > ^~~~~~~~~~~~~~~~~~~~~~~ > > > > drivers/acpi/arm64/iort.c:1079:32: note: each undeclared identifier is reported only once for each function it appears in > > > > > > > > If IOMMU_SUPPORT not enabled, struct iommu_fwspec without members and > > > > IOMMU_FWSPEC_PCI_RC_ATS not defined, add new iommu_fwspec_set_ats_flags() > > > > to set IOMMU_FWSPEC_PCI_RC_ATS flags to solve build error. > > > > > > > > Cc: Jean-Philippe Brucker > > > > Cc: Lorenzo Pieralisi > > > > Cc: Will Deacon > > > > Reported-by: Hulk Robot > > > > > > What's this "Hulk Robot"? Does it report things publicly? > > > > AFAIK it is Huawei CI system, I had some doubts about leaving > > that tag for other patches I dealt with, I am not sure it is > > really useful (other than giving Hulk some credit). > > > > > Anyway, I can pick this up if Lorenzo acks it. > > > > Actually I think we should compile out iort_iommu_configure() for > > !IOMMU_SUPPORT unless I am missing something, so that we are > > removing this source of errors. > > Indeed, much as I like the compile coverage of not having things #ifdefed > out in general, this particular case seems like a fairly atypical > configuration so I'm not sure all the extra fluff of struct accessors is > really worth it. Ok, I will send a patch shortly to address this issue, if Kefeng does not object I will drop the CI bot as reporter and add him instead. Thanks, Lorenzo > > Robin. > > > If that does not cut it, for this patch: > > > > iommu_fwspec_set_ats_flags() should be iommu_fwspec_set_ats_flag() > > > > The commit log should be fixed (it is pretty weird to start with the > > build error and then explain it): > > > > "If IOMMU_SUPPORT is not enabled, struct iommu_fwspec is an empty > > struct and IOMMU_FWSPEC_PCI_RC_ATS is not defined, resulting in > > the following build error: > > > > drivers/acpi/arm64/iort.c: In function iort_iommu_configure: > > drivers/acpi/arm64/iort.c:1079:21: error: struct iommu_fwspec has no member named flags > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > ^~ > > drivers/acpi/arm64/iort.c:1079:32: error: IOMMU_FWSPEC_PCI_RC_ATS > > undeclared (first use in this function) > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > ^~~~~~~~~~~~~~~~~~~~~~~ > > drivers/acpi/arm64/iort.c:1079:32: note: each undeclared identifier is reported only once for each function it appears in > > > > Add a iommu_fwspec_set_ats_flag() helper function (that is an empty > > stub on !IOMMU_SUPPORT) to fix it." > > 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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 8B103C04E53 for ; Wed, 15 May 2019 16:43:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E0D320873 for ; Wed, 15 May 2019 16:43:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bdANAfUx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E0D320873 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fpBXbxPXJ/wabf8W0JUcnTFiRxQhCOLMj4Ute+aVizg=; b=bdANAfUxZsNd7a 1GD9JdlgIw51Ks2xzn8qSO5vBWBqnhOqAVqIB+LpGvZHUcOXxgd2Vhcsn07nJXTog6tm0w7Mc/tr3 EBXvyDbB0IPpwj64uMi6Gs7B+fRB9L8JRSvChp4DT84u+K7djfa3s9z+ePwg6tW1Cl9mhsTbGpVCg p2/gyy9w6mQOrIbmgYruq2Qoyg771VkDjr3YBKn6q89Dx7JljafNo8ypq3KUlCIkeCqbSOVIPyAwj TZoqWtOUUjHeU4tPt5rII+tSvjlqEQr+zzCTAFVvu1tsYWLr3nobsJRAetOIXIVCurAgr/xL++DOG RapEkmDsK6I6w9j+F8Ew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQx07-0007kJ-Qy; Wed, 15 May 2019 16:43:31 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQx03-0007jz-R5 for linux-arm-kernel@lists.infradead.org; Wed, 15 May 2019 16:43:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 31B9B80D; Wed, 15 May 2019 09:43:27 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 870C83F703; Wed, 15 May 2019 09:43:25 -0700 (PDT) Date: Wed, 15 May 2019 17:41:10 +0100 From: Lorenzo Pieralisi To: Robin Murphy Subject: Re: [PATCH RESEND] ACPI/IORT: Fix build error when IOMMU_SUPPORT disabled Message-ID: <20190515164110.GA22536@e121166-lin.cambridge.arm.com> References: <20190515033406.79020-1-wangkefeng.wang@huawei.com> <20190515034253.79348-1-wangkefeng.wang@huawei.com> <20190515101534.GF24357@fuggles.cambridge.arm.com> <20190515120652.GA27269@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190515_094327_887174_FF1F4711 X-CRM114-Status: GOOD ( 22.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang , Hulk Robot , Jean-Philippe Brucker , joro@8bytes.org, Will Deacon , linux-acpi@vger.kernel.org, guohanjun@huawei.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 15, 2019 at 01:46:28PM +0100, Robin Murphy wrote: > On 15/05/2019 13:06, Lorenzo Pieralisi wrote: > > [+Joerg, Robin] > > > > On Wed, May 15, 2019 at 11:15:34AM +0100, Will Deacon wrote: > > > On Wed, May 15, 2019 at 11:42:53AM +0800, Kefeng Wang wrote: > > > > drivers/acpi/arm64/iort.c: In function iort_iommu_configure: > > > > drivers/acpi/arm64/iort.c:1079:21: error: struct iommu_fwspec has no member named flags > > > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > > > ^~ > > > > drivers/acpi/arm64/iort.c:1079:32: error: IOMMU_FWSPEC_PCI_RC_ATS > > > > undeclared (first use in this function) > > > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > > > ^~~~~~~~~~~~~~~~~~~~~~~ > > > > drivers/acpi/arm64/iort.c:1079:32: note: each undeclared identifier is reported only once for each function it appears in > > > > > > > > If IOMMU_SUPPORT not enabled, struct iommu_fwspec without members and > > > > IOMMU_FWSPEC_PCI_RC_ATS not defined, add new iommu_fwspec_set_ats_flags() > > > > to set IOMMU_FWSPEC_PCI_RC_ATS flags to solve build error. > > > > > > > > Cc: Jean-Philippe Brucker > > > > Cc: Lorenzo Pieralisi > > > > Cc: Will Deacon > > > > Reported-by: Hulk Robot > > > > > > What's this "Hulk Robot"? Does it report things publicly? > > > > AFAIK it is Huawei CI system, I had some doubts about leaving > > that tag for other patches I dealt with, I am not sure it is > > really useful (other than giving Hulk some credit). > > > > > Anyway, I can pick this up if Lorenzo acks it. > > > > Actually I think we should compile out iort_iommu_configure() for > > !IOMMU_SUPPORT unless I am missing something, so that we are > > removing this source of errors. > > Indeed, much as I like the compile coverage of not having things #ifdefed > out in general, this particular case seems like a fairly atypical > configuration so I'm not sure all the extra fluff of struct accessors is > really worth it. Ok, I will send a patch shortly to address this issue, if Kefeng does not object I will drop the CI bot as reporter and add him instead. Thanks, Lorenzo > > Robin. > > > If that does not cut it, for this patch: > > > > iommu_fwspec_set_ats_flags() should be iommu_fwspec_set_ats_flag() > > > > The commit log should be fixed (it is pretty weird to start with the > > build error and then explain it): > > > > "If IOMMU_SUPPORT is not enabled, struct iommu_fwspec is an empty > > struct and IOMMU_FWSPEC_PCI_RC_ATS is not defined, resulting in > > the following build error: > > > > drivers/acpi/arm64/iort.c: In function iort_iommu_configure: > > drivers/acpi/arm64/iort.c:1079:21: error: struct iommu_fwspec has no member named flags > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > ^~ > > drivers/acpi/arm64/iort.c:1079:32: error: IOMMU_FWSPEC_PCI_RC_ATS > > undeclared (first use in this function) > > dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; > > ^~~~~~~~~~~~~~~~~~~~~~~ > > drivers/acpi/arm64/iort.c:1079:32: note: each undeclared identifier is reported only once for each function it appears in > > > > Add a iommu_fwspec_set_ats_flag() helper function (that is an empty > > stub on !IOMMU_SUPPORT) to fix it." > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel