public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Daney <ddaney@caviumnetworks.com>
Cc: Brian Gerst <brgerst@gmail.com>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 11/11] Use unreachable() in asm-generic/bug.h for !CONFIG_BUG case.
Date: Mon, 14 Sep 2009 16:39:46 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0909141637250.4950@localhost.localdomain> (raw)
In-Reply-To: <4AAED18E.7030903@caviumnetworks.com>



On Mon, 14 Sep 2009, David Daney wrote:
> 
> The existing code just falls through to whatever happens to follow the BUG().

Brian was talking BUG_ON().

And the existing !CONFIG_BUG BUG_ON() is actually set up so that gcc will 
just optimize it away entirely (yet give the same compile-time warnings as 
the "real" BUG_ON() does).

Changing it to "if (cond) unreachable()" is likely to generate _more_ 
code, which is against the whole point of wanting to disable CONFIG_BUG.

			Linus

  reply	other threads:[~2009-09-14 23:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 21:50 [PATCH 00/11] Add support for GCC's __builtin_unreachable() and use it in BUG (v2) David Daney
2009-09-14 21:50 ` David Daney
2009-09-14 21:55 ` [PATCH 01/11] Add support for GCC-4.5's __builtin_unreachable() to compiler.h (v2) David Daney
2009-09-14 21:55   ` David Daney
2009-09-14 21:55 ` [PATCH 02/11] x86: Convert BUG() to use unreachable() David Daney
2009-09-14 21:55 ` [PATCH 03/11] MIPS: " David Daney
2009-09-14 21:55   ` David Daney
2009-09-15  8:39   ` [PATCH] MIPS: Make more use of unreachable() Ralf Baechle
2009-09-15  8:39     ` Ralf Baechle
2009-09-14 21:55 ` [PATCH 04/11] s390: Convert BUG() to use unreachable() David Daney
2009-09-14 21:55   ` David Daney
2009-09-14 21:55 ` [PATCH 05/11] mn10300: " David Daney
2009-09-14 21:55 ` [PATCH 06/11] parisc: " David Daney
2009-09-14 21:55 ` [PATCH 07/11] powerpc: " David Daney
2009-09-14 21:55   ` David Daney
2009-09-14 21:55 ` [PATCH 08/11] alpha: " David Daney
2009-09-14 21:55   ` David Daney
2009-09-14 21:55 ` [PATCH 09/11] avr32: " David Daney
     [not found] ` <4AAEBAC2.1050905-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2009-09-14 21:55   ` [PATCH 10/11] blackfin: " David Daney
2009-09-14 21:55     ` David Daney
2009-09-14 21:55 ` [PATCH 11/11] Use unreachable() in asm-generic/bug.h for !CONFIG_BUG case David Daney
2009-09-14 21:55   ` David Daney
2009-09-14 23:12   ` Brian Gerst
2009-09-14 23:28     ` David Daney
2009-09-14 23:39       ` Linus Torvalds [this message]
2009-09-15 15:35         ` David Daney
2009-09-14 23:54       ` Brian Gerst
2009-09-15 16:02         ` David Daney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.01.0909141637250.4950@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=brgerst@gmail.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox