All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"ego@linux.vnet.ibm.com" <ego@linux.vnet.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	Preeti U Murthy <preeti@linux.vnet.ibm.com>,
	linux-next list <linux-next@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	cpufreq <cpufreq@vger.kernel.org>,
	Linux PM mailing list <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq, powernv: Fix build failure on UP
Date: Wed, 16 Apr 2014 11:31:02 +0530	[thread overview]
Message-ID: <534E1C9E.3090802@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAKohponDbPXTzzSvOy=V2vKpJEZYtt7i1ZqQLwcjN_Nhf95+mQ@mail.gmail.com>

On 04/16/2014 11:25 AM, Viresh Kumar wrote:
> On 16 April 2014 11:18, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> From: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
>> Subject: [PATCH] cpufreq, powernv: Fix build failure on UP
>>
>> Paul Gortmaker reported the following build failure of the powernv cpufreq
>> driver on UP configs:
>>
>> drivers/cpufreq/powernv-cpufreq.c:241:2: error: implicit declaration of
>> function 'cpu_sibling_mask' [-Werror=implicit-function-declaration]
>> cc1: some warnings being treated as errors
>> make[3]: *** [drivers/cpufreq/powernv-cpufreq.o] Error 1
>> make[2]: *** [drivers/cpufreq] Error 2
>> make[1]: *** [drivers] Error 2
>> make: *** [sub-make] Error 2
>>
>> The trouble here is that cpu_sibling_mask is defined only in <asm/smp.h>, and
>> <linux/smp.h> includes <asm/smp.h> only in SMP builds.
>>
>> So fix this build failure by explicitly including <asm/smp.h> in the driver,
>> so that we get the definition of cpu_sibling_mask even in UP configurations.
>>
>> Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
>> ---
>>
>>  drivers/cpufreq/powernv-cpufreq.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
>> index 9edccc6..ed1c7e5 100644
>> --- a/drivers/cpufreq/powernv-cpufreq.c
>> +++ b/drivers/cpufreq/powernv-cpufreq.c
>> @@ -29,6 +29,7 @@
>>
>>  #include <asm/cputhreads.h>
>>  #include <asm/reg.h>
> 
> Probably a comment here ?, so that people don't try to remove it in future.
> 

Sure, that sounds like a good idea.

> /* Required for cpu_sibling_mask() in UP configurations */
> 
>> +#include <asm/smp.h>
>>
>>  #define POWERNV_MAX_PSTATES    256
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Thank you!

Regards,
Srivatsa S. Bhat


      reply	other threads:[~2014-04-16  6:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 14:11 [next] powernv: cpufreq driver build fail for non-SMP Paul Gortmaker
2014-04-16  5:48 ` [PATCH] cpufreq, powernv: Fix build failure on UP Srivatsa S. Bhat
2014-04-16  5:55   ` Viresh Kumar
2014-04-16  6:01     ` Srivatsa S. Bhat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=534E1C9E.3090802@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.