Re: [PATCH -next] cpufreq: add stub for get_cpu_idle_time() to fix scsi/lpfc driver build

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

 



On 06-07-20, 09:44, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> 
> To fix a build error in drivers/scsi/lpfc/lpfc_sli.c when
> CONFIG_CPU_FREQ is not set/enabled, add a stub function for
> get_cpu_idle_time() in <linux/cpufreq.h>.
> 
> ../drivers/scsi/lpfc/lpfc_sli.c: In function ‘lpfc_init_idle_stat_hb’:
> ../drivers/scsi/lpfc/lpfc_sli.c:7330:26: error: implicit declaration of function ‘get_cpu_idle_time’; did you mean ‘set_cpu_active’? [-Werror=implicit-function-declaration]

And why is lpfc_sli.c using a cpufreq (supposedly internal, i.e. for
cpufreq related parts) routine ? I think if you really need this, then
it should be moved to a better common place and let everyone use it.

I also see that drivers/macintosh/rack-meter.c has its own
implementation for this.

>    idle_stat->prev_idle = get_cpu_idle_time(i, &wall, 1);
> 
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
> Cc: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> Cc: linux-pm@xxxxxxxxxxxxxxx
> Cc: James Smart <james.smart@xxxxxxxxxxxx>
> Cc: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx>
> Cc: linux-scsi@xxxxxxxxxxxxxxx
> ---
>  include/linux/cpufreq.h |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- linux-next-20200706.orig/include/linux/cpufreq.h
> +++ linux-next-20200706/include/linux/cpufreq.h
> @@ -237,6 +237,10 @@ static inline unsigned int cpufreq_get_h
>  {
>  	return 0;
>  }
> +static inline u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy)
> +{
> +	return 0;
> +}
>  static inline void disable_cpufreq(void) { }
>  #endif
>  

-- 
viresh



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux