diff mbox

[v6,2/5] kernel: missing include in cputime.c

Message ID 1372341272-12512-2-git-send-email-stefano.stabellini@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stefano Stabellini June 27, 2013, 1:54 p.m. UTC
steal_account_process_tick calls paravirt_steal_clock, but paravirt.h is
currently missing amoung the included header files.
Add include asm/paravirt.h ifdef CONFIG_PARAVIRT.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: mingo@redhat.com
CC: peterz@infradead.org

Changes in v5:
- add ifdef CONFIG_PARAVIRT.
---
 kernel/sched/cputime.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Peter Zijlstra June 27, 2013, 2:12 p.m. UTC | #1
On Thu, Jun 27, 2013 at 02:54:29PM +0100, Stefano Stabellini wrote:
> steal_account_process_tick calls paravirt_steal_clock, but paravirt.h is
> currently missing amoung the included header files.
> Add include asm/paravirt.h ifdef CONFIG_PARAVIRT.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: mingo@redhat.com
> CC: peterz@infradead.org
> 
> Changes in v5:
> - add ifdef CONFIG_PARAVIRT.
> ---
>  kernel/sched/cputime.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> index cc2dc3ee..317a578 100644
> --- a/kernel/sched/cputime.c
> +++ b/kernel/sched/cputime.c
> @@ -5,7 +5,9 @@
>  #include <linux/static_key.h>
>  #include <linux/context_tracking.h>
>  #include "sched.h"
> -
> +#ifdef CONFIG_PARAVIRT
> +#include <asm/paravirt.h>
> +#endif

Why isn't that CONFIG stuff inside the header instead of around it?
Ingo Molnar June 27, 2013, 2:17 p.m. UTC | #2
* Peter Zijlstra <peterz@infradead.org> wrote:

> On Thu, Jun 27, 2013 at 02:54:29PM +0100, Stefano Stabellini wrote:
> > steal_account_process_tick calls paravirt_steal_clock, but paravirt.h is
> > currently missing amoung the included header files.
> > Add include asm/paravirt.h ifdef CONFIG_PARAVIRT.
> > 
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > CC: mingo@redhat.com
> > CC: peterz@infradead.org
> > 
> > Changes in v5:
> > - add ifdef CONFIG_PARAVIRT.
> > ---
> >  kernel/sched/cputime.c |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> > 
> > diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> > index cc2dc3ee..317a578 100644
> > --- a/kernel/sched/cputime.c
> > +++ b/kernel/sched/cputime.c
> > @@ -5,7 +5,9 @@
> >  #include <linux/static_key.h>
> >  #include <linux/context_tracking.h>
> >  #include "sched.h"
> > -
> > +#ifdef CONFIG_PARAVIRT
> > +#include <asm/paravirt.h>
> > +#endif
> 
> Why isn't that CONFIG stuff inside the header instead of around it?

Indeed.

Once that is fixed then the #ifdef around asm/paravirt.h in 
kernel/sched/core.c could be removed as well.

Thanks,

	Ingo
Stefano Stabellini June 27, 2013, 2:43 p.m. UTC | #3
On Thu, 27 Jun 2013, Ingo Molnar wrote:
> * Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > On Thu, Jun 27, 2013 at 02:54:29PM +0100, Stefano Stabellini wrote:
> > > steal_account_process_tick calls paravirt_steal_clock, but paravirt.h is
> > > currently missing amoung the included header files.
> > > Add include asm/paravirt.h ifdef CONFIG_PARAVIRT.
> > > 
> > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > > CC: mingo@redhat.com
> > > CC: peterz@infradead.org
> > > 
> > > Changes in v5:
> > > - add ifdef CONFIG_PARAVIRT.
> > > ---
> > >  kernel/sched/cputime.c |    4 +++-
> > >  1 files changed, 3 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> > > index cc2dc3ee..317a578 100644
> > > --- a/kernel/sched/cputime.c
> > > +++ b/kernel/sched/cputime.c
> > > @@ -5,7 +5,9 @@
> > >  #include <linux/static_key.h>
> > >  #include <linux/context_tracking.h>
> > >  #include "sched.h"
> > > -
> > > +#ifdef CONFIG_PARAVIRT
> > > +#include <asm/paravirt.h>
> > > +#endif
> > 
> > Why isn't that CONFIG stuff inside the header instead of around it?
> 
> Indeed.
> 
> Once that is fixed then the #ifdef around asm/paravirt.h in 
> kernel/sched/core.c could be removed as well.

Right, that should work.
I'll make the change and resend with an additional patch to remove the
ifdef in kernel/sched/core.c.
diff mbox

Patch

diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index cc2dc3ee..317a578 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -5,7 +5,9 @@ 
 #include <linux/static_key.h>
 #include <linux/context_tracking.h>
 #include "sched.h"
-
+#ifdef CONFIG_PARAVIRT
+#include <asm/paravirt.h>
+#endif
 
 #ifdef CONFIG_IRQ_TIME_ACCOUNTING