public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Move enum CPU_[xxx_]IDLE to private sched.h
Date: Thu, 5 Jun 2014 12:35:40 +0200	[thread overview]
Message-ID: <20140605103540.GB25232@gmail.com> (raw)
In-Reply-To: <53904760.8000808@linaro.org>


* Daniel Lezcano <daniel.lezcano@linaro.org> wrote:

> On 06/05/2014 12:17 PM, Ingo Molnar wrote:
> >
> >* Peter Zijlstra <peterz@infradead.org> wrote:
> >
> >>On Tue, Jun 03, 2014 at 02:59:05PM +0200, Daniel Lezcano wrote:
> >>>The different enum CPU_IDLE, CPU_NOT_IDLE, CPU_NEWLY_IDLE and
> >>>CPU_MAX_IDLE_TYPES are only used in kernel/sched/fair.c and
> >>>kernel/sched/stats.c.
> >>>
> >>>Move their definitions in the private 'sched.h' file located in the
> >>>same place than the files above.
> >>>
> >>
> >>Thanks!
> >
> >
> >So this patch breaks x86 64-bit and 32-bit defconfigs:
> >
> >In file included from
> >/home/mingo/tip/arch/x86/kernel/asm-offsets.c:9:0:
> >/home/mingo/tip/include/linux/sched.h:939:24: error:
> >‘CPU_MAX_IDLE_TYPES’ undeclared here (not in a function)
> >   unsigned int lb_count[CPU_MAX_IDLE_TYPES];
> >                         ^
> >make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1
> >make[1]: *** [prepare0] Error 2
> >make: *** [sub-make] Error 2
> 
> 
> Gah ! That deserves -10 points to my karma :(
> 
> I did not enabled CONFIG_SCHEDSTATS.
> 
> Sorry for the inconvenience.

No problem. sched.h is a bit of a mess when it comes to data structure 
dependencies, due to all of 'struct task_struct' having to be defined 
by the time random kernel code references task->.

But this is about 'struct sched_domain', and I think we might be able 
to move that out of sched.h and into a separate header... In theory 
only scheduler internals (arch topology definitions and cores cheduler 
code) should know about it.

Thanks,

	Ingo

  reply	other threads:[~2014-06-05 10:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 12:59 [PATCH] sched: Move enum CPU_[xxx_]IDLE to private sched.h Daniel Lezcano
2014-06-04  8:02 ` Peter Zijlstra
2014-06-05 10:17   ` Ingo Molnar
2014-06-05 10:33     ` Daniel Lezcano
2014-06-05 10:35       ` Ingo Molnar [this message]
2014-06-05 10:46         ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140605103540.GB25232@gmail.com \
    --to=mingo@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox