alistair23-linux/arch/ia64/include/asm
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
..
native ia64/pv_ops: paravirtualize gate.S. 2009-03-26 11:01:46 -07:00
sn tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
uv sgi-gru: add macros for using the UV hub to send interrupts 2009-04-02 19:05:05 -07:00
xen xen: Remove unnecessary arch specific xen irq functions. 2010-02-18 17:17:58 -08:00
acpi-ext.h
acpi.h Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2010-03-01 10:14:46 -08:00
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asmmacro.h
atomic.h asm-generic: rename atomic.h to atomic-long.h 2009-06-11 21:02:17 +02:00
auxvec.h
bitops.h locking: Convert __raw_spin* functions to arch_spin* 2009-12-14 23:55:32 +01:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
break.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
checksum.h
compat.h improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
cpu.h
cputime.h cputime: Optimize jiffies_to_cputime(1) 2009-08-03 14:48:36 +02:00
current.h
cyclone.h
delay.h
device.h Driver Core: Add platform device arch data V3 2009-07-22 00:28:38 +02:00
div64.h
dma-mapping.h dma-mapping: fix off-by-one error in dma_capable() 2009-12-16 07:20:12 -08:00
dma.h
dmi.h 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
elf.h elf coredump: replace ELF_CORE_EXTRA_* macros by functions 2010-03-06 11:26:45 -08:00
emergency-restart.h
errno.h
esi.h
fb.h
fcntl.h
fpswa.h
fpu.h Revert "Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h" 2009-07-17 06:35:05 -07:00
ftrace.h [IA64] sanity in #include files. Move fnptr to types.h 2010-01-06 15:52:35 -08:00
futex.h
gcc_intrin.h [IA64] Convert ia64 to use int-ll64.h 2009-06-17 09:33:49 -07:00
hardirq.h preempt-count: force hardirq-count to max of 10 2009-02-12 11:19:05 -05:00
hpsim.h
hugetlb.h
hw_irq.h [IA64] preallocate IA64_IRQ_MOVE_VECTOR 2009-12-14 16:03:36 -08:00
ia64regs.h
idle.h [IA64] xen_domu_defconfig: fix build issues/warnings 2009-05-05 11:43:13 -07:00
intel_intrin.h
intrinsics.h Pull pvops into release branch 2009-03-31 14:25:08 -07:00
io.h implement early_io{re,un}map for ia64 2009-12-16 02:45:10 +00:00
ioctl.h
ioctls.h
iommu.h intel-iommu: Fix one last ia64 build problem in Pass Through Support 2009-06-05 20:49:53 +01:00
iosapic.h
ipcbuf.h
irq.h ia64: move nr-irqs.h to include/generated 2009-12-12 13:08:14 +01:00
irq_regs.h
Kbuild [IA64] unexport fpswa.h 2009-06-15 14:32:54 -07:00
kdebug.h
kexec.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kprobes.h [IA64] sanity in #include files. Move fnptr to types.h 2010-01-06 15:52:35 -08:00
kregs.h
kvm.h KVM: Maintain back mapping from irqchip/pin to gsi 2009-12-03 09:32:07 +02:00
kvm_host.h KVM: Move irq ack notifier list to arch independent code 2009-12-03 09:32:07 +02:00
kvm_para.h KVM: Add __KERNEL__ guards to exported headers 2009-09-10 10:46:48 +03:00
libata-portmap.h
linkage.h
local.h
machvec.h Merge branch 'linus' into core/iommu 2009-01-16 10:09:10 +01:00
machvec_dig.h
machvec_dig_vtd.h
machvec_hpsim.h
machvec_hpzx1.h
machvec_hpzx1_swiotlb.h
machvec_init.h
machvec_sn2.h Merge branch 'linus' into core/iommu 2009-01-16 10:09:10 +01:00
machvec_uv.h
machvec_xen.h
mc146818rtc.h
mca.h [IA64] Save I-resources to ia64_sal_os_state 2009-12-14 16:37:58 -08:00
mca_asm.h
meminit.h ia64: don't alias VMALLOC_END to vmalloc_end 2009-10-02 13:28:55 +09:00
mman.h mm: remove duplicate asm/mman.h files 2009-09-22 07:17:42 -07:00
mmu.h
mmu_context.h cpumask: use mm_cpumask() wrapper: ia64 2009-03-16 14:12:48 +10:30
mmzone.h mm: clean up for early_pfn_to_nid() 2009-02-18 15:37:55 -08:00
module.h ia64/pv_ops/bp/module: support binary patching for kernel module. 2009-03-26 11:02:51 -07:00
msgbuf.h
msidef.h ia64: Move the macro definitions related to MSI to one header file. 2009-03-24 11:03:12 +02:00
mutex.h
nodedata.h
numa.h hugetlb: add generic definition of NUMA_NO_NODE 2009-12-15 08:53:12 -08:00
page.h
pal.h [IA64] Convert ia64 to use int-ll64.h 2009-06-17 09:33:49 -07:00
param.h
paravirt.h ia64/pv_ops: implement binary patching optimization for native. 2009-03-26 11:02:42 -07:00
paravirt_patch.h ia64/pv_op/binarypatch: add helper functions to support binary patching for paravirt_ops. 2009-03-26 11:02:31 -07:00
paravirt_privop.h [IA64] fix allmodconfig compilation breakage. 2009-04-20 09:46:29 -07:00
parport.h
patch.h
pci.h pci-dma: add linux/pci-dma.h to linux/pci.h 2010-03-12 15:52:42 -08:00
percpu.h percpu: remove per_cpu__ prefix. 2009-10-29 22:34:15 +09:00
perfmon.h
perfmon_default_smpl.h tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
pgalloc.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable.h MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
poll.h
posix_types.h
processor.h [IA64] Remove COMPAT_IA32 support 2010-02-08 10:42:17 -08:00
ptrace.h ptrace: move user_enable_single_step & co prototypes to linux/ptrace.h 2010-03-12 15:52:38 -08:00
ptrace_offsets.h
pvclock-abi.h
resource.h
rse.h
rwsem.h [IA64] Replace old style lock initializer 2009-12-14 16:39:45 -08:00
sal.h [IA64] Convert ia64 to use int-ll64.h 2009-06-17 09:33:49 -07:00
scatterlist.h [IA64] use asm-generic/scatterlist.h 2010-02-26 11:14:24 -08:00
sections.h
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
smp.h cpumask: remove arch_send_call_function_ipi 2009-09-24 09:34:47 +09:30
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
sparsemem.h
spinlock.h locking: Convert raw_rwlock functions to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
stat.h
statfs.h
string.h
swab.h headers_check fix: ia64, swab.h 2009-02-01 11:01:25 +05:30
swiotlb.h swiotlb: Remove duplicate swiotlb_force extern declarations 2009-11-15 09:03:10 +01:00
sync_bitops.h
syscall.h [IA64] Remove COMPAT_IA32 support 2010-02-08 10:42:17 -08:00
system.h [IA64] Remove COMPAT_IA32 support 2010-02-08 10:42:17 -08:00
termbits.h
termios.h
thread_info.h sched: INIT_PREEMPT_COUNT 2009-07-10 14:24:05 -07:00
timex.h ia64/pv_ops/pv_time_ops: add sched_clock hook. 2009-03-26 10:50:42 -07:00
tlb.h [IA64] __per_cpu_idtrs[] is a memory hog 2010-01-07 16:10:57 -08:00
tlbflush.h
topology.h [IA64] cpumask_of_node() should handle -1 as a node 2010-01-06 15:47:57 -08:00
types.h [IA64] move fnptr definition inside #ifdef __KERNEL__ 2010-01-08 10:53:28 -08:00
uaccess.h
ucontext.h
unaligned.h
uncached.h
unistd.h [IA64] Remove COMPAT_IA32 support 2010-02-08 10:42:17 -08:00
unwind.h
user.h
ustack.h
vga.h
xor.h