mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-16 10:39:01 +00:00
"[RFC - PATCH 0/7] consolidation of BUG support code." https://lkml.org/lkml/2012/1/26/525 -- The changes shown here are to unify linux's BUG support under the one <linux/bug.h> file. Due to historical reasons, we have some BUG code in bug.h and some in kernel.h -- i.e. the support for BUILD_BUG in linux/kernel.h predates the addition of linux/bug.h, but old code in kernel.h wasn't moved to bug.h at that time. As a band-aid, kernel.h was including <asm/bug.h> to pseudo link them. This has caused confusion[1] and general yuck/WTF[2] reactions. Here is an example that violates the principle of least surprise: CC lib/string.o lib/string.c: In function 'strlcat': lib/string.c:225:2: error: implicit declaration of function 'BUILD_BUG_ON' make[2]: *** [lib/string.o] Error 1 $ $ grep linux/bug.h lib/string.c #include <linux/bug.h> $ We've included <linux/bug.h> for the BUG infrastructure and yet we still get a compile fail! [We've not kernel.h for BUILD_BUG_ON.] Ugh - very confusing for someone who is new to kernel development. With the above in mind, the goals of this changeset are: 1) find and fix any include/*.h files that were relying on the implicit presence of BUG code. 2) find and fix any C files that were consuming kernel.h and hence relying on implicitly getting some/all BUG code. 3) Move the BUG related code living in kernel.h to <linux/bug.h> 4) remove the asm/bug.h from kernel.h to finally break the chain. During development, the order was more like 3-4, build-test, 1-2. But to ensure that git history for bisect doesn't get needless build failures introduced, the commits have been reorderd to fix the problem areas in advance. [1] https://lkml.org/lkml/2012/1/3/90 [2] https://lkml.org/lkml/2012/1/17/414 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJPbNwpAAoJEOvOhAQsB9HWrqYP/A0t9VB0nK6e42F0OR2P14MZ GJFtf1B++wwioIrx+KSWSRfSur1C5FKhDbxLR3I/pvkAYl4+T4JvRdMG6xJwxyip CC1kVQQNDjWVVqzjz2x6rYkOffx6dUlw/ERyIyk+OzP+1HzRIsIrugMqbzGLlX0X y0v2Tbd0G6xg1DV8lcRdp95eIzcGuUvdb2iY2LGadWZczEOeSXx64Jz3QCFxg3aL LFU4oovsg8Nb7MRJmqDvHK/oQf5vaTm9WSrS0pvVte0msSQRn8LStYdWC0G9BPCS GwL86h/eLXlUXQlC5GpgWg1QQt5i2QpjBFcVBIG0IT5SgEPMx+gXyiqZva2KwbHu LKicjKtfnzPitQnyEV/N6JyV1fb1U6/MsB7ebU5nCCzt9Gr7MYbjZ44peNeprAtu HMvJ/BNnRr4Ha6nPQNu952AdASPKkxmeXFUwBL1zUbLkOX/bK/vy1ujlcdkFxCD7 fP3t7hghYa737IHk0ehUOhrE4H67hvxTSCKioLUAy/YeN1IcfH/iOQiCBQVLWmoS AqYV6ou9cqgdYoyila2UeAqegb+8xyubPIHt+lebcaKxs5aGsTg+r3vq5juMDAPs iwSVYUDcIw9dHer1lJfo7QCy3QUTRDTxh+LB9VlHXQICgeCK02sLBOi9hbEr4/H8 Ko9g8J3BMxcMkXLHT9ud =PYQT -----END PGP SIGNATURE----- Merge tag 'bug-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull <linux/bug.h> cleanup from Paul Gortmaker: "The changes shown here are to unify linux's BUG support under the one <linux/bug.h> file. Due to historical reasons, we have some BUG code in bug.h and some in kernel.h -- i.e. the support for BUILD_BUG in linux/kernel.h predates the addition of linux/bug.h, but old code in kernel.h wasn't moved to bug.h at that time. As a band-aid, kernel.h was including <asm/bug.h> to pseudo link them. This has caused confusion[1] and general yuck/WTF[2] reactions. Here is an example that violates the principle of least surprise: CC lib/string.o lib/string.c: In function 'strlcat': lib/string.c:225:2: error: implicit declaration of function 'BUILD_BUG_ON' make[2]: *** [lib/string.o] Error 1 $ $ grep linux/bug.h lib/string.c #include <linux/bug.h> $ We've included <linux/bug.h> for the BUG infrastructure and yet we still get a compile fail! [We've not kernel.h for BUILD_BUG_ON.] Ugh - very confusing for someone who is new to kernel development. With the above in mind, the goals of this changeset are: 1) find and fix any include/*.h files that were relying on the implicit presence of BUG code. 2) find and fix any C files that were consuming kernel.h and hence relying on implicitly getting some/all BUG code. 3) Move the BUG related code living in kernel.h to <linux/bug.h> 4) remove the asm/bug.h from kernel.h to finally break the chain. During development, the order was more like 3-4, build-test, 1-2. But to ensure that git history for bisect doesn't get needless build failures introduced, the commits have been reorderd to fix the problem areas in advance. [1] https://lkml.org/lkml/2012/1/3/90 [2] https://lkml.org/lkml/2012/1/17/414" Fix up conflicts (new radeon file, reiserfs header cleanups) as per Paul and linux-next. * tag 'bug-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: kernel.h: doesn't explicitly use bug.h, so don't include it. bug: consolidate BUILD_BUG_ON with other bug code BUG: headers with BUG/BUG_ON etc. need linux/bug.h bug.h: add include of it to various implicit C users lib: fix implicit users of kernel.h for TAINT_WARN spinlock: macroize assert_spin_locked to avoid bug.h dependency x86: relocate get/set debugreg fcns to include/asm/debugreg. |
||
|---|---|---|
| .. | ||
| acpi | ||
| apic | ||
| cpu | ||
| .gitignore | ||
| alternative.c | ||
| amd_gart_64.c | ||
| amd_nb.c | ||
| apb_timer.c | ||
| aperture_64.c | ||
| apm_32.c | ||
| asm-offsets_32.c | ||
| asm-offsets_64.c | ||
| asm-offsets.c | ||
| audit_64.c | ||
| bootflag.c | ||
| check.c | ||
| cpuid.c | ||
| crash_dump_32.c | ||
| crash_dump_64.c | ||
| crash.c | ||
| devicetree.c | ||
| doublefault_32.c | ||
| dumpstack_32.c | ||
| dumpstack_64.c | ||
| dumpstack.c | ||
| e820.c | ||
| early_printk.c | ||
| early-quirks.c | ||
| entry_32.S | ||
| entry_64.S | ||
| ftrace.c | ||
| head32.c | ||
| head64.c | ||
| head_32.S | ||
| head_64.S | ||
| head.c | ||
| hpet.c | ||
| hw_breakpoint.c | ||
| i386_ksyms_32.c | ||
| i387.c | ||
| i8237.c | ||
| i8253.c | ||
| i8259.c | ||
| init_task.c | ||
| io_delay.c | ||
| ioport.c | ||
| irq_32.c | ||
| irq_64.c | ||
| irq_work.c | ||
| irq.c | ||
| irqinit.c | ||
| jump_label.c | ||
| kdebugfs.c | ||
| kgdb.c | ||
| kprobes-common.h | ||
| kprobes-opt.c | ||
| kprobes.c | ||
| kvm.c | ||
| kvmclock.c | ||
| ldt.c | ||
| machine_kexec_32.c | ||
| machine_kexec_64.c | ||
| Makefile | ||
| mca_32.c | ||
| microcode_amd.c | ||
| microcode_core.c | ||
| microcode_intel.c | ||
| mmconf-fam10h_64.c | ||
| module.c | ||
| mpparse.c | ||
| msr.c | ||
| nmi_selftest.c | ||
| nmi.c | ||
| paravirt_patch_32.c | ||
| paravirt_patch_64.c | ||
| paravirt-spinlocks.c | ||
| paravirt.c | ||
| pci-calgary_64.c | ||
| pci-dma.c | ||
| pci-iommu_table.c | ||
| pci-nommu.c | ||
| pci-swiotlb.c | ||
| pcspeaker.c | ||
| probe_roms.c | ||
| process_32.c | ||
| process_64.c | ||
| process.c | ||
| ptrace.c | ||
| pvclock.c | ||
| quirks.c | ||
| reboot_32.S | ||
| reboot_fixups_32.c | ||
| reboot.c | ||
| relocate_kernel_32.S | ||
| relocate_kernel_64.S | ||
| resource.c | ||
| rtc.c | ||
| setup_percpu.c | ||
| setup.c | ||
| signal.c | ||
| smp.c | ||
| smpboot.c | ||
| stacktrace.c | ||
| step.c | ||
| sys_i386_32.c | ||
| sys_x86_64.c | ||
| syscall_32.c | ||
| syscall_64.c | ||
| tboot.c | ||
| tce_64.c | ||
| test_nx.c | ||
| test_rodata.c | ||
| time.c | ||
| tls.c | ||
| tls.h | ||
| topology.c | ||
| trampoline_32.S | ||
| trampoline_64.S | ||
| trampoline.c | ||
| traps.c | ||
| tsc_sync.c | ||
| tsc.c | ||
| verify_cpu.S | ||
| vm86_32.c | ||
| vmlinux.lds.S | ||
| vsmp_64.c | ||
| vsyscall_64.c | ||
| vsyscall_emu_64.S | ||
| vsyscall_trace.h | ||
| x86_init.c | ||
| x8664_ksyms_64.c | ||
| xsave.c | ||