linux/arch/arm/mach-pxa
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
..
include/mach [ARM] pxa: fix for variables in uncompress.h being discarded 2010-03-22 12:03:04 +08:00
am200epd.c
am300epd.c broadsheetfb: add multiple panel type support 2010-03-12 15:52:32 -08:00
balloon3.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
capc7117.c [ARM] pxa: add support for Embedian MXM-8x10 2010-03-02 07:40:51 +08:00
clock.c ARM: Consolidate clks_register() and similar 2010-02-12 17:32:36 +00:00
clock.h ARM: Consolidate clks_register() and similar 2010-02-12 17:32:36 +00:00
cm-x2xx-pci.c [ARM] pxa: use chip->ack() instead of accessing GEDR directly 2010-03-02 07:40:45 +08:00
cm-x2xx-pci.h
cm-x2xx.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
cm-x255.c [ARM] pxa: simplify the LCD pin configuration for pxa25x platforms 2010-03-02 07:40:46 +08:00
cm-x270.c [ARM] pxa/cm-x270: avoid direct access of GPIO/MFP registers 2010-03-02 07:40:48 +08:00
cm-x300.c [ARM] pxa/cm-x300: add PWM backlight support 2009-12-16 16:49:22 +08:00
colibri-pxa3xx.c pxa3xx_nand: move pxa3xx_nand.h common into plat directory 2009-12-01 09:02:43 +08:00
colibri-pxa270.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
colibri-pxa300.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
colibri-pxa320.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
corgi_lcd.c
corgi_pm.c [ARM] pxa/zaurus: rename spitz_battery_levels_* to sharpsl_* 2009-12-01 09:03:01 +08:00
corgi_ssp.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
corgi.c [ARM] pxa/corgi: fix incorrect default GPIO for UDC Vbus 2010-01-13 21:01:08 +08:00
cpufreq-pxa2xx.c
cpufreq-pxa3xx.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
csb701.c
csb726.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
devices.c [ARM] pxa: fix no reference of cpu_is_pxa25x() in devices.c 2009-12-16 21:35:52 +08:00
devices.h
e330.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
e350.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
e400.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
e740.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
e750.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
e800.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
em-x270.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
eseries.c ARM: Consolidate clks_register() and similar 2010-02-12 17:32:36 +00:00
eseries.h
ezx.c [ARM] pxa/ezx: add leds-lp3944 support for A910 EZX phone 2009-12-01 09:03:03 +08:00
generic.c
generic.h [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
gumstix.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
h5000.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
himalaya.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
hx4700.c [ARM] pxa/hx4700: actually use platform_lcd driver 2009-12-01 09:03:15 +08:00
icontrol.c [ARM] pxa: add support for Embedian MXM-8x10 2010-03-02 07:40:51 +08:00
idp.c [ARM] pxa: simplify the LCD pin configuration for pxa25x platforms 2010-03-02 07:40:46 +08:00
imote2.c [ARM] pxa: remove spi cs gpio direction to avoid clash with driver 2010-03-22 12:03:06 +08:00
irq.c [ARM] pxa: fix irq suspend/resume for pxa25x 2010-01-13 21:01:09 +08:00
Kconfig [ARM] pxa/sharpsl: add dependency of max1111 driver to sharpsl_pm 2010-03-22 12:03:07 +08:00
leds-idp.c
leds-lubbock.c
leds-mainstone.c
leds.c
leds.h
littleton.c [ARM] pxa/littleton: add UART3 GPIO config 2009-12-29 14:11:28 +08:00
lpd270.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
lubbock.c [ARM] sa1111: allow cascaded IRQs to be used by platforms 2010-03-02 07:40:51 +08:00
magician.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
mainstone.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
Makefile [ARM] pxa: add support for Embedian MXM-8x10 2010-03-02 07:40:51 +08:00
Makefile.boot
mfp-pxa2xx.c
mfp-pxa3xx.c
mioa701_bootresume.S
mioa701.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
mp900.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
mxm8x10.c [ARM] pxa: add support for Embedian MXM-8x10 2010-03-02 07:40:51 +08:00
palmld.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
palmt5.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
palmtc.c [ARM] pxa: simplify the LCD pin configuration for pxa25x platforms 2010-03-02 07:40:46 +08:00
palmte2.c [ARM] pxa: simplify the LCD pin configuration for pxa25x platforms 2010-03-02 07:40:46 +08:00
palmtreo.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
palmtx.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
palmz72.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
pcm027.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
pcm990-baseboard.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
pm.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
poodle.c [ARM] locomo: allow cascaded IRQ base to be specified by platforms 2010-03-02 07:40:50 +08:00
pxa2xx.c
pxa3xx.c ARM: Consolidate clks_register() and similar 2010-02-12 17:32:36 +00:00
pxa25x.c ARM: Consolidate clks_register() and similar 2010-02-12 17:32:36 +00:00
pxa27x.c Merge branch 'origin' into devel-stable 2010-03-08 20:21:04 +00:00
pxa300.c ARM: Consolidate clks_register() and similar 2010-02-12 17:32:36 +00:00
pxa320.c ARM: Consolidate clks_register() and similar 2010-02-12 17:32:36 +00:00
pxa930.c
raumfeld.c [ARM] pxa/raumfeld: fix button name 2010-03-22 12:03:11 +08:00
reset.c
saar.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
sharpsl_pm.c platform-drivers: move probe to .devinit.text in arch/arm 2010-03-07 17:04:50 -08:00
sharpsl.h [ARM] pxa/zaurus: rename spitz_battery_levels_* to sharpsl_* 2009-12-01 09:03:01 +08:00
sleep.S
smemc.c
spitz_pm.c [ARM] pxa/zaurus: rename spitz_battery_levels_* to sharpsl_* 2009-12-01 09:03:01 +08:00
spitz.c [ARM] pxa: simplify the LCD pin configuration for pxa27x platforms 2010-03-02 07:40:47 +08:00
ssp.c [ARM] pxa: introduce PXA_SSP_LEGACY for legacy SSP API 2010-03-02 07:40:52 +08:00
standby.S
stargate2.c [ARM] pxa: remove spi cs gpio direction to avoid clash with driver 2010-03-22 12:03:06 +08:00
tavorevb.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
time.c arm/{pxa,sa1100,nomadik}: Don't disable irqs in set_next_event and set_mode 2010-01-22 17:04:52 +01:00
tosa-bt.c
tosa.c [ARM] pxa/tosa: make use of the matrix keypad driver 2010-03-02 07:40:48 +08:00
trizeps4.c [ARM] pxa: add the missing AC97 pin configurations 2010-03-02 07:40:48 +08:00
viper.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
xcep.c [ARM] pxa: allow platforms to control which uarts are registered 2009-12-01 09:02:55 +08:00
zeus.c [ARM] pxa/zeus: Add support for mcp2515 CAN bus 2010-03-02 07:40:59 +08:00
zylonite_pxa300.c [ARM] pxa/zylonite: simplify reduntant gpio settings on mmc slot 2009-12-29 14:11:34 +08:00
zylonite_pxa320.c [ARM] pxa/zylonite: simplify reduntant gpio settings on mmc slot 2009-12-29 14:11:34 +08:00
zylonite.c [ARM] pxa/zylonite: simplify reduntant gpio settings on mmc slot 2009-12-29 14:11:34 +08:00