[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180325134548.GA1344@queper01-VirtualBox>
Date: Sun, 25 Mar 2018 14:48:10 +0100
From: Quentin Perret <quentin.perret@....com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Dietmar Eggemann <dietmar.eggemann@....com>,
linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Thara Gopinath <thara.gopinath@...aro.org>,
linux-pm@...r.kernel.org,
Morten Rasmussen <morten.rasmussen@....com>,
Chris Redpath <chris.redpath@....com>,
Patrick Bellasi <patrick.bellasi@....com>,
Valentin Schneider <valentin.schneider@....com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Vincent Guittot <vincent.guittot@...aro.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Todd Kjos <tkjos@...gle.com>,
Joel Fernandes <joelaf@...gle.com>
Subject: Re: [RFC PATCH 2/6] sched: Introduce energy models of CPUs
On Tuesday 20 Mar 2018 at 10:52:15 (+0100), Greg Kroah-Hartman wrote:
> On Tue, Mar 20, 2018 at 09:43:08AM +0000, Dietmar Eggemann wrote:
> > From: Quentin Perret <quentin.perret@....com>
[...]
> > +#ifdef CONFIG_PM_OPP
>
> #ifdefs go in .h files, not .c files, right?
>
So, after looking into this, my suggestion would be to: 1) remove the
#ifdef CONFIG_PM_OPP from energy.c entirely; 2) make sure
init_sched_energy() is stubbed properly for !CONFIG_SMP and
!CONFIG_PM_OPP in include/linux/sched/energy.h; 3) relocate the global
variables (energy_model, freq_domains, ...) to fair.c; and 4) modify
kernel/sched/Makefile with something like:
ifeq ($(CONFIG_PM_OPP),y)
obj-$(CONFIG_SMP) += energy.o
endif
That way, energy.c is not compiled if not needed by the arch, and the
ifdef are kept within header files and Makefiles.
Would that work ?
Thanks,
Quentin
Powered by blists - more mailing lists