Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5933652yba; Thu, 11 Apr 2019 08:39:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqziteueA7xkLmvuWiP1vFc5clp6e2vKC+96AvqglGm853bA7isylmNDZPhRMlKYhO/yOIbW X-Received: by 2002:a17:902:9a0c:: with SMTP id v12mr24206201plp.184.1554997162157; Thu, 11 Apr 2019 08:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554997162; cv=none; d=google.com; s=arc-20160816; b=JDwszQcbxHSs9tWCEExy38/CLfbOcxKLsi1lyg3qCYw37gYbZmL7cdihCwkDZR8CyS 2j3i1Ya77y6BbccRVDl1yB+aqZtoKQRoJzi3+49KorN4U0o0+JGiLKB28mTtQVuSrjF+ cDju95qn9hbwSgHZe5NaCoTDQjNSJcayAmcdrr7wujL8o1bZg97UL9zpPwTzVporMgfZ ayHiGIV+p+OxWfyS6Qzn/JstCOhAhhpPDakDla/K6Q9poqpZFst24Y4te7TfhDHwGwP+ /uVcbQrpWx/j0vOZu65LopBHTVh7WraCyMSRBMZ27zlBThJvSOdXJM/innhTyOci5hSp 0qvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0So01Pry3YdL2r7Mdo9RFJrZmUA+PyyXGaj77JHEnSU=; b=VeSwuUfxAKzyO22iHbc648TzFxPyIVQ6ZK9qBiFZLzERB2Sxb4P8V1GvozgxIwHcQj JQIWtwVpcmO26YJQZJmdJBJEMye1uB7HZitg/VbrJ+kTfuH5P/PzBgMajP6Ken4ka7dX HyY5Zkfm//Zi14Q7EeKxaXW5SqnhjwvKcKdaJVQhnN7d1CEdR1Z+myRUAYC2BLF5D1sj q+0g/0R5qkAwCvrZCtxke5kJ0R9Xh5uNASxo/6YWQYYsjFuXbUvlUuOGVoJhkEt34Hr9 3jsazidVKvTf6j2gQ3eKR7TO8c4JGRXn8p3psTiZ0NhmIp51OO12++0QWuML7I1NOqey 6iTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iB6Lf8iL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si29775479pgt.35.2019.04.11.08.39.05; Thu, 11 Apr 2019 08:39:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iB6Lf8iL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726828AbfDKPhG (ORCPT + 99 others); Thu, 11 Apr 2019 11:37:06 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39283 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbfDKPhF (ORCPT ); Thu, 11 Apr 2019 11:37:05 -0400 Received: by mail-wm1-f66.google.com with SMTP id n25so7244666wmk.4; Thu, 11 Apr 2019 08:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0So01Pry3YdL2r7Mdo9RFJrZmUA+PyyXGaj77JHEnSU=; b=iB6Lf8iLaAEV2wXY7TnHXOqjK76bFxIr09IYIheCheJeof7doBSZM0L4mSR41s08vm 6fzRS/Y1dm1HdwizNsjtL/WBLTE3kKe7fuSp/h90zlaP25Y5I/48vKBbDReinKVP84jv hH5qjw+RrEsOlN+81W6sXsjGHNrahjwW9gohYwXG2kEE3PTGNnp7NUwcK1YKZww9Jb4w czWiwanxG0U0Dj1Ma6tcLpyE04DyFpmmqqYEOZRdq7YZ9jRNshSQCqsy3znVSlh5NkI0 UCZ/V8543JqAMOfc9wFFd2WAuZjjHrMQW7/2h5NTaFZc8OdtQveozl+vEa8J88kNZGCP 9A3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0So01Pry3YdL2r7Mdo9RFJrZmUA+PyyXGaj77JHEnSU=; b=BZdavXcRdJsfxoCYCz4vimNaPhcY2hgBmkng7/0IEInRQC9V7aYfaWjiPxbG7/Mdvb +l3Yn56+g8Yf6wsvFJOH5kn9kvCMExi81B0rLF81RWiniGbkHxmIcs3gE25Lz27VNdUf cuF8uDPNsruFgV3r1rhH3Fhw0kXvsxj84Mywf0jRLG893M5vm3OQqCzC7bVb8Aefp+H1 cWCyyUTph4c5d0Bl+UUSlbpDKsbmXcnVGF1j3EQsyI/StAyR14sv6UOi349GlOevGzjp 3+3Czs0N4vltG57KtVNCDejcTyJuN0rXztaGyqH0FUeGGODWT3nLMFpAbifFYNL8i2e+ F9UQ== X-Gm-Message-State: APjAAAWZ7AeauOS7m+YbxhY7Jj5U/e9zrf43GxlZa+s2T5m4yN6Dq6Uy ZJCJyFcnXmW3gzz+5won8ik= X-Received: by 2002:a1c:80c1:: with SMTP id b184mr7208364wmd.109.1554997023110; Thu, 11 Apr 2019 08:37:03 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id y132sm6922583wmg.38.2019.04.11.08.37.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2019 08:37:02 -0700 (PDT) Date: Thu, 11 Apr 2019 17:37:01 +0200 From: Thierry Reding To: Dmitry Osipenko Cc: Mikko Perttunen , Ben Dooks , Stefan Agner , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-tegra-owner@vger.kernel.org Subject: Re: [PATCH] gpu: host1x: fix compile error when IOMMU API is not available Message-ID: <20190411153701.GA30800@ulmo> References: <4c3d021c73c001f633803e364cfbc6ace3381205.1554936354.git.stefan@agner.ch> <7371b1573ddd0b127713724ef5051a6f@codethink.co.uk> <20190411083017.GB4633@ulmo> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gKMricLos+KVdGMg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 11, 2019 at 02:31:48PM +0300, Dmitry Osipenko wrote: > 11.04.2019 13:06, Mikko Perttunen =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > On 11.4.2019 11.30, Thierry Reding wrote: > >> On Thu, Apr 11, 2019 at 09:23:13AM +0100, Ben Dooks wrote: > >>> > >>> > >>> On 2019-04-10 23:47, Stefan Agner wrote: > >>>> In case the IOMMU API is not available compiling host1x fails with > >>>> the following error: > >>>> =C2=A0=C2=A0 In file included from drivers/gpu/host1x/hw/host1x06.c:= 27: > >>>> =C2=A0=C2=A0 drivers/gpu/host1x/hw/channel_hw.c: In function > >>>> =E2=80=98host1x_channel_set_streamid=E2=80=99: > >>>> =C2=A0=C2=A0 drivers/gpu/host1x/hw/channel_hw.c:118:30: error: impli= cit > >>>> declaration of function > >>>> =C2=A0=C2=A0=C2=A0=C2=A0 =E2=80=98dev_iommu_fwspec_get=E2=80=99; did= you mean =E2=80=98iommu_fwspec_free=E2=80=99? > >>>> [-Werror=3Dimplicit-function-declaration] > >>>> =C2=A0=C2=A0 struct iommu_fwspec *spec =3D > >>>> dev_iommu_fwspec_get(channel->dev->parent); > >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~~~~~~~~~~~~ > >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 iommu_fwspec_free > >>>> > >>>> Fixes: de5469c21ff9 ("gpu: host1x: Program the channel stream ID") > >>>> Signed-off-by: Stefan Agner > >>> > >>> would it be better to provide something like this i nthe header that > >>> defines dev_iommu_fwspec_get() to be: > >>> > >>> static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device= *dev) > >>> { return NULL; } > >>> > >>> although returning an PTR_ERR would have been better. > >> > >> I don't think there's really a large number of failures here. Either > >> your device has an IOMMU fwspec or it doesn't. > >> > >> But yes, I think it'd be better to have the above static inline dummy = in > >> iommu.h, but I'll apply this for now in the hopes of getting it in > >> before v5.1 final. > >=20 > > A similar patch was already sent before by someone. That one also progr= ams the bypass stream ID (0x7f) even if IOMMU is disabled. We should pick t= hat patch instead. >=20 > For the record.. here is that patch https://patchwork.ozlabs.org/patch/10= 52364/ Ugh... too late. I'll apply Arnd's patch on top of this one. Thierry --gKMricLos+KVdGMg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlyvXxgACgkQ3SOs138+ s6HqaQ/+L1ZIgrilwmTjL3NoeC6kmTLKTR22Ea8RlW9yfbEnsSCuByBSTuVEaaPt QiivsmNnlTlqFNnuMtPZ8j9QlXUbYfN2Fa7s0PmFdsoGhOnRpPiWGDn1t0xFm2hi m/1tRxnn2GCywrltgq/wMrC2QQPhuaYbRH3FjthkejILM2+42TT6w7YC3xR73jvS qLtOfQAb3Jf1Ovd+pzJgE05s7hcoPg+GTujHnidYx8+I30w4MJSTObWYeqLRvPBb /BchKKgw4jpz+L9GhI5S5iO47wD0xjGX726d/PAPfKxQCgTyjmUQVr23zwaUaPgH wFcwmV2B18ZrHfBaviM+2KY+HWgBGVkH29nEiaaKOpUGPTl2lDvTY+J4eafIydpZ TB21wQF22F5v/PNJ083GAMksQszwVweY4FrqyFJFvQ6r+DaVg6ad7qtznpBcOFJn ve5jKPAR5cUrP+aI2iiaSkpU8jMS801/EIvt5xYeAl3i1t4JOq4YUz0OX3b5+Fph 7IKwAeVECxabQolH208X8yaOJSvCDB2ZszS39sA+IKz66EK5tgy8fcrwj6FLmbtN EtfVs6FZIxcaN5ZvocNyR0zmLStVU7Tnqz71Rh6m1qJK0Ma4tQtcemJ41MrsoRD1 BgX5l+ZSzbScWwiY5avMi6msVgIpTBjXnns3lIBvoz3sTOPNQFI= =4M++ -----END PGP SIGNATURE----- --gKMricLos+KVdGMg--