kernel-fxtec-pro1x/drivers/gpu/drm/radeon
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
..
reg_srcs drm/radeon/kms: r600/r700 command stream checker 2010-02-11 19:03:45 +10:00
.gitignore
atom-bits.h
atom-names.h
atom-types.h
atom.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
atom.h drm/radeon/kms/atom: upstream parser updates 2010-01-21 08:20:28 +10:00
atombios.h No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h 2010-02-12 10:31:37 +01:00
atombios_crtc.c drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
atombios_dp.c Merge remote branch 'korg/drm-radeon-testing' into drm-next-stage 2010-02-26 16:23:23 +10:00
avivod.h [rfc] drm/radeon/kms: pm debugging check for vbl. 2010-02-23 09:46:21 +10:00
evergreen.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
evergreen_reg.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
Kconfig drm/radeon/kms: change Kconfig text to reflect the new option. 2010-02-08 15:05:58 +10:00
Makefile drm/radeon: fix typo in Makefile 2010-03-02 06:32:47 +10:00
mkregtable.c drm/radeon: mkregtable.c: close a file before exit 2010-01-08 13:11:55 +10:00
ObjectID.h drm/radeon/kms: pull in the latest upstream ObjectID.h changes 2010-01-08 13:03:57 +10:00
r100.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
r100_track.h
r100d.h
r200.c drm/radeon: Add asic hook for dma copy to r200 cards. 2010-02-18 14:47:54 +10:00
r300.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
r300_cmdbuf.c drm/radeon: Fix printf type warning in 64bit system. 2010-03-01 22:21:37 +11:00
r300_reg.h drm/radeon/kms: add support for square microtiles on r3xx-r5xx 2010-02-25 11:36:12 +10:00
r300d.h
r420.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
r420d.h
r500_reg.h drm/radeon/kms: add support for hw i2c on r1xx-r5xx 2010-02-09 09:31:10 +10:00
r520.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
r520d.h
r600.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
r600_audio.c drm/radeon/kms: do not disable audio engine twice 2010-03-01 16:09:43 +10:00
r600_blit.c drm/radeon: use ALIGN instead of open coding it 2010-03-01 15:56:41 +10:00
r600_blit_kms.c drm/radeon: use ALIGN instead of open coding it 2010-03-01 15:56:41 +10:00
r600_blit_shaders.c drm/radeon/kms/r600: reduce gpu cache flushing 2010-02-09 09:32:24 +10:00
r600_blit_shaders.h
r600_cp.c drm/radeon: fixes for r6xx/r7xx gfx init 2010-02-23 09:46:23 +10:00
r600_cs.c drm/radeon/r600: fix warnings in CS checker 2010-02-18 14:20:58 +10:00
r600_hdmi.c
r600_reg.h
r600d.h drm/radeon/kms: r600/r700 command stream checker 2010-02-11 19:03:45 +10:00
radeon.h vga_switcheroo: fix build on platforms with no ACPI 2010-03-01 22:21:58 +11:00
radeon_agp.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
radeon_asic.h drm/radeon/kms: initialize set_surface_reg reg for rs600 asic 2010-03-01 15:50:37 +10:00
radeon_atombios.c Merge remote branch 'korg/drm-radeon-testing' into drm-next-stage 2010-02-26 16:23:23 +10:00
radeon_atpx_handler.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
radeon_benchmark.c drm/radeon: Skip dma copy test in benchmark if card doesn't have dma engine. 2010-02-11 13:13:25 +10:00
radeon_bios.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
radeon_clocks.c drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_combios.c Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-03-04 07:49:37 -08:00
radeon_connectors.c Merge remote branch 'korg/drm-radeon-testing' into drm-next-stage 2010-02-26 16:23:23 +10:00
radeon_cp.c drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond 2010-03-01 16:08:22 +10:00
radeon_cs.c Merge remote branch 'korg/drm-core-next' into drm-next-stage 2010-02-25 13:39:29 +10:00
radeon_cursor.c Merge remote branch 'korg/drm-radeon-testing' into drm-next-stage 2010-02-26 16:23:23 +10:00
radeon_device.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
radeon_display.c Merge remote branch 'korg/drm-radeon-testing' into drm-next-stage 2010-02-26 16:23:23 +10:00
radeon_drv.c drm/radeon/kms: bump the KMS version number for square tiling support. 2010-03-01 16:32:15 +10:00
radeon_drv.h vga_switcheroo: fix build on platforms with no ACPI 2010-03-01 22:21:58 +11:00
radeon_encoders.c drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_family.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_fb.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
radeon_fence.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
radeon_fixed.h
radeon_gart.c drm/radeon/kms: set gart pages to invalid on unbind and point to dummy page 2010-02-11 19:11:32 +10:00
radeon_gem.c Use drm_gem_object_[handle_]unreference_unlocked where possible 2010-02-11 14:22:34 +10:00
radeon_i2c.c drm/radeon/kms/evergreen: adapt to i2c changes 2010-02-11 13:39:12 +10:00
radeon_ioc32.c
radeon_irq.c gpu/drm/radeon/radeon_irq.c: move a dereference below a NULL test 2010-01-07 13:56:32 +10:00
radeon_irq_kms.c PCI quirk: RS780/RS880: work around missing MSI initialization 2010-03-24 13:21:38 -07:00
radeon_kms.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
radeon_legacy_crtc.c drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
radeon_legacy_encoders.c drm/radeon/kms: add dynamic engine reclocking (V9) 2010-02-09 09:32:26 +10:00
radeon_legacy_tv.c drm/radeon: fix a couple of array index errors 2010-01-08 13:05:16 +10:00
radeon_mem.c
radeon_mode.h drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
radeon_object.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
radeon_object.h drm/radeon/kms: fix bo's fence association 2010-02-18 15:07:04 +10:00
radeon_pm.c drm/radeon/kms: implement reading active PCIE lanes on R600+ 2010-02-23 09:48:56 +10:00
radeon_reg.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_ring.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
radeon_state.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
radeon_test.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
radeon_ttm.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
rs100d.h
rs400.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
rs400d.h
rs600.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
rs600d.h
rs690.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
rs690d.h
rv200d.h
rv250d.h
rv350d.h
rv515.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
rv515d.h
rv770.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
rv770d.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00