Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp336698imm; Tue, 5 Jun 2018 21:11:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLve0N+TZ17uM3oSEPgnlIoHe6BiNJEPpciffpgCjfoVPZHnQeHtgX7+h1eSmXdUshfeSCr X-Received: by 2002:a17:902:708c:: with SMTP id z12-v6mr1504840plk.373.1528258302879; Tue, 05 Jun 2018 21:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528258302; cv=none; d=google.com; s=arc-20160816; b=nn4AWQ5M1kY5TN4gSXUO5jTNOD1K25BLqRYxT58CT8u7dmuoGvOQx0EzG1H/QJNhqk U171dkCErpvJiNpLEqY/4pJRYc/W0wBTR5JozkqnTDbGP6lts2Sdx+zafhhEDSeRMK9u h+muRFXuJJjTr6wR+1xvK5ADS5auoB4RCn7mB0bJ73rzX1vZrF5Lo3rcITmhH1IUPLcw nyschovnouGe8vysMgwtzT+JS0SRitUOlIdO4Pq2PAhGQopQy46vqlteUvvisc5zoJrJ dz6di0jDSGkA2nzsa9cuqVX9emCLbqLoAtxd1wFeBrHxJE3ei68g+u0cwSP6md44MO6g yxcw== 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:arc-authentication-results; bh=1YsYzZ817vVSW9i+dQiIa9A/kbcvkV6FpIgLLkjf5T8=; b=c69Wbu52+VK/hDYtAs5JxIwz2IAFnb/4ycQDvmTl4/qal1pwGRO6w1ORaWoZq9VGkp g2ScMo7gTDO57xM8SOXW2sFl0ku9uSi0uHp302bEW7VfXpdiK2VUAng291cH6yhv7CH4 GLmf9qFiqOhBdLRobBvGZTMTb4HzOocRfvD8bhfxJ5JzXAqaC+rL1gj4EUM70XIfFBt2 6H5kpOX9gLblHyUrxhk5+k4xXjkeR69VgfQZkaGb4/LLH6nhrIehEp+ra2FxkmRCwufb qCJl+6EhGytCu6sMLN1q64uvYfWHlhdWaiTmafjQ26Qy1lku46jCPhmi2+mYwcv/CyIA viWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RLwJoFBP; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3-v6si49612750pld.300.2018.06.05.21.10.46; Tue, 05 Jun 2018 21:11:42 -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=@linaro.org header.s=google header.b=RLwJoFBP; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750857AbeFFEJf (ORCPT + 99 others); Wed, 6 Jun 2018 00:09:35 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:44462 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750783AbeFFEJe (ORCPT ); Wed, 6 Jun 2018 00:09:34 -0400 Received: by mail-pg0-f65.google.com with SMTP id p21-v6so2295562pgd.11 for ; Tue, 05 Jun 2018 21:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1YsYzZ817vVSW9i+dQiIa9A/kbcvkV6FpIgLLkjf5T8=; b=RLwJoFBPwAeqp17TI1NqROcZSZ6Yf8cw2g7gdUaz0xUBavxbFY5urRhTK7pI7cPEE9 YdAumRI6bIVCRDWiAxRxs52rvw/2NaKSik1GrCoqX98nzH9bqao9JzNpGUK69r5RsIfn FFmmXV22gS1B3rAvvai0+tZideaZJ1N0/SymI= 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=1YsYzZ817vVSW9i+dQiIa9A/kbcvkV6FpIgLLkjf5T8=; b=WUjY4VdfvERY3JhRuh2evQa9198vULLeaOad/OzuztSdEXenC0KQoyFl3EQsm8dUrh TQR01MZnvNuXZVcotpvHcwHBuunUgitPFr1VLPsFzIpILzwEy7Pw1ueC3ygi3PsUGWYV x5qX+36U9TDIjfBiGFU5m2X+AkAbYM35JdrlonQNuPIjvMEVHIOJ1esHbU8OI/6s9bhd pIdAKOyR0rSJPgbh7sfI0JblwbHra1JxXb2fqLrFa0x2FsL1UwwWRFvUXZdJSoR++B1W eBvXXWzahYEZUZ+EddjM8awLXZ6TscZJyuBVI74mryRZaXGdvkboZq7zV0X1o/TG/DAR e6nA== X-Gm-Message-State: APt69E2Q3j5PgJSvTnWDHAQZaqMDQepgiZk2whsgfcwdpmWLd/IpauHv PnXFCRRvlujygs7kjNWTha03R+lk/eA= X-Received: by 2002:a63:ab45:: with SMTP id k5-v6mr1230358pgp.192.1528258173440; Tue, 05 Jun 2018 21:09:33 -0700 (PDT) Received: from localhost ([122.172.63.23]) by smtp.gmail.com with ESMTPSA id r74-v6sm13554460pfi.174.2018.06.05.21.09.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 21:09:31 -0700 (PDT) Date: Wed, 6 Jun 2018 09:39:29 +0530 From: Viresh Kumar To: Arnd Bergmann Cc: "Rafael J. Wysocki" , Ilia Lin , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: kryo: allow building as a loadable module Message-ID: <20180606040929.tksvznlmb3ogtgur@vireshk-i7> References: <20180605114453.1381941-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180605114453.1381941-1-arnd@arndb.de> User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. -- viresh