mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 03:45:20 +07:00
ed2d265d12
"[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. |
||
---|---|---|
.. | ||
numachip | ||
uv | ||
visws | ||
xen | ||
a.out-core.h | ||
a.out.h | ||
acpi.h | ||
aes.h | ||
agp.h | ||
alternative-asm.h | ||
alternative.h | ||
amd_nb.h | ||
apb_timer.h | ||
apic_flat_64.h | ||
apic.h | ||
apicdef.h | ||
apm.h | ||
arch_hweight.h | ||
archrandom.h | ||
asm-offsets.h | ||
asm.h | ||
atomic64_32.h | ||
atomic64_64.h | ||
atomic.h | ||
auxvec.h | ||
bios_ebda.h | ||
bitops.h | ||
bitsperlong.h | ||
boot.h | ||
bootparam.h | ||
bug.h | ||
bugs.h | ||
byteorder.h | ||
cache.h | ||
cacheflush.h | ||
calgary.h | ||
calling.h | ||
ce4100.h | ||
checksum_32.h | ||
checksum_64.h | ||
checksum.h | ||
clocksource.h | ||
cmpxchg_32.h | ||
cmpxchg_64.h | ||
cmpxchg.h | ||
compat.h | ||
cpu_device_id.h | ||
cpu.h | ||
cpufeature.h | ||
cpumask.h | ||
cputime.h | ||
current.h | ||
debugreg.h | ||
delay.h | ||
desc_defs.h | ||
desc.h | ||
device.h | ||
div64.h | ||
dma-mapping.h | ||
dma.h | ||
dmi.h | ||
dwarf2.h | ||
e820.h | ||
edac.h | ||
efi.h | ||
elf.h | ||
emergency-restart.h | ||
entry_arch.h | ||
errno.h | ||
fb.h | ||
fcntl.h | ||
fixmap.h | ||
floppy.h | ||
fpu-internal.h | ||
frame.h | ||
ftrace.h | ||
futex.h | ||
gart.h | ||
genapic.h | ||
geode.h | ||
gpio.h | ||
hardirq.h | ||
highmem.h | ||
hpet.h | ||
hugetlb.h | ||
hw_breakpoint.h | ||
hw_irq.h | ||
hypertransport.h | ||
hyperv.h | ||
hypervisor.h | ||
i387.h | ||
i8259.h | ||
ia32_unistd.h | ||
ia32.h | ||
idle.h | ||
inat_types.h | ||
inat.h | ||
init.h | ||
insn.h | ||
inst.h | ||
intel_scu_ipc.h | ||
io_apic.h | ||
io.h | ||
ioctl.h | ||
ioctls.h | ||
iomap.h | ||
iommu_table.h | ||
iommu.h | ||
ipcbuf.h | ||
ipi.h | ||
irq_regs.h | ||
irq_remapping.h | ||
irq_vectors.h | ||
irq.h | ||
irqflags.h | ||
ist.h | ||
jump_label.h | ||
Kbuild | ||
kdebug.h | ||
kexec.h | ||
kgdb.h | ||
kmap_types.h | ||
kmemcheck.h | ||
kprobes.h | ||
kvm_emulate.h | ||
kvm_host.h | ||
kvm_para.h | ||
kvm.h | ||
ldt.h | ||
lguest_hcall.h | ||
lguest.h | ||
linkage.h | ||
local64.h | ||
local.h | ||
mach_timer.h | ||
mach_traps.h | ||
math_emu.h | ||
mc146818rtc.h | ||
mca_dma.h | ||
mca.h | ||
mce.h | ||
microcode.h | ||
mman.h | ||
mmconfig.h | ||
mmu_context.h | ||
mmu.h | ||
mmx.h | ||
mmzone_32.h | ||
mmzone_64.h | ||
mmzone.h | ||
module.h | ||
mpspec_def.h | ||
mpspec.h | ||
mrst-vrtc.h | ||
mrst.h | ||
msgbuf.h | ||
mshyperv.h | ||
msidef.h | ||
msr-index.h | ||
msr.h | ||
mtrr.h | ||
mutex_32.h | ||
mutex_64.h | ||
mutex.h | ||
mwait.h | ||
nmi.h | ||
nops.h | ||
numa_32.h | ||
numa_64.h | ||
numa.h | ||
numaq.h | ||
olpc_ofw.h | ||
olpc.h | ||
page_32_types.h | ||
page_32.h | ||
page_64_types.h | ||
page_64.h | ||
page_types.h | ||
page.h | ||
param.h | ||
paravirt_types.h | ||
paravirt.h | ||
parport.h | ||
pat.h | ||
pci_64.h | ||
pci_x86.h | ||
pci-direct.h | ||
pci-functions.h | ||
pci.h | ||
percpu.h | ||
perf_event_p4.h | ||
perf_event.h | ||
pgalloc.h | ||
pgtable_32_types.h | ||
pgtable_32.h | ||
pgtable_64_types.h | ||
pgtable_64.h | ||
pgtable_types.h | ||
pgtable-2level_types.h | ||
pgtable-2level.h | ||
pgtable-3level_types.h | ||
pgtable-3level.h | ||
pgtable.h | ||
poll.h | ||
posix_types_32.h | ||
posix_types_64.h | ||
posix_types.h | ||
prctl.h | ||
probe_roms.h | ||
processor-cyrix.h | ||
processor-flags.h | ||
processor.h | ||
prom.h | ||
proto.h | ||
ptrace-abi.h | ||
ptrace.h | ||
pvclock-abi.h | ||
pvclock.h | ||
reboot_fixups.h | ||
reboot.h | ||
required-features.h | ||
resource.h | ||
resume-trace.h | ||
rio.h | ||
rtc.h | ||
rwlock.h | ||
rwsem.h | ||
scatterlist.h | ||
seccomp_32.h | ||
seccomp_64.h | ||
seccomp.h | ||
sections.h | ||
segment.h | ||
sembuf.h | ||
serial.h | ||
serpent.h | ||
setup_arch.h | ||
setup.h | ||
shmbuf.h | ||
shmparam.h | ||
sigcontext32.h | ||
sigcontext.h | ||
sigframe.h | ||
siginfo.h | ||
signal.h | ||
smp.h | ||
smpboot_hooks.h | ||
socket.h | ||
sockios.h | ||
sparsemem.h | ||
spinlock_types.h | ||
spinlock.h | ||
stackprotector.h | ||
stacktrace.h | ||
stat.h | ||
statfs.h | ||
string_32.h | ||
string_64.h | ||
string.h | ||
suspend_32.h | ||
suspend_64.h | ||
suspend.h | ||
svm.h | ||
swab.h | ||
swiotlb.h | ||
sync_bitops.h | ||
sys_ia32.h | ||
syscall.h | ||
syscalls.h | ||
system.h | ||
tce.h | ||
termbits.h | ||
termios.h | ||
thread_info.h | ||
time.h | ||
timer.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
topology.h | ||
trampoline.h | ||
traps.h | ||
tsc.h | ||
types.h | ||
uaccess_32.h | ||
uaccess_64.h | ||
uaccess.h | ||
ucontext.h | ||
unaligned.h | ||
unistd.h | ||
user32.h | ||
user_32.h | ||
user_64.h | ||
user.h | ||
vdso.h | ||
vga.h | ||
vgtod.h | ||
virtext.h | ||
vm86.h | ||
vmx.h | ||
vsyscall.h | ||
vvar.h | ||
x2apic.h | ||
x86_init.h | ||
xcr.h | ||
xor_32.h | ||
xor_64.h | ||
xor.h | ||
xsave.h |