Subject: + x86-always-define-bug-and-have_arch_bug-even-with-config_bug.patch added to -mm tree To: josh@xxxxxxxxxxxxxxxx,arnd@xxxxxxxx,hpa@xxxxxxxxx,mingo@xxxxxxx,tglx@xxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 10 Mar 2014 12:50:33 -0700 The patch titled Subject: x86: always define BUG() and HAVE_ARCH_BUG, even with !CONFIG_BUG has been added to the -mm tree. Its filename is x86-always-define-bug-and-have_arch_bug-even-with-config_bug.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/x86-always-define-bug-and-have_arch_bug-even-with-config_bug.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/x86-always-define-bug-and-have_arch_bug-even-with-config_bug.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Josh Triplett <josh@xxxxxxxxxxxxxxxx> Subject: x86: always define BUG() and HAVE_ARCH_BUG, even with !CONFIG_BUG This ensures that BUG() always has a definition that causes a trap (via an undefined instruction), and that the compiler still recognizes the code following BUG() as unreachable, avoiding warnings that would otherwise appear (such as on non-void functions that don't return a value after BUG()). In addition to saving a few bytes over the generic infinite-loop implementation, this implementation traps rather than looping, which potentially allows for better error-recovery behavior (such as by rebooting). Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx> Reported-by: Arnd Bergmann <arnd@xxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86/include/asm/bug.h | 3 --- 1 file changed, 3 deletions(-) diff -puN arch/x86/include/asm/bug.h~x86-always-define-bug-and-have_arch_bug-even-with-config_bug arch/x86/include/asm/bug.h --- a/arch/x86/include/asm/bug.h~x86-always-define-bug-and-have_arch_bug-even-with-config_bug +++ a/arch/x86/include/asm/bug.h @@ -1,7 +1,6 @@ #ifndef _ASM_X86_BUG_H #define _ASM_X86_BUG_H -#ifdef CONFIG_BUG #define HAVE_ARCH_BUG #ifdef CONFIG_DEBUG_BUGVERBOSE @@ -33,8 +32,6 @@ do { \ } while (0) #endif -#endif /* !CONFIG_BUG */ - #include <asm-generic/bug.h> #endif /* _ASM_X86_BUG_H */ _ Patches currently in -mm which might be from josh@xxxxxxxxxxxxxxxx are mm-compactionc-mark-function-as-static.patch mm-memoryc-mark-functions-as-static.patch mm-mmapc-mark-function-as-static.patch mm-process_vm_accessc-mark-function-as-static.patch mm-process_vm_accessc-mark-function-as-static-fix.patch mm-page_cgroupc-mark-functions-as-static.patch mm-nobootmemc-mark-function-as-static.patch include-linux-mmh-remove-ifdef-condition.patch include-linux-syscallsh-add-sys32_quotactl-prototype.patch fs-kernel-permit-disabling-the-uselib-syscall.patch fs-kernel-permit-disabling-the-uselib-syscall-v2.patch submittingpatches-add-style-recommendation-to-use-imperative-descriptions.patch submittingpatches-add-recommendation-for-mailing-list-references.patch submittingpatches-document-the-use-of-git.patch lglock-map-to-spinlock-when-config_smp.patch lib-clz_ctzc-add-prototype-declarations-in-lib-clz_ctzc.patch lib-decompress_inflatec-include-appropriate-header-file.patch checkpatch-make-return-is-not-a-function-test-quieter.patch fs-reiserfs-move-prototype-declaration-to-header-file.patch include-linux-crash_dumph-add-vmcore_cleanup-prototype.patch include-linux-crash_dumph-add-vmcore_cleanup-prototype-fix.patch cris-make-etrax_arch_v10-select-tty-for-use-in-debugport.patch ia64-select-config_tty-for-use-of-tty_write_message-in-unaligned.patch ppc-make-ppc_book3s_64-select-irq_work.patch s390-select-config_tty-for-use-of-tty-in-unconditional-keyboard-driver.patch kconfig-make-allnoconfig-disable-options-behind-embedded-and-expert.patch bug-when-config_bug-simplify-warn_on_once-and-family.patch include-asm-generic-bugh-style-fix-s-while0-while-0.patch bug-when-config_bug-make-warn-call-no_printk-to-check-format-and-args.patch bug-make-bug-always-stop-the-machine.patch x86-always-define-bug-and-have_arch_bug-even-with-config_bug.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html