linux-stable-rt/arch/blackfin/include/asm
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
..
Kbuild
asm-offsets.h
atomic.h
auxvec.h
bfin-global.h Blackfin: support smaller uncached DMA chunks for memory constrained systems 2009-12-15 00:15:48 -05:00
bfin-lq035q1.h Blackfin: extend bfin-lq035q1-fb resources to include PPI mode 2010-03-09 00:30:46 -05:00
bfin5xx_spi.h
bfin_can.h Blackfin: merge common CAN defines into one headers 2010-03-09 00:30:46 -05:00
bfin_rotary.h
bfin_sdh.h
bfin_simple_timer.h
bfin_sport.h Blackfin: bfin_sport: unify & standardize SPORT masks 2010-03-09 00:30:45 -05:00
bfin_watchdog.h Blackfin: split watchdog definitions into a dedicated header file 2010-03-09 00:30:50 -05:00
bfrom.h
bitops.h Blackfin: add optimized version of Hamming Weight functions 2010-03-09 00:30:47 -05:00
bitsperlong.h
blackfin.h
bug.h Blackfin: Convert BUG() to use unreachable() 2009-12-15 08:38:35 -05:00
bugs.h
byteorder.h
cache.h
cacheflush.h
cdef_LPBlackfin.h
checksum.h
clocks.h
context.S Blackfin: add support for irqflags tracing 2010-03-09 00:30:49 -05:00
cplb.h
cplbinit.h
cpu.h Blackfin: rewrite resync_core_{i,d}cache() SMP logic to avoid per_cpu data 2010-03-09 00:30:50 -05:00
cputime.h
current.h
def_LPBlackfin.h Blackfin: unify MMR helpers 2010-03-09 00:30:47 -05:00
delay.h Blackfin: implement ndelay() 2010-03-09 00:30:50 -05:00
device.h
div64.h
dma-mapping.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin 2010-03-18 17:02:35 -07:00
dma.h Blackfin: add dma_disable_irq_nosync() API for irq handlers 2010-03-09 00:30:50 -05:00
dpmc.h Blackfin: eat spurious space in asm/dpmc.h 2010-03-09 00:30:53 -05:00
early_printk.h
elf.h Blackfin: initial regset support 2010-03-09 00:30:51 -05:00
emergency-restart.h
entry.h
errno.h
fb.h
fcntl.h
fixed_code.h
flat.h
ftrace.h Blackfin: add CALLER_ADDR ftrace macros 2010-03-09 00:30:50 -05:00
futex.h
gpio.h Blackfin: GPIO: implement to_irq handler 2010-03-09 00:30:52 -05:00
gptimers.h Blackfin: gptimers: use unsigned timer/group ids 2009-12-15 00:15:30 -05:00
hardirq.h
hw_irq.h
io.h Blackfin: io.h: fix random busted whitespace 2009-12-15 00:16:04 -05:00
ioctl.h
ioctls.h
ipcbuf.h
ipipe.h Blackfin/ipipe: update version stamp 2009-12-15 00:15:21 -05:00
ipipe_base.h Blackfin/ipipe: prepare status bitops for SMP support 2009-12-15 00:15:12 -05:00
irq.h Blackfin: implement nmi_watchdog for SMP on BF561 2010-03-09 00:30:49 -05:00
irq_handler.h
irq_regs.h
irqflags.h Blackfin/ipipe: fix forward ref to barrier() 2009-12-15 00:15:15 -05:00
kdebug.h
kgdb.h Blackfin: kgdb: punt dead code 2009-12-15 00:15:40 -05:00
kmap_types.h
l1layout.h
linkage.h
local.h
mem_init.h Blackfin: punt dead/unused flash mem_init settings 2009-12-15 00:15:33 -05:00
mem_map.h
mman.h
mmu.h
mmu_context.h include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
module.h module: make MODULE_SYMBOL_PREFIX into a CONFIG option 2009-12-15 16:28:26 +10:30
msgbuf.h
mutex.h
nand.h Fix spelling of 'platform' in comments and doc 2010-02-05 12:22:34 +01:00
nmi.h Blackfin: implement nmi_watchdog for SMP on BF561 2010-03-09 00:30:49 -05:00
page.h Blackfin: asm/page.h: pull in asm-generic headers 2010-03-09 00:30:52 -05:00
page_offset.h
param.h
pci.h Blackfin: convert to asm-generic pci headers 2009-12-15 00:16:07 -05:00
pda.h
percpu.h
pgalloc.h
pgtable.h
poll.h
portmux.h
posix_types.h
processor.h
ptrace.h Blackfin: initial tracehook support 2010-03-09 00:30:51 -05:00
reboot.h
resource.h
rwlock.h
scatterlist.h
sections.h Blackfin: initial XIP support 2010-03-09 00:30:48 -05:00
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h Blackfin: rewrite resync_core_{i,d}cache() SMP logic to avoid per_cpu data 2010-03-09 00:30:50 -05:00
socket.h
sockios.h
spinlock.h
spinlock_types.h
stat.h
statfs.h
string.h
swab.h
syscall.h Blackfin: initial tracehook support 2010-03-09 00:30:51 -05:00
system.h
termbits.h
termios.h
thread_info.h Blackfin: fix single stepping over system calls 2010-03-09 00:30:51 -05:00
time.h Blackfin: add support for cpufreq on SMP systems 2010-03-09 00:30:50 -05:00
timex.h
tlb.h
tlbflush.h
topology.h
trace.h
traps.h
types.h
uaccess.h
ucontext.h
unaligned.h
unistd.h Blackfin: define __NR_recvmmsg 2009-12-15 04:07:32 -05:00
user.h
xor.h