* Re: next-20160210 build: 2 failures 4 warnings (next-20160210) [not found] <E1aTQoy-0005cH-Tr@optimist> @ 2016-02-10 9:52 ` Mark Brown 2016-02-10 14:27 ` Rafael J. Wysocki 0 siblings, 1 reply; 6+ messages in thread From: Mark Brown @ 2016-02-10 9:52 UTC (permalink / raw) To: Rafael J. Wysocki, Viresh Kumar, Gautham R. Shenoy Cc: kernel-build-reports, linaro-kernel, linux-next, linux-pm [-- Attachment #1: Type: text/plain, Size: 625 bytes --] On Wed, Feb 10, 2016 at 09:12:25AM +0000, Build bot for Mark Brown wrote: Today's -next fails to build on non-SMP configurations due to: > arm-multi_v5_defconfig > ../drivers/cpufreq/cpufreq_governor.c:251:3: error: implicit declaration of function 'irq_work_queue_on' [-Werror=implicit-function-declaration] caused by 0144fa03ef4606ae (cpufreq: governor: Replace timers with utilization update callbacks). IS_ENABLED() in an if statement doesn't do a good job of making things conditional here since the code still has to compile cleanly in both cases and there is no definition at all of irq_work_queue_on() for !SMP. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: next-20160210 build: 2 failures 4 warnings (next-20160210) 2016-02-10 9:52 ` next-20160210 build: 2 failures 4 warnings (next-20160210) Mark Brown @ 2016-02-10 14:27 ` Rafael J. Wysocki 2016-02-10 15:04 ` Arnd Bergmann 2016-02-10 15:07 ` [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP Arnd Bergmann 0 siblings, 2 replies; 6+ messages in thread From: Rafael J. Wysocki @ 2016-02-10 14:27 UTC (permalink / raw) To: Mark Brown Cc: Rafael J. Wysocki, Viresh Kumar, Gautham R. Shenoy, kernel-build-reports, Lists linaro-kernel, linux-next, linux-pm@vger.kernel.org On Wed, Feb 10, 2016 at 10:52 AM, Mark Brown <broonie@kernel.org> wrote: > On Wed, Feb 10, 2016 at 09:12:25AM +0000, Build bot for Mark Brown wrote: > > Today's -next fails to build on non-SMP configurations due to: > >> arm-multi_v5_defconfig >> ../drivers/cpufreq/cpufreq_governor.c:251:3: error: implicit declaration of function 'irq_work_queue_on' [-Werror=implicit-function-declaration] > > caused by 0144fa03ef4606ae (cpufreq: governor: Replace timers with > utilization update callbacks). IS_ENABLED() in an if statement doesn't > do a good job of making things conditional here since the code still has > to compile cleanly in both cases and there is no definition at all of > irq_work_queue_on() for !SMP. Thanks for the report! OK, I'll change it to #ifdef/#else then. Thanks, Rafael ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: next-20160210 build: 2 failures 4 warnings (next-20160210) 2016-02-10 14:27 ` Rafael J. Wysocki @ 2016-02-10 15:04 ` Arnd Bergmann 2016-02-10 15:07 ` [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP Arnd Bergmann 1 sibling, 0 replies; 6+ messages in thread From: Arnd Bergmann @ 2016-02-10 15:04 UTC (permalink / raw) To: linaro-kernel Cc: Rafael J. Wysocki, Mark Brown, Gautham R. Shenoy, kernel-build-reports, Viresh Kumar, linux-pm@vger.kernel.org, Rafael J. Wysocki, linux-next On Wednesday 10 February 2016 15:27:48 Rafael J. Wysocki wrote: > On Wed, Feb 10, 2016 at 10:52 AM, Mark Brown <broonie@kernel.org> wrote: > > On Wed, Feb 10, 2016 at 09:12:25AM +0000, Build bot for Mark Brown wrote: > > > > Today's -next fails to build on non-SMP configurations due to: > > > >> arm-multi_v5_defconfig > >> ../drivers/cpufreq/cpufreq_governor.c:251:3: error: implicit declaration of function 'irq_work_queue_on' [-Werror=implicit-function-declaration] > > > > caused by 0144fa03ef4606ae (cpufreq: governor: Replace timers with > > utilization update callbacks). IS_ENABLED() in an if statement doesn't > > do a good job of making things conditional here since the code still has > > to compile cleanly in both cases and there is no definition at all of > > irq_work_queue_on() for !SMP. > > Thanks for the report! > > OK, I'll change it to #ifdef/#else then. > I have a better idea, patch follows. Arnd ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP 2016-02-10 14:27 ` Rafael J. Wysocki 2016-02-10 15:04 ` Arnd Bergmann @ 2016-02-10 15:07 ` Arnd Bergmann 2016-02-10 15:27 ` Rafael J. Wysocki 1 sibling, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2016-02-10 15:07 UTC (permalink / raw) To: Peter Zijlstra, Ingo Molnar Cc: linaro-kernel, Rafael J. Wysocki, Mark Brown, Gautham R. Shenoy, kernel-build-reports, Viresh Kumar, linux-pm@vger.kernel.org, Rafael J. Wysocki, linux-next, Frederic Weisbecker, Thomas Gleixner, linux-kernel The cpufreq code uses 'if (IS_ENABLED(CONFIG_SMP))' to check whether it should queue a task on the local CPU or a remote one, however the irq_work_queue_on() function is not declared when CONFIG_SMP is not set: drivers/cpufreq/cpufreq_governor.c: In function 'gov_queue_irq_work': drivers/cpufreq/cpufreq_governor.c:251:3: error: implicit declaration of function 'irq_work_queue_on' [-Werror=implicit-function-declaration] irq_work_queue_on(&policy_dbs->irq_work, smp_processor_id()); This changes the conditional declaration so that irq_work_queue_on just queues the irq work on the only available CPU when CONFIG_SMP is not set, which is presumably what most people need anyway. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 0144fa03ef46 ("cpufreq: governor: Replace timers with utilization update callbacks") diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index 47b9ebd4a74f..c9bde50ef317 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h @@ -33,9 +33,13 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) #define DEFINE_IRQ_WORK(name, _f) struct irq_work name = { .func = (_f), } bool irq_work_queue(struct irq_work *work); - #ifdef CONFIG_SMP bool irq_work_queue_on(struct irq_work *work, int cpu); +#else +static inline bool irq_work_queue_on(struct irq_work *work, int cpu) +{ + return irq_work_queue(work); +} #endif void irq_work_tick(void); ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP 2016-02-10 15:07 ` [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP Arnd Bergmann @ 2016-02-10 15:27 ` Rafael J. Wysocki 2016-02-10 18:10 ` Mark Brown 0 siblings, 1 reply; 6+ messages in thread From: Rafael J. Wysocki @ 2016-02-10 15:27 UTC (permalink / raw) To: Arnd Bergmann Cc: Peter Zijlstra, Ingo Molnar, Lists linaro-kernel, Rafael J. Wysocki, Mark Brown, Gautham R. Shenoy, kernel-build-reports, Viresh Kumar, linux-pm@vger.kernel.org, Rafael J. Wysocki, linux-next, Frederic Weisbecker, Thomas Gleixner, Linux Kernel Mailing List On Wed, Feb 10, 2016 at 4:07 PM, Arnd Bergmann <arnd@arndb.de> wrote: > The cpufreq code uses 'if (IS_ENABLED(CONFIG_SMP))' to check > whether it should queue a task on the local CPU or a remote > one, however the irq_work_queue_on() function is not declared > when CONFIG_SMP is not set: > > drivers/cpufreq/cpufreq_governor.c: In function 'gov_queue_irq_work': > drivers/cpufreq/cpufreq_governor.c:251:3: error: implicit declaration of function 'irq_work_queue_on' [-Werror=implicit-function-declaration] > irq_work_queue_on(&policy_dbs->irq_work, smp_processor_id()); > > This changes the conditional declaration so that irq_work_queue_on > just queues the irq work on the only available CPU when CONFIG_SMP > is not set, which is presumably what most people need anyway. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > Fixes: 0144fa03ef46 ("cpufreq: governor: Replace timers with utilization update callbacks") > > diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h > index 47b9ebd4a74f..c9bde50ef317 100644 > --- a/include/linux/irq_work.h > +++ b/include/linux/irq_work.h > @@ -33,9 +33,13 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) > #define DEFINE_IRQ_WORK(name, _f) struct irq_work name = { .func = (_f), } > > bool irq_work_queue(struct irq_work *work); > - > #ifdef CONFIG_SMP > bool irq_work_queue_on(struct irq_work *work, int cpu); > +#else > +static inline bool irq_work_queue_on(struct irq_work *work, int cpu) > +{ > + return irq_work_queue(work); > +} > #endif > > void irq_work_tick(void); I was thinking about this too, but then cpufreq will be the only user of it. In any case can do it at any time later. :-) Thanks, Rafael ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP 2016-02-10 15:27 ` Rafael J. Wysocki @ 2016-02-10 18:10 ` Mark Brown 0 siblings, 0 replies; 6+ messages in thread From: Mark Brown @ 2016-02-10 18:10 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Arnd Bergmann, Peter Zijlstra, Ingo Molnar, Lists linaro-kernel, Gautham R. Shenoy, kernel-build-reports, Viresh Kumar, linux-pm@vger.kernel.org, Rafael J. Wysocki, linux-next, Frederic Weisbecker, Thomas Gleixner, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 627 bytes --] On Wed, Feb 10, 2016 at 04:27:42PM +0100, Rafael J. Wysocki wrote: > > +#else > > +static inline bool irq_work_queue_on(struct irq_work *work, int cpu) > > +{ > > + return irq_work_queue(work); > > +} > > #endif > I was thinking about this too, but then cpufreq will be the only user of it. > In any case can do it at any time later. :-) Well, there's currently only two other users of irq_work_queue_on() anyway so that's a third of the userbase and it does seem the obvious way to support any other future users that want to scale down to !SMP cases painlessly. Reviwed-by: Mark Brown <broonie@kernel.org> FWIW. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-10 18:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1aTQoy-0005cH-Tr@optimist>
2016-02-10 9:52 ` next-20160210 build: 2 failures 4 warnings (next-20160210) Mark Brown
2016-02-10 14:27 ` Rafael J. Wysocki
2016-02-10 15:04 ` Arnd Bergmann
2016-02-10 15:07 ` [PATCH] irq_work: unhide irq_work_queue_on declaration on non-SMP Arnd Bergmann
2016-02-10 15:27 ` Rafael J. Wysocki
2016-02-10 18:10 ` Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox