Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2094157imu; Wed, 12 Dec 2018 09:22:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQCnp40RznhvM/AtSV5QJLEnfGhYd6xC4qfFBhI2qpQpKuiSkY5YnOPEFBUpNVDjZ96eWQ X-Received: by 2002:a63:4a0a:: with SMTP id x10mr18867766pga.237.1544635348259; Wed, 12 Dec 2018 09:22:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544635348; cv=none; d=google.com; s=arc-20160816; b=k6uqIgkIa5G5aTrB6TpyGCPjfzBRI1tPCGAA3LXyxJjlk2dhqDAUyCwEFB/CPOcdkL DYFdwjdxxbn3bFEOwlmEvnxAvpXLLj11fyPHp13qOQVaNdIfiAcG0B4S5vWf5Qj48nKW ZbyyZi+2se2uKGRY43LXvYYHmNcnnD1P8f1jp/GfhGcgo8CTHQMls7dkYWS4YsBf4Uus 4sK3omAdeNsmbLUQRxyAlB3l+fy67epU1skcFtY4yWjnuhFOfNCr5vXi2ZZDQWkHj4RM e6x4KGU1YgIBwmcjUxI/hs5ykZA8ro7kLb7ZdljFQ4+cKRf5FaiIdMv7sWZGHxVqrnX/ 4Vlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=EdWPURH0VuJDcNL7ocd8BmW+oUqW8bQRG9151sIcou8=; b=zYZWKE7ly4McAzst3WVxCZXFlDVmU0bOUF/H5NyVUPCeYOPhp2LYemrJBTImiy7xNM YS63621PgezHrZDRWVzzs1egv8F4X6t3hd8T5208hiHjqgbP4VbORZ3hx4V/xGDf68ZJ MdHtyHMyo79ieTJY9F5JTUP82A/akG2puN+p8BbLOrInWDr8TNheeIlvdqIChjqGqAV8 UomX8z3sWrfybpNd0f+q4z+O5nWEBCqFbsa8dqayte1hlzYAIagHjZYjY0IQcUc0NlYK Mtmt+DpR2aMTkLJCkdYh2BCMALc9uPW00OvVjMG3ag+BPwEXUruDBbNgsEaytcXlCazP rERg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=NgKyU2a4; 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=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n30si15066690pgb.406.2018.12.12.09.22.13; Wed, 12 Dec 2018 09:22:28 -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=@nvidia.com header.s=n1 header.b=NgKyU2a4; 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=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727983AbeLLRUl (ORCPT + 99 others); Wed, 12 Dec 2018 12:20:41 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:2024 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727756AbeLLRUl (ORCPT ); Wed, 12 Dec 2018 12:20:41 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 12 Dec 2018 09:20:37 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 12 Dec 2018 09:20:40 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 12 Dec 2018 09:20:40 -0800 Received: from [10.26.11.199] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 12 Dec 2018 17:20:37 +0000 Subject: Re: [PATCH] clk: tegra: fix SMP build To: Thierry Reding CC: Stephen Boyd , Arnd Bergmann , Michael Turquette , Peter De Schrijver , Prashant Gaikwad , Dmitry Osipenko , Aapo Vienamo , , , References: <20181211143528.2024488-1-arnd@arndb.de> <154454887151.17204.5632248748272979028@swboyd.mtv.corp.google.com> <20c5f3a9-fd82-5634-6a1e-6384c0facece@nvidia.com> <20181212133127.GB28521@ulmo> From: Jon Hunter Message-ID: <583c04aa-7939-7401-b4e1-99bb6afe1485@nvidia.com> Date: Wed, 12 Dec 2018 17:20:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181212133127.GB28521@ulmo> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1544635237; bh=EdWPURH0VuJDcNL7ocd8BmW+oUqW8bQRG9151sIcou8=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=NgKyU2a4wylvx+TWta6tZm+9RS4dNMfcuC8Ngc0AA/z8Vbuqh/RiDP04A2mfoX/3Q +FESSNHevLVDxUHSg3n6+WdxAddhi1SVZoihnzk8Dg13VgEY2LwlS09W2xeO5/KqrS SNYB+GwxVLbU+9yVFm+EWZxA4MhwSo4RU6S7SXL1J31R1HLOOu9jsNHcIC0UPpgt8H U6vo9WtK3fM9My5xYWehvl4QuiC6iesnbJjw5n80k5DjUj08I/UxH6Dp3htdRNGCOM FWxEALmogGUc4Jta/i0fN8W6vFKk81HHXLdIAv/sb8ESEf6RAEaedr/GjY87Lptfy1 +kflbEDfhcU9Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/12/2018 13:31, Thierry Reding wrote: > On Wed, Dec 12, 2018 at 11:47:32AM +0000, Jon Hunter wrote: >> >> 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_ready': >>>> drivers/clk/tegra/clk-tegra30.c:1151:19: error: implicit declaration of function 'tegra_pmc_cpu_is_powered'; did you mean 'tegra_powergate_is_powered'? [-Werror=implicit-function-declaration] >>>> cpu_pwr_status = 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 function") >>>> Signed-off-by: Arnd Bergmann >>>> --- >>>> Not sure if this is the best solution. If you think it's not, please >>>> submit a different fix. >>> >>> 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. >> >> Not that I know of. I just think that the function should/would not be >> used for non-SMP. >> >> 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 > from 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. Yes I can do it (tomorrow). Cheers Jon -- nvpublic