Re: [PATCH] cpufreq, powernv: Fix build failure on UP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/16/2014 11:25 AM, Viresh Kumar wrote:
> On 16 April 2014 11:18, Srivatsa S. Bhat
> <srivatsa.bhat@xxxxxxxxxxxxxxxxxx> wrote:
>> From: Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>
>> 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@xxxxxxxxxxxxx>
>> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>
>> ---
>>
>>  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@xxxxxxxxxx>

Thank you!

Regards,
Srivatsa S. Bhat

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux