Messages in this thread | | | Date | Thu, 11 Mar 2010 19:48:22 +0200 | From | Alexey Dobriyan <> | Subject | Re: [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.
| |