linux/arch/mips/pci
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
..
Makefile MIPS: eXcite: Remove platform. 2009-12-17 01:57:35 +00:00
fixup-au1000.c [MIPS] Alchemy PCI code style cleanup 2008-05-12 16:46:52 +01:00
fixup-bcm63xx.c MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
fixup-capcella.c Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
fixup-cobalt.c MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses 2010-02-27 12:53:44 +01:00
fixup-emma2rh.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
fixup-fuloong2e.c MIPS: Bonito64: Make Loongson independent from Bonito64 code. 2009-12-17 01:57:06 +00:00
fixup-ip32.c [MIPS] PCI: Make dev pointer argument of pcibios_map_irq const. 2007-07-10 17:33:00 +01:00
fixup-jmr3927.c [MIPS] TXx9: Make single kernel can support multiple boards 2008-07-15 18:44:35 +01:00
fixup-lemote2f.c MIPS: Loongson: Lemote-2F: USB: Not Emulate Non-Posted Writes 2010-02-27 12:53:09 +01:00
fixup-malta.c [MIPS] PCI: Make dev pointer argument of pcibios_map_irq const. 2007-07-10 17:33:00 +01:00
fixup-mpc30x.c Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
fixup-pmcmsp.c Author: Ralf Baechle <ralf@linux-mips.org> 2007-10-29 19:35:37 +00:00
fixup-pnx8550.c [MIPS] PCI: Make dev pointer argument of pcibios_map_irq const. 2007-07-10 17:33:00 +01:00
fixup-rbtx4927.c [MIPS] TXx9: Make single kernel can support multiple boards 2008-07-15 18:44:35 +01:00
fixup-rbtx4938.c [MIPS] TXx9: Make single kernel can support multiple boards 2008-07-15 18:44:35 +01:00
fixup-rc32434.c MIPS: RB532: Fix build error 2008-10-27 16:18:26 +00:00
fixup-sb1250.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
fixup-sni.c [MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1 2007-11-15 23:21:50 +00:00
fixup-tb0219.c Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
fixup-tb0226.c Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
fixup-tb0287.c Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
fixup-wrppmc.c [MIPS] PCI: Make dev pointer argument of pcibios_map_irq const. 2007-07-10 17:33:00 +01:00
fixup-yosemite.c [MIPS] PCI: Make dev pointer argument of pcibios_map_irq const. 2007-07-10 17:33:00 +01:00
msi-octeon.c MIPS: Reorganize Cavium OCTEON PCI support. 2009-07-03 15:45:29 +01:00
ops-au1000.c [MIPS] Alchemy PCI code style cleanup 2008-05-12 16:46:52 +01:00
ops-bcm63xx.c MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
ops-bonito64.c MIPS: Bonito64: Make Loongson independent from Bonito64 code. 2009-12-17 01:57:06 +00:00
ops-bridge.c [MIPS] IP27: misc fixes 2008-06-05 18:13:15 +01:00
ops-emma2rh.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
ops-gt64xxx_pci0.c [MIPS] merge GT64111 PCI routines and GT64120 PCI_0 routines 2007-04-27 16:20:23 +01:00
ops-loongson2.c MIPS: Loongson: Change the Email address of Wu Zhangjin 2010-02-27 12:53:12 +01:00
ops-mace.c [MIPS] Enable FAST-20 for onboard scsi 2008-07-15 18:44:31 +01:00
ops-msc.c
ops-nile4.c [MIPS] Add back support for LASAT platforms 2007-10-11 23:46:00 +01:00
ops-pmcmsp.c MIPS: Make various locks static. 2010-02-27 12:53:30 +01:00
ops-pnx8550.c MIPS: Kill unused <asm/debug.h> inclusions 2008-10-15 12:46:52 +01:00
ops-rc32434.c [MIPS] Routerboard 532: Support for base system 2008-07-20 14:38:18 +01:00
ops-sni.c [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
ops-titan-ht.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
ops-titan.c [MIPS] Support for the RM9000-based Basler eXcite smart camera platform. 2006-06-19 17:39:26 +01:00
ops-tx3927.c [MIPS] TXx9: PCI error handling 2008-07-30 21:54:38 +01:00
ops-tx4927.c [MIPS] TXx9: PCI error handling 2008-07-30 21:54:38 +01:00
ops-vr41xx.c Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
pci-bcm47xx.c MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
pci-bcm63xx.c MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
pci-bcm63xx.h MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
pci-bcm1480.c MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
pci-bcm1480ht.c MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
pci-emma2rh.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
pci-ip27.c MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
pci-ip32.c [MIPS] Fix IP32 breakage 2008-01-07 15:32:03 +00:00
pci-lasat.c [MIPS] Remove mips_machtype for LASAT machines 2008-07-15 18:44:39 +01:00
pci-octeon.c MIPS: Cleanup switches with cases that can be merged 2010-02-27 12:53:14 +01:00
pci-rc32434.c MIPS: RC32434: Define io_map_base for PCI controller 2009-01-30 21:32:59 +00:00
pci-sb1250.c MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
pci-tx4927.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
pci-tx4938.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
pci-tx4939.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
pci-vr41xx.c Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
pci-vr41xx.h Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
pci-yosemite.c [MIPS] C99-ify struct resource initialization. 2006-06-19 17:39:20 +01:00
pci.c MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses 2010-02-27 12:53:44 +01:00
pcie-octeon.c MIPS: Octeon PCIe: Make hardware and software bus numbers match. 2009-08-03 17:52:44 +01:00