Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp360035imm; Tue, 5 Jun 2018 21:45:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKH/cLOojftktx88ryq0plLR7gHtAQuatmHDoy2sRTK1gI5fNLg9mf78wjVAewCi+aR8516 X-Received: by 2002:a62:4e07:: with SMTP id c7-v6mr934318pfb.149.1528260333622; Tue, 05 Jun 2018 21:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528260333; cv=none; d=google.com; s=arc-20160816; b=dbRZxXWrc0KK4eXZlBZKdwaZ0hOd84hmEfNeYNzCLsTivVCmrQsKKOwBULjYWKb9kV kmS3mksxPsrHkQu7Q47KNMSrnIXTuDMv2etA9BXDl1KLL+ouMvLU3J45QsI+jQsAYCtB FwZ+PBYr0yeGXUHPzy3vD19KRShfnnBGcvz7QZ2oELiKpnUBhtkXx6sMoYh70lGvmmDm N4/8cfFu5Gxum7H6fMOtO/y8PMREmfeE9A3xWtqBy9ngDPb9yjBJkzGTeRs0wFxa9IW7 EeVD2t6rviMPnUf55nxPPgBXM41PamawgQM0cI6a2NCuRPmU7Gmcvbx55y5SYD8o2Ls4 /0jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=NusmcCC2rFJqHdhQJ0H5bFBoUehw6g6TXh4cupC8+yA=; b=bnqFz8axXtcr6kLDeJZR36kx3PyrtVnI0YJcm5Em2QzdJq5M+OicparW8kiw/SbTlN KRZ8piyHodKhyUdCljnDdUU2r9A4YXq6HnmFB3I87FjTR5IPAfTAwWb3UrD1aARo/WV/ 8d4F9p/plopAA27Zflkn1GwngA018fB0MSuQ/ajFOJrQ4wdyx3pGt98gtNBPnBx1lI95 EQZE8TMNXkF5zIugmnUZi0f3j/NUaOLuvBJmsVESoEHko6fLexaZ4dEIvqcl4FwiKhHT 7l+I0gv3OycliWaPdf6GjAzCeJYQ6MPqGxuLDTBgZtlBDzAAM/wp3MBJECEbuTKf+/NR oBuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@codeaurora.org header.s=default header.b=V5Vw9GLa; dkim=fail header.i=@codeaurora.org header.s=default header.b=VbVuG37+; 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 e39-v6si51518720plg.168.2018.06.05.21.45.19; Tue, 05 Jun 2018 21:45:33 -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=fail header.i=@codeaurora.org header.s=default header.b=V5Vw9GLa; dkim=fail header.i=@codeaurora.org header.s=default header.b=VbVuG37+; 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 S1751943AbeFFEou (ORCPT + 99 others); Wed, 6 Jun 2018 00:44:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56698 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbeFFEos (ORCPT ); Wed, 6 Jun 2018 00:44:48 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7030A607E8; Wed, 6 Jun 2018 04:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528260288; bh=57M3wlgTitUtAH3Pu9TFND+PSnowM/mflgNWq6GpUPU=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=V5Vw9GLa6xa6LwnXzmjR4ZLtAhEVJwB7+lEe0E6cumQw8HmqodYIWESSevXCviECy vLIsrwas/tCc5b+ILWb5MHjGqiTrnElbhCS8pYMY3i2z5MjNe3FmEkeJipu8JtmK/0 1Af2gq7QsuACskhk2rncTKIinzDmeOlmCqh8qiZc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.166.97.150] (unknown [2.53.26.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilialin@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0307E60263; Wed, 6 Jun 2018 04:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528260287; bh=57M3wlgTitUtAH3Pu9TFND+PSnowM/mflgNWq6GpUPU=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=VbVuG37+trVBWFEp4sGnaOy298Mo2OaUthzThyan8vpPu3zErk7uVQxmf954vDJV8 C3Rjeep1tL10HrEktylmUWvQ0uwed5t6n1ucQa4z7QUWNqHhtnutSqrMPPgl//20q2 Ncmt1J2YDoi8Q7tnl/sFcpQCwIhXNQWTNhH0ZCW4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0307E60263 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilialin@codeaurora.org Date: Wed, 06 Jun 2018 07:44:39 +0300 User-Agent: K-9 Mail for Android In-Reply-To: <20180606040929.tksvznlmb3ogtgur@vireshk-i7> References: <20180605114453.1381941-1-arnd@arndb.de> <20180606040929.tksvznlmb3ogtgur@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] cpufreq: kryo: allow building as a loadable module To: Viresh Kumar , Arnd Bergmann CC: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org From: Ilia Lin Message-ID: <85F1CCF0-F937-4EAA-9628-D8AA6C4EDE0E@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Viresh got ahead of my answer a bit=2E :) Sure I'll post the module exit later=2E On June 6, 2018 7:09:29 AM GMT+03:00, 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: >>=20 >> drivers/cpufreq/qcom-cpufreq-kryo=2Eo: In function >`qcom_cpufreq_kryo_probe': >> qcom-cpufreq-kryo=2Ec:(=2Etext+0xbc): undefined reference to >`qcom_smem_get' >>=20 >> The problem is that Kconfig ignores interprets the dependency as met >> when the dependent symbol is a 'bool' one=2E By making it 'tristate', >> it will be forced to be a module here, which builds successfully=2E >>=20 >> Fixes: 46e2856b8e18 ("cpufreq: Add Kryo CPU scaling driver") >> Signed-off-by: Arnd Bergmann >> --- >> drivers/cpufreq/Kconfig=2Earm | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/drivers/cpufreq/Kconfig=2Earm >b/drivers/cpufreq/Kconfig=2Earm >> index c7ce928fbf1f=2E=2E52f5f1a2040c 100644 >> --- a/drivers/cpufreq/Kconfig=2Earm >> +++ b/drivers/cpufreq/Kconfig=2Earm >> @@ -125,7 +125,7 @@ config ARM_OMAP2PLUS_CPUFREQ >> default ARCH_OMAP2PLUS >> =20 >> 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=2E But the driver can't >really work as >a module right now if we do this: insmod, rmmod, insmod=2E Because it >doesn't free >resources at rmmmod and will fail on second insmod=2E > >Because what you are fixing is a critical build error, we better get it >merged >right now=2E > >Acked-by: Viresh Kumar > >But Ilia needs to cook another patch to add the module removal code for >the >driver and mark your patch's commit id in the fixes tag=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E