linux/arch/arm/mm
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
..
abort-ev4.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
abort-ev4t.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
abort-ev5t.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
abort-ev5tj.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
abort-ev6.S Add core support for ARMv6/v7 big-endian 2009-05-30 14:00:18 +01:00
abort-ev7.S [ARM] 5227/1: Add the ENDPROC declarations to the .S files 2008-09-01 12:06:34 +01:00
abort-lv4t.S [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores. 2006-09-28 20:15:46 +01:00
abort-macro.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
abort-nommu.S [ARM] 5227/1: Add the ENDPROC declarations to the .S files 2008-09-01 12:06:34 +01:00
alignment.c Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
cache-fa.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
cache-feroceon-l2.c [ARM] Kirkwood: small L2 code cleanup 2009-03-28 22:39:30 -04:00
cache-l2x0.c ARM: 5919/1: ARM: L2 : Errata 588369: Clean & Invalidate do not invalidate clean lines 2010-02-15 21:39:55 +00:00
cache-tauros2.c ARM: Add Tauros2 L2 cache controller support 2009-11-27 15:43:21 -05:00
cache-v3.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
cache-v4.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
cache-v4wb.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
cache-v4wt.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
cache-v6.S ARM: dma-mapping: fix for speculative prefetching 2010-02-15 15:22:25 +00:00
cache-v7.S ARM: dma-mapping: fix for speculative prefetching 2010-02-15 15:22:25 +00:00
cache-xsc3l2.c [ARM] pxa: do not enable L2 after MMU is enabled 2010-01-01 15:50:34 +08:00
context.c ARM: 5905/1: ARM: Global ASID allocation on SMP 2010-02-15 21:39:51 +00:00
copypage-fa.c ARM: Add support for FA526 v2 2009-03-25 13:10:01 +02:00
copypage-feroceon.c ARM: Flush user mapping on VIVT processors when copying a page 2009-10-05 15:42:16 +01:00
copypage-v3.c ARM: Pass VMA to copy_user_highpage() implementations 2009-10-05 15:17:45 +01:00
copypage-v4mc.c ARM: Pass VMA to copy_user_highpage() implementations 2009-10-05 15:17:45 +01:00
copypage-v4wb.c ARM: Flush user mapping on VIVT processors when copying a page 2009-10-05 15:42:16 +01:00
copypage-v4wt.c ARM: Pass VMA to copy_user_highpage() implementations 2009-10-05 15:17:45 +01:00
copypage-v6.c Merge branches 'at91', 'cache', 'cup', 'ep93xx', 'ixp4xx', 'nuc', 'pending-dma-streaming', 'u300' and 'umc' into devel 2010-02-25 22:06:43 +00:00
copypage-xsc3.c ARM: Flush user mapping on VIVT processors when copying a page 2009-10-05 15:42:16 +01:00
copypage-xscale.c ARM: Pass VMA to copy_user_highpage() implementations 2009-10-05 15:17:45 +01:00
discontig.c mm: move bootmem descriptors definition to a single place 2008-07-24 10:47:14 -07:00
dma-mapping.c 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
extable.c [ARM] Convert asm/uaccess.h to linux/uaccess.h 2008-09-06 11:35:55 +01:00
fault-armv.c 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
fault.c ARM: 5900/2: arm: enable support for software perf events 2010-02-12 17:25:53 +00:00
fault.h [ARM] do_bad_area() always takes current and current->active_mm 2006-09-27 16:13:48 +01:00
flush.c ARM: Fix ptrace accesses 2009-12-14 14:54:28 +00:00
highmem.c ARM: add size argument to __cpuc_flush_dcache_page 2009-12-14 14:53:22 +00:00
init.c 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
iomap.c [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
ioremap.c ARM: Add caller information to ioremap 2010-02-15 21:39:11 +00:00
Kconfig ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig 2010-02-24 21:07:22 +00:00
Makefile ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options 2010-01-12 19:02:05 +00:00
mm.h ARM: Reduce __flush_dcache_page() visibility 2009-12-04 14:58:50 +00:00
mmap.c fix broken aliasing checks for MAP_FIXED on sparc32, mips, arm and sh 2009-12-11 06:44:59 -05:00
mmu.c Merge branches 'clks' and 'pnx' into devel 2010-02-25 22:10:38 +00:00
nommu.c ARM: Add caller information to ioremap 2010-02-15 21:39:11 +00:00
pabort-legacy.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
pabort-v6.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
pabort-v7.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
pgd.c 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
proc-arm6_7.S ARM: Fix wrong register in proc-arm6_7.S data abort handler 2010-02-03 15:48:03 +00:00
proc-arm7tdmi.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
proc-arm9tdmi.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
proc-arm720.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
proc-arm740.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
proc-arm920.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm922.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm925.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm926.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm940.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm946.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm1020.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm1020e.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm1022.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-arm1026.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-fa526.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
proc-feroceon.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-macros.S Merge branch 'devel-stable' into devel 2009-09-12 12:02:26 +01:00
proc-mohawk.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
proc-sa110.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
proc-sa1100.S ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
proc-syms.c ARM: add size argument to __cpuc_flush_dcache_page 2009-12-14 14:53:22 +00:00
proc-v6.S ARM: 5888/1: arm: Update comments in cacheflush.h and remove unnecessary V6 and V7 comments 2010-01-19 23:11:56 +00:00
proc-v7.S ARM: 5888/1: arm: Update comments in cacheflush.h and remove unnecessary V6 and V7 comments 2010-01-19 23:11:56 +00:00
proc-xsc3.S Merge branches 'at91', 'cache', 'cup', 'ep93xx', 'ixp4xx', 'nuc', 'pending-dma-streaming', 'u300' and 'umc' into devel 2010-02-25 22:06:43 +00:00
proc-xscale.S ARM: dma-mapping: remove dmac_clean_range and dmac_inv_range 2010-02-15 15:22:23 +00:00
tlb-fa.S ARM: Add support for FA526 v2 2009-03-25 13:10:01 +02:00
tlb-v3.S kbuild: arm - use generic asm-offsets.h support 2005-09-09 21:08:59 +02:00
tlb-v4.S kbuild: arm - use generic asm-offsets.h support 2005-09-09 21:08:59 +02:00
tlb-v4wb.S kbuild: arm - use generic asm-offsets.h support 2005-09-09 21:08:59 +02:00
tlb-v4wbi.S kbuild: arm - use generic asm-offsets.h support 2005-09-09 21:08:59 +02:00
tlb-v6.S arm: Use __INIT macro instead of .text.init. 2009-04-27 19:51:58 -07:00
tlb-v7.S ARM: 5858/1: Remove unused vma_vm_flags macro from v7wbi_flush_user_tlb_range 2010-01-05 20:52:06 +00:00
vmregion.c ARM: dma-mapping: split out vmregion code from dma coherent mapping code 2009-11-24 17:41:34 +00:00
vmregion.h ARM: dma-mapping: split out vmregion code from dma coherent mapping code 2009-11-24 17:41:34 +00:00