kernel-fxtec-pro1x/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
..
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
auxvec.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
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 Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bfin_can.h Blackfin: merge common CAN defines into one headers 2010-03-09 00:30:46 -05:00
bfin_rotary.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bfin_sdh.h
bfin_simple_timer.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
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 asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
blackfin.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bug.h Blackfin: Convert BUG() to use unreachable() 2009-12-15 08:38:35 -05:00
bugs.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
byteorder.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cache.h Blackfin: fix missed cache config renames 2009-10-07 04:48:08 -04:00
cacheflush.h Blackfin: push down asm/ includes and out of bfin-global.h 2009-12-15 00:14:14 -05:00
cdef_LPBlackfin.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
checksum.h Blackfin: convert to generic checksum code 2009-12-15 00:13:32 -05:00
clocks.h Blackfin: pull in asm/dpmc.h for power defines 2009-12-15 00:14:50 -05:00
context.S Blackfin: add support for irqflags tracing 2010-03-09 00:30:49 -05:00
cplb.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cplbinit.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
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 Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
current.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
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 Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
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 Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
elf.h Blackfin: initial regset support 2010-03-09 00:30:51 -05:00
emergency-restart.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
entry.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
errno.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
fb.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
fcntl.h vfs: Implement proper O_SYNC semantics 2009-12-10 15:02:50 +01:00
fixed_code.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
flat.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
ftrace.h Blackfin: add CALLER_ADDR ftrace macros 2010-03-09 00:30:50 -05:00
futex.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
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 Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
hw_irq.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
io.h Blackfin: io.h: fix random busted whitespace 2009-12-15 00:16:04 -05:00
ioctl.h
ioctls.h Blackfin: convert asm/ioctls.h to asm-generic/ioctls.h 2009-06-18 21:40:53 -04:00
ipcbuf.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
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 Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
irq_regs.h
irqflags.h Blackfin/ipipe: fix forward ref to barrier() 2009-12-15 00:15:15 -05:00
Kbuild
kdebug.h
kgdb.h Blackfin: kgdb: punt dead code 2009-12-15 00:15:40 -05:00
kmap_types.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
l1layout.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
linkage.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
local.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
mem_init.h Blackfin: punt dead/unused flash mem_init settings 2009-12-15 00:15:33 -05:00
mem_map.h Blackfin: unify memory map headers 2009-06-22 21:16:07 -04:00
mman.h Blackfin: convert signal/mmap to asm-generic 2009-06-18 21:41:26 -04:00
mmu.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
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 Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
mutex.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
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 Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
param.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
pci.h Blackfin: convert to asm-generic pci headers 2009-12-15 00:16:07 -05:00
pda.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
percpu.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
pgalloc.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
pgtable.h Blackfin: fix framebuffer mmap bug for nommu 2009-10-08 00:58:15 -04:00
poll.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
portmux.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
posix_types.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
processor.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
ptrace.h Blackfin: initial tracehook support 2010-03-09 00:30:51 -05:00
reboot.h
resource.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
rwlock.h
scatterlist.h
sections.h Blackfin: initial XIP support 2010-03-09 00:30:48 -05:00
segment.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
sembuf.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
serial.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
setup.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
shmbuf.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
shmparam.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
sigcontext.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
siginfo.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
signal.h Blackfin: convert signal/mmap to asm-generic 2009-06-18 21:41:26 -04:00
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 Blackfin: convert socket/poll to asm-generic 2009-06-18 21:41:08 -04:00
sockios.h Blackfin: convert socket/poll to asm-generic 2009-06-18 21:41:08 -04:00
spinlock.h locking: Convert raw_rwlock functions to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
stat.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
statfs.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
string.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
swab.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
syscall.h Blackfin: initial tracehook support 2010-03-09 00:30:51 -05:00
system.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
termbits.h Blackfin: convert termios to asm-generic 2009-06-18 21:41:17 -04:00
termios.h Blackfin: convert termios to asm-generic 2009-06-18 21:41:17 -04:00
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 Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
tlbflush.h Blackfin: convert page/tlb to asm-generic 2009-06-18 21:42:30 -04:00
topology.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
trace.h Blackfin: add C define of trace_buffer_init() 2009-12-15 00:14:03 -05:00
traps.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
types.h Blackfin: convert types to asm-generic 2009-06-18 21:42:24 -04:00
uaccess.h Blackfin: push down asm/ includes and out of bfin-global.h 2009-12-15 00:14:14 -05:00
ucontext.h Blackfin: convert page/tlb to asm-generic 2009-06-18 21:42:30 -04:00
unaligned.h Blackfin: convert locking primitives to asm-generic 2009-06-18 21:41:22 -04:00
unistd.h Blackfin: define __NR_recvmmsg 2009-12-15 04:07:32 -05:00
user.h Blackfin: convert user/elf to asm-generic 2009-06-18 21:41:03 -04:00
xor.h