Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1853839imu; Wed, 12 Dec 2018 05:34:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/XWQ8e4uTk+lMS6XEvJkVNEBPsahqoypZjZjzFOnzDxZGu6YYSn1I7RKoUXZ+Vo4g1+gexT X-Received: by 2002:a17:902:7c82:: with SMTP id y2mr19621682pll.33.1544621665638; Wed, 12 Dec 2018 05:34:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544621665; cv=none; d=google.com; s=arc-20160816; b=VJ9QMWq6969czyHFSWSEBrliZsYS4QEkmEXy5PpE1hYqBKs2WnTTZYThcbb2KBa2al SLI1WPk9GhGsxzowAgYiSMBXx8KYM8lOKpx8B9LjmiVfqOaMmmw3AcaEvPLsmyaF04V2 i5rowd2rjy0AvTx8he6jDC3vd6xfNTljogzHPL+JyuLfg8Xl7Zfw6UAPQsE3+OcIvCcf C6dK/KoEahM52ywsFKh7XfATqJ8fZLv+C7Ue1k7CYadbw5Thc/EYaVfrKUGOgQzREZGu ECaEbDGce7zD/NZfbH5Fk1018i+Kpg/iGmioQha/AadrfSeQL/wHLRlO364kEK3ggNCw uQRQ== 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=qXfBTq74QS1QlVqVk9ETatW8BNhm8ACEsO5w/xQW2bM=; b=d+9j7krliAUbGh3B/Ok7VrvJ/CbW8GMo5VdXbHkEbyuQ+LQBZPL7oPROEkUmgyPE5E O5Q+IMtIt6ay1mRLwQ2fLeJVczJYnDz7Sb3EKTEvEe7nDETX6oiqk+PDcEcwVODwkZs2 odyU7W0az9hQ9NJ9nSObEHyGxfDSo4WgKiD8UHExSXKaSwyNnwnpFjpOSQomO7NhPFCg uC8OB9HJg6yiYXGvXz1pPdb/ZsLmGe4heiMLsQAx9Eul3/2fOrDXHJzskUPBlc+UqQfe UlCJ8Hni1zCFHYmglyF/2VdrT/z4pWSPWbE7j4KTAH4oXHTKQ3h8+4oOdmAs1vJqs1RO B6tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dt2SxF7k; 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 31si15640835plz.263.2018.12.12.05.33.47; Wed, 12 Dec 2018 05:34:25 -0800 (PST) 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=dt2SxF7k; 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 S1727447AbeLLNbc (ORCPT + 99 others); Wed, 12 Dec 2018 08:31:32 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:35163 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726235AbeLLNbb (ORCPT ); Wed, 12 Dec 2018 08:31:31 -0500 Received: by mail-ed1-f66.google.com with SMTP id x30so15571138edx.2; Wed, 12 Dec 2018 05:31:30 -0800 (PST) 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=qXfBTq74QS1QlVqVk9ETatW8BNhm8ACEsO5w/xQW2bM=; b=dt2SxF7kr6mHPR5jml4+CONXYcNCFqdgnYOWchKwCqqiCLISZLMwL3tPwGaDRrQBF5 V6Ff1Q8VQQKtCkR8vvY8ayurmi2J90qgLNnlLJOxYJcXx6M+Aw/qZuuQnSBT0K6TQ7i6 R7rLgtDob1yHrIK58LRgk9KalqtzA/5PAepS8o2YWW7uZUhvEvDZ8zz7LJ4Gv81mvPls Mh4K7tWafMicUs3XCuU/K/v4t420NPo6BTj2f+z9ZkZGS4O6TFKz2k0ahKKL5Qtb9aRO +feL5N6IL1pbjZQhRaWt3Nf3x5yx4WqtVV98URFCXMrotbtyJH9LnIg3IE+kgQyUf+E3 O7tA== 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=qXfBTq74QS1QlVqVk9ETatW8BNhm8ACEsO5w/xQW2bM=; b=hcL8MWypuGbIEyBWChizC+/Z7JqzLLIaiLGwbLlel4MPdrfmkXRQGAITSnYEaeTTqY jehZ5hiQmxow4l3VAVSP/GiN0HfARMPXLgQ4ESJUHNaZ1qhx4mJ4Kskh4/eLRVWlApqe BhNhGYdtLdgEfMylOw0AFjb7UjvZ/fEFMMRpXrMpGFwbqeTBZpYSiwogryZlIknZ78kV +cH+LAuGJXe1ftPE2J4wngM//+jn3prUPjIGhOj3TdWXKtLrYU2XM+6JRFY+gNC2q3sF XN0r8xE/otq7c+yacy152e46zEqxWZCbMuROeg4kZopSTBz+aACFk+y6/ycnQMS2jhVJ dKFA== X-Gm-Message-State: AA+aEWagO/f8GVEFILNz9oNQZ/ceU6cM0m1+k1A7vHp6SQDVy6syAGC9 TMZnX6wCkjmfITG2zxC5yLE= X-Received: by 2002:a50:9b1d:: with SMTP id o29mr17824671edi.246.1544621489449; Wed, 12 Dec 2018 05:31:29 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id h8sm4845267edb.95.2018.12.12.05.31.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Dec 2018 05:31:28 -0800 (PST) Date: Wed, 12 Dec 2018 14:31:27 +0100 From: Thierry Reding To: Jon Hunter Cc: Stephen Boyd , Arnd Bergmann , Michael Turquette , Peter De Schrijver , Prashant Gaikwad , Dmitry Osipenko , Aapo Vienamo , linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: tegra: fix SMP build Message-ID: <20181212133127.GB28521@ulmo> References: <20181211143528.2024488-1-arnd@arndb.de> <154454887151.17204.5632248748272979028@swboyd.mtv.corp.google.com> <20c5f3a9-fd82-5634-6a1e-6384c0facece@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dTy3Mrz/UPE2dbVg" Content-Disposition: inline In-Reply-To: <20c5f3a9-fd82-5634-6a1e-6384c0facece@nvidia.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --dTy3Mrz/UPE2dbVg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 12, 2018 at 11:47:32AM +0000, Jon Hunter wrote: >=20 > On 11/12/2018 17:21, Stephen Boyd wrote: > > Quoting Arnd Bergmann (2018-12-11 06:35:07) > >> When CONFIG_SMP is disabled, the tegra clk driver now fails to build: > >> > >> drivers/clk/tegra/clk-tegra30.c: In function 'tegra30_cpu_rail_off_rea= dy': > >> drivers/clk/tegra/clk-tegra30.c:1151:19: error: implicit declaration o= f function 'tegra_pmc_cpu_is_powered'; did you mean 'tegra_powergate_is_pow= ered'? [-Werror=3Dimplicit-function-declaration] > >> cpu_pwr_status =3D tegra_pmc_cpu_is_powered(1) || > >> > >> I don't know if tegra works without CONFIG_SMP, but we can get it to > >> build by making the calls conditional, and removing the pointless > >> ifdef around the declaration. The assumption now is that in a > >> non-SMP system, the secondary CPUs are always disabled. > >> > >> Fixes: 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper fun= ction") > >> Signed-off-by: Arnd Bergmann > >> --- > >> Not sure if this is the best solution. If you think it's not, please > >> submit a different fix. > >=20 > > Hmm.. Is there any reason why the implementation of > > tegra_pmc_cpu_is_powered() is under an ifdef CONFIG_SMP? I'd rather not > > have to think about SMP or not in this clk code and have the > > tegra_pmc_cpu_is_powered() function do the UP vs SMP code optimization. >=20 > Not that I know of. I just think that the function should/would not be > used for non-SMP. >=20 > I was actually thinking that we could just leave the clk code as it is > and simply drop the CONFIG_SMP from pmc.h. That would be fine with me. Yeah, I'd be fine keeping that code around whether or not we enable SMP. Chances are people won't disable it anyway. If they do, then most likely only for testing purposes, in which case I'm sure they won't mind the extra couple of bytes. I think if we remove CONFIG_SMP from pmc.h we also need to remove it =66rom drivers/soc/tegra/pmc.c to make sure these functions are available, otherwise we'll likely run into linker errors. Jon, is that something I can interest you in? If not, I can easily do that myself. Thierry --dTy3Mrz/UPE2dbVg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlwRDa8ACgkQ3SOs138+ s6ErqQ//QQ8TEeMrDY6UGU+RVWmBAT861+B/UFDH2amF7nWsdc2tNy6KRyt6E69I tgyq0i3u9evpjM9AxIQPsFMONTaaGzoe3wPsr4AVI+em7q3Ibf6EjJoaJz2JoKbq nY8cjagondItryNeUpPEZ+HHKa2dDvjoe1WQHf8CQwoC+rQ1Zj2VVezSSWm8006o aYLTuRwGpJJBaEB5/zioDtRJ5dDDVmC8Sl3nPbMfwmaK8baXuPfbPQY07rLBGrgq eoa98WEY1SeitDYkFG+RY3u411A3h71WwoFGrcLhoP7U+lJjd2PDqjYHgTU7fmgY tHLjEJ6PdiVSjURbbqj5lfiOL20c6jtkwMWf3XNlFI2+xgC980hjcLomIeYqvCdq 7Kj/ZGQ5EfzM9saSaTBEnynRJexSXhfz2bOZHREyW83aQnh8X+70hzdOQl/XWc/6 qdNN5YUHvJO5vfJ7qMOwkx0uRYe3sSgtN8sU76nfs79rI1QhoytDjXfICNuxFQKH y5tbuHYBB19ijFG3Rm8JtKt1yFkKE3vuakFaLNGvcf+Xv39Rehd1fQ+kEifldEYd y/uolwemubklv4UVgeWq2VgDQdEavu2IA2yjVxGcGLkHA40R8WEmIfBBavFjWVNi zxEEql43bUaH7CkGWHDnjkKIbr9lMku2+ExoaNinGeoWhZOomdM= =3mGj -----END PGP SIGNATURE----- --dTy3Mrz/UPE2dbVg--