WSL2-Linux-Kernel/arch/arm/mach-omap2
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 AM35xx: Introduce am35xx.h file 2010-02-15 10:03:35 -08:00
Kconfig Add minimal support for DevKit8000 2010-02-19 15:22:17 -08:00
Makefile omap4: Fix build break by moving omap_smc1 into a separate .S 2010-03-11 09:38:53 -08:00
Makefile.boot [ARM] 3145/1: OMAP 3a/5: Add support for omap24xx 2005-11-10 14:26:51 +00:00
board-2430sdp.c omap: musb: Pass board specific data from board file 2010-02-19 15:22:17 -08:00
board-3430sdp.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-3630sdp.c ARM/OMAP: Remove the +x bit from a couple of source files 2010-03-12 09:16:09 -08:00
board-4430sdp.c omap4: Fix build break by moving omap_smc1 into a separate .S 2010-03-11 09:38:53 -08:00
board-am3517evm.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-apollon.c omap2/3/4: Fix omap2_map_common_io for multi-omap 2010-02-15 09:26:58 -08:00
board-cm-t35.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-devkit8000.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-generic.c omap2/3/4: Fix omap2_map_common_io for multi-omap 2010-02-15 09:26:58 -08:00
board-h4.c omap: convert boards to use physmap-flash 2010-02-15 10:03:32 -08:00
board-igep0020.c omap3: Fix support for the LEDs connected to GPIO outputs on IGEP v2board 2010-03-11 14:50:00 -08:00
board-ldp.c omap: musb: Pass board specific data from board file 2010-02-19 15:22:17 -08:00
board-n8x0.c omap2: add USB initialization for tusb6010 2010-03-11 10:22:39 -08:00
board-omap3beagle.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-omap3evm.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-omap3pandora.c omap3: pandora: add missing i2c3 board_info 2010-03-11 15:55:43 -08:00
board-omap3touchbook.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-overo.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
board-rx51-peripherals.c omap: RX51: Remux to pull eMMC lines down when powering off 2010-02-15 10:03:34 -08:00
board-rx51-sdram.c omap3: rx51: Add SDRAM init 2009-11-22 10:24:33 -08:00
board-rx51.c Merge branch 'pm-2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus 2010-02-23 19:22:48 -08:00
board-sdp-flash.c omap3: SDP: Introducing 'board-sdp-flash.c' for flash init 2010-02-15 10:03:33 -08:00
board-zoom-debugboard.c omap3: zoom: rename zoom2 name to generic zoom 2009-11-22 10:24:33 -08:00
board-zoom-peripherals.c ARM/OMAP: Remove the +x bit from a couple of source files 2010-03-12 09:16:09 -08:00
board-zoom2.c omap2/3/4: Fix omap2_map_common_io for multi-omap 2010-02-15 09:26:58 -08:00
board-zoom3.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
clkt2xxx_apll.c OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files 2010-02-24 12:29:42 -07:00
clkt2xxx_dpllcore.c OMAP2xxx clock: move the DPLL+CORE composite clock code into mach-omap2/clkt2xxx_dpllcore.c 2010-01-26 20:13:06 -07:00
clkt2xxx_osc.c OMAP2xxx clock: move osc_clk code into mach-omap2/clkt2xxx_osc.c 2010-01-28 18:13:49 -07:00
clkt2xxx_sys.c OMAP2xxx clock: move sys_clk code into mach-omap2/clkt2xxx_sys.c 2010-01-28 18:13:49 -07:00
clkt2xxx_virt_prcm_set.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
clkt34xx_dpll3m2.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clkt_clksel.c OMAP clock: drop RATE_FIXED clock flag 2010-02-24 12:29:43 -07:00
clkt_dpll.c OMAP2/3/4 clock: fix DPLL multiplier value errors; also copyrights, includes, documentation 2010-02-24 12:15:03 -07:00
clock.c OMAP2+ clock: revise omap2_clk_{disable,enable}() 2010-02-24 17:45:16 -07:00
clock.h OMAP4: clock: Add dummy clock nodes for interface clocks 2010-02-24 17:45:17 -07:00
clock2xxx.c OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code 2010-02-24 17:45:15 -07:00
clock2xxx.h OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files 2010-02-24 12:29:42 -07:00
clock3xxx.c OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code 2010-02-24 17:45:15 -07:00
clock3xxx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock3xxx_data.c OMAP3: clock: add capability to change rate of dpll4_m5_ck_3630 2010-02-24 12:29:43 -07:00
clock34xx.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock34xx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock36xx.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock36xx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock44xx.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock44xx_data.c OMAP4: clock: Add dummy clock nodes for interface clocks 2010-02-24 17:45:17 -07:00
clock2420_data.c omap2: add USB initialization for tusb6010 2010-03-11 10:22:39 -08:00
clock2430.c OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files 2010-02-24 12:29:42 -07:00
clock2430_data.c OMAP clock: drop RATE_FIXED clock flag 2010-02-24 12:29:43 -07:00
clock3517.c OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock3517.h OMAP3/4 clock: split into per-chip family files 2010-02-24 12:16:15 -07:00
clock_common_data.c OMAP3 clock: convert clock34xx.h to clock34xx_data.c 2009-12-11 16:12:15 -07:00
clockdomain.c OMAP2+ clock: revise omap2_clk_{disable,enable}() 2010-02-24 17:45:16 -07:00
clockdomains.h omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2 2010-02-15 09:27:01 -08:00
clockdomains44xx.h ARM: OMAP4 clock domains : Add the missing Clock Domain Structure 2010-01-26 20:12:58 -07:00
cm-regbits-24xx.h [ARM] OMAP2 PRCM: clean up CM_IDLEST bits 2009-02-08 17:50:37 +00:00
cm-regbits-34xx.h OMAP3 clock: add support for 192Mhz DPLL4M2 output 2010-02-24 12:15:03 -07:00
cm-regbits-44xx.h OMAP4: PRCM: Define shift macros as n instead of 1 << n 2010-01-29 10:14:22 -07:00
cm.c OMAP clock/hwmod: fix off-by-one errors 2009-12-11 17:00:43 -07:00
cm.h OMAP2/3 clock: Extend find_idlest() to pass back idle state value 2010-02-24 12:05:54 -07:00
cm4xxx.c omap: Fix 44xx compile 2009-09-24 16:23:07 -07:00
cm44xx.h ARM: OMAP4: PM: Adds CM1/2 register defs for OMAP4 2009-12-11 17:00:45 -07:00
control.c omap2/3/4: ioremap omap_globals module 2010-02-23 10:57:40 -08:00
cpuidle34xx.c OMAP3: cpuidle: Add valid field into C-state parameter passing 2010-02-23 11:05:02 -08:00
devices.c omap4: Use irq line defines from irq-44xx.h 2010-02-23 15:29:08 -08:00
dpll3xxx.c OMAP2/3/4 clock: fix DPLL multiplier value errors; also copyrights, includes, documentation 2010-02-24 12:15:03 -07:00
emu.c omap2/3: Fix initcalls for multi-omap 2010-02-15 09:27:05 -08:00
gpmc-nand.c omap2/3/4: Introducing 'gpmc-nand.c' for GPMC specific NAND init 2010-02-15 10:03:33 -08:00
gpmc-onenand.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
gpmc-smc91x.c omap: use smc91x_platdata to setup smc91x 2009-12-11 16:16:33 -08:00
gpmc.c omap2/3/4: gpmc: kill compile warning 2010-02-15 10:03:33 -08:00
hsmmc.c omap_hsmmc: Allow for a shared VccQ 2010-02-15 10:03:34 -08:00
hsmmc.h omap_hsmmc: Allow for a shared VccQ 2010-02-15 10:03:34 -08:00
i2c.c omap: i2c: Fix muxing for command line enabled bus 2010-02-25 14:45:08 -08:00
id.c Merge branch 'for_2.6.34_b' of git://git.pwsan.com/linux-2.6 into omap-for-linus 2010-02-24 20:53:03 -08:00
io.c OMAP4: fix temporary hacks that break multi-omap PM 2010-03-11 15:55:43 -08:00
iommu2.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
irq.c OMAP2/3: IRQ: ensure valid base address 2010-02-03 08:48:06 -08:00
mailbox.c omap2/3/4: mailbox: remove compiler warning 2010-03-11 14:50:00 -08:00
mcbsp.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
mux.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
mux.h omap3: Replace ARCH_OMAP34XX with ARCH_OMAP3 2010-02-15 09:27:02 -08:00
mux34xx.c omap: Fix 3630 mux errors 2010-02-03 08:48:06 -08:00
mux34xx.h omap: mux: Add 36xx CBP package support 2009-12-11 16:16:33 -08:00
omap-headsmp.S OMAP4: AuxCoreBoot registers only accessible in secure mode 2009-12-11 16:16:35 -08:00
omap-smp.c OMAP4: Remove the secondary wait loop 2009-12-11 16:16:35 -08:00
omap3-iommu.c omap: iommu: reorganize 2009-11-22 10:24:32 -08:00
omap44xx-smc.S omap4: Fix build break by moving omap_smc1 into a separate .S 2010-03-11 09:38:53 -08:00
omap_hwmod.c OMAP hwmod: add hwmod class support 2010-02-24 17:45:14 -07:00
omap_hwmod_3xxx_data.c OMAP hwmod: add hwmod class support 2010-02-24 17:45:14 -07:00
omap_hwmod_2420_data.c OMAP hwmod: add hwmod class support 2010-02-24 17:45:14 -07:00
omap_hwmod_2430_data.c OMAP hwmod: add hwmod class support 2010-02-24 17:45:14 -07:00
omap_hwmod_common_data.c OMAP hwmod: add hwmod class support 2010-02-24 17:45:14 -07:00
omap_hwmod_common_data.h OMAP hwmod: add hwmod class support 2010-02-24 17:45:14 -07:00
opp2xxx.h omap2/3: Multiboot compile fixes to compile in omap2 and omap3 2010-02-15 09:26:55 -08:00
opp2420_data.c OMAP2xxx OPP: clean up comments in OPP data 2010-01-08 15:23:15 -07:00
opp2430_data.c OMAP2xxx OPP: clean up comments in OPP data 2010-01-08 15:23:15 -07:00
pm-debug.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
pm.h OMAP3: cpuidle: Add valid field into C-state parameter passing 2010-02-23 11:05:02 -08:00
pm24xx.c OMAP clockdomains: add usecounting for wakeup and sleep dependencies 2010-01-26 20:13:01 -07:00
pm34xx.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
powerdomain.c OMAP3 PM: Adding counters for power domain logic off and mem off during retention. 2010-02-24 12:05:50 -07:00
powerdomains.h OMAP2+ powerdomains/clockdomains: prepare for multi-OMAP configs 2010-01-29 10:14:23 -07:00
powerdomains24xx.h omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2 2010-02-15 09:27:01 -08:00
powerdomains34xx.h OMAP3 PM: Defining .pwrsts_logic_ret field for core power domain structure 2010-02-24 12:05:50 -07:00
powerdomains44xx.h ARM: OMAP4: PM: Add the Autogenerated OMAP4 specific power domain framework. 2010-01-26 20:12:52 -07:00
prcm-common.h ARM: OMAP4: PM: OMAP4 Power Domain Porting Related Clean-up. 2010-01-26 20:12:51 -07:00
prcm.c omap: pass the reboot command to the boot loader 2010-03-11 14:50:00 -08:00
prm-regbits-24xx.h ARM: OMAP2: Powerdomain: Add OMAP2 powerdomains 2008-08-19 11:08:42 +03:00
prm-regbits-34xx.h OMAP3: PM: Enable IO-CHAIN wakeup 2009-11-11 14:42:28 -08:00
prm-regbits-44xx.h OMAP4: PRCM: Define shift macros as n instead of 1 << n 2010-01-29 10:14:22 -07:00
prm.h ARM: OMAP4: PM: OMAP4 Power Domain Porting Related Clean-up. 2010-01-26 20:12:51 -07:00
prm44xx.h OMAP4: PRCM: Fix the base address for CHIRONSS reg defines 2010-01-20 13:35:27 -07:00
sdram-hynix-h8mbx00u0mer-0em.h omap3: zoom: Introduce zoom3 board support 2009-11-22 10:24:33 -08:00
sdram-micron-mt46h32m32lf-6.h omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sdram-numonyx-m65kxxxxam.h omap3: SDRC: add timing data for Numonyx M65KxxxxAM 2010-02-17 17:23:20 -08:00
sdram-qimonda-hyb18m512160af-6.h omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sdrc.c omap2/3/4: ioremap omap_globals module 2010-02-23 10:57:40 -08:00
sdrc.h OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx* 2009-12-11 16:16:00 -07:00
sdrc2xxx.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
serial.c OMAP2: serial.c: Fix number of uarts in early_init 2010-03-11 14:50:00 -08:00
sleep24xx.S omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sleep34xx.S OMAP3: PM: Added support for L2 aux ctrl register save and restore 2010-02-23 11:05:07 -08:00
sram34xx.S OMAP3: SDRC: Place SDRC AC timing and MR changes in CORE DVFS SRAM code behind Kconfig 2009-12-11 17:00:42 -07:00
sram242x.S omap: Split OMAP2_IO_ADDRESS to L3 and L4 2009-10-19 15:25:31 -07:00
sram243x.S omap: Split OMAP2_IO_ADDRESS to L3 and L4 2009-10-19 15:25:31 -07:00
timer-gp.c OMAP4: clock: Remove clock hacks from timer-gp.c 2010-02-24 17:45:17 -07:00
timer-mpu.c omap4: Use irq line defines from irq-44xx.h 2010-02-23 15:29:08 -08:00
usb-ehci.c omap2/3/4: ehci: avoid compiler error with touchbook 2010-03-11 09:32:03 -08:00
usb-musb.c omap4: Use irq line defines from irq-44xx.h 2010-02-23 15:29:08 -08:00
usb-tusb6010.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00