lkml.org 
[lkml]   [2010]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] remove implicit slab.h inclusion from percpu.h
On Thu, Mar 11, 2010 at 11:56:22PM +0900, Tejun Heo wrote:
> Lee Schermerhorn was trying to use percpu from slab.h and ran into a
> dependency loop. percpu.h was using slab.h for UP inline
> implementation which isn't a big deal in itself but it turns out that
> percpu.h ends up being included everywhere via module.h and sched.h.
> So, removing that implicit inclusion breaks a lot of files.
>
> The following git tree contains trial conversion on x86_64.
> allmodconfig builds fine on it but a lot of other archs are likely to
> break although fixing them up shouldn't be too hard.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git review-remove-implied-slab-inclusion
>
> This can be solved much easier by moving some of the stuff that's
> necessary for slab.h from percpu.h into percpu-defs.h which originally
> got separated so that it can be used by asm/percpu.h but it's hackish
> and for longer term, it would be better to have slab.h explicitly
> included where necessary.
>
> So, what do you guys think? Probably-the-right-thing-to-do >544 file
> patch or somewhat-ugly-but-let's-worry-about-it-tommorrow two file
> patch?

You can include slab.h only for UP case.

Since everyone tests on allmodconfig which has SMP=y, configuration
will be more strict wrt headers, and compile breakages amount
negligible.


\
 
 \ /
  Last update: 2010-03-11 18:51    [W:0.115 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site