Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5454453imm; Tue, 12 Jun 2018 08:05:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL6nJ1I16iRfNTiO06AYfNoCDKCYA6k6f62kN/CtpTiNwcEGoSQEF/KJO0s6FmwByhgeIpQ X-Received: by 2002:a63:618e:: with SMTP id v136-v6mr666910pgb.100.1528815932387; Tue, 12 Jun 2018 08:05:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528815932; cv=none; d=google.com; s=arc-20160816; b=zoFEGvGhnKWw2a3RObJfnL/vzsPgExH90Z+pe3Feh24xJ5nlAR1JZTMgXgeXoAT/n8 mXlhkAWtCfXrEophG0b5zK3tFtQUaqtgg+DUEdv2zVbPKhVWuEln5dO4X8rS6JgXw3gv Ztzj7Pjkt6fikDqkLnVEtNY0MIpb9WFYHgtpWBymchyKA2ZnhNbCedBdYXDcIt3HDZo9 z/wAV6VJxUNjcXQSMluViXytlpd+hk6kn9jQyzvqe2bRNvBVYOvUU4U2h53hPVC5eUgu EH6P1gFp4ns7KunVog3VNymInEhd/MOecDP4LPR94Xbk1vZZNcxZtJgh1AyQIBeLgrD+ Kf6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HtI9aMs9ZYLzGIofebTAP5UBpxCmrU88GS0NfrS4dNc=; b=CQAoi4cNzi3naH4LDcdeIvUdAfHB2mmJLUGL9nR6g+lcz11NgjIhAXh/kWY9CISNkR WvddsFCKFujEGUmXCPjMBeeX07dnOJew5fPHIecTymqhMZ7/xehRhi7RhHIG7ngEzZrS PY6dyDZD2ZuF4Ve2mDyytfhClOgslp09kF12lbg/qF0EMRkINODoA2OPDU/ZAWWhvyh/ NPSXylL48dBBiR/pjUoR+4kYsvLXt6ch2gDvwVbk594sjwjZYxwI6jE4s85B1QGn5U5h u2oaoSJM709Zh9lRJkbVhepMoi20bbbvku2A4uj5Wc/bn7gn60H4JGNOp4O+5doQ3qrE pr/w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k185-v6si225903pgc.468.2018.06.12.08.05.17; Tue, 12 Jun 2018 08:05:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934269AbeFLPDe (ORCPT + 99 others); Tue, 12 Jun 2018 11:03:34 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:46663 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933228AbeFLPDd (ORCPT ); Tue, 12 Jun 2018 11:03:33 -0400 Received: from 79.184.255.56.ipv4.supernova.orange.pl (79.184.255.56) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id d8e6c5eaea8c384e; Tue, 12 Jun 2018 17:03:31 +0200 From: "Rafael J. Wysocki" To: Viresh Kumar , Arnd Bergmann Cc: Ilia Lin , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: kryo: allow building as a loadable module Date: Tue, 12 Jun 2018 17:02:30 +0200 Message-ID: <3261365.2LNNG94y3I@aspire.rjw.lan> In-Reply-To: <20180606040929.tksvznlmb3ogtgur@vireshk-i7> References: <20180605114453.1381941-1-arnd@arndb.de> <20180606040929.tksvznlmb3ogtgur@vireshk-i7> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, June 6, 2018 6:09:29 AM CEST Viresh Kumar wrote: > On 05-06-18, 13:44, Arnd Bergmann wrote: > > Building the kryo cpufreq driver while QCOM_SMEM is a loadable module > > results in a link error: > > > > drivers/cpufreq/qcom-cpufreq-kryo.o: In function `qcom_cpufreq_kryo_probe': > > qcom-cpufreq-kryo.c:(.text+0xbc): undefined reference to `qcom_smem_get' > > > > The problem is that Kconfig ignores interprets the dependency as met > > when the dependent symbol is a 'bool' one. By making it 'tristate', > > it will be forced to be a module here, which builds successfully. > > > > Fixes: 46e2856b8e18 ("cpufreq: Add Kryo CPU scaling driver") > > Signed-off-by: Arnd Bergmann > > --- > > drivers/cpufreq/Kconfig.arm | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > > index c7ce928fbf1f..52f5f1a2040c 100644 > > --- a/drivers/cpufreq/Kconfig.arm > > +++ b/drivers/cpufreq/Kconfig.arm > > @@ -125,7 +125,7 @@ config ARM_OMAP2PLUS_CPUFREQ > > default ARCH_OMAP2PLUS > > > > config ARM_QCOM_CPUFREQ_KRYO > > - bool "Qualcomm Kryo based CPUFreq" > > + tristate "Qualcomm Kryo based CPUFreq" > > depends on ARM64 > > depends on QCOM_QFPROM > > depends on QCOM_SMEM > > Okay, so we really need this to be a module. But the driver can't really work as > a module right now if we do this: insmod, rmmod, insmod. Because it doesn't free > resources at rmmmod and will fail on second insmod. > > Because what you are fixing is a critical build error, we better get it merged > right now. > > Acked-by: Viresh Kumar Patch applied, thanks!