From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758370Ab3GOWhE (ORCPT ); Mon, 15 Jul 2013 18:37:04 -0400 Received: from terminus.zytor.com ([198.137.202.10]:46157 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754823Ab3GOWhC (ORCPT ); Mon, 15 Jul 2013 18:37:02 -0400 Message-ID: <51E47924.9030005@zytor.com> Date: Mon, 15 Jul 2013 15:35:16 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Russell King - ARM Linux CC: Andrew Morton , Arnd Bergmann , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chen Gang , Ingo Molnar , "Eric W. Biederman" , Geert Uytterhoeven Subject: Re: [PATCH, re-send] Always trap on BUG() References: <201307051738.35930.arnd@arndb.de> <20130715151612.9499c2b2ad40e88d183a4600@linux-foundation.org> <20130715222755.GY24642@n2100.arm.linux.org.uk> In-Reply-To: <20130715222755.GY24642@n2100.arm.linux.org.uk> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/15/2013 03:27 PM, Russell King - ARM Linux wrote: > On Mon, Jul 15, 2013 at 03:16:12PM -0700, Andrew Morton wrote: >> I've been thinking for a while that CONFIG_BUG=n is a pretty dumb thing >> to do, and that maintaining it (and trying to fix the warnings it >> produces) aren't worth the effort and that we should remove the whole >> thing. Perhaps your patch changes that calculus, dunno. Please discuss. > > This isn't about introducing "CONFIG_BUG=n" - this is about making a > kernel with CONFIG_BUG=n build without producing tonnes and tonnes of > warnings, as it does today. It makes building randconfig pretty > useless to find what could be more important warnings. > Well, there are three alternatives here, right: 1. We can use unreachable(), which means that the compiler can assume it never happens. 2. We can trap without metadata. 3. We can trap with metadata (current CONFIG_BUG=y). I am *guessing* this does 2, but it isn't clear. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH, re-send] Always trap on BUG() Date: Mon, 15 Jul 2013 15:35:16 -0700 Message-ID: <51E47924.9030005@zytor.com> References: <201307051738.35930.arnd@arndb.de> <20130715151612.9499c2b2ad40e88d183a4600@linux-foundation.org> <20130715222755.GY24642@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130715222755.GY24642@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Russell King - ARM Linux Cc: linux-arch@vger.kernel.org, Arnd Bergmann , Chen Gang , linux-kernel@vger.kernel.org, Geert Uytterhoeven , "Eric W. Biederman" , Andrew Morton , Ingo Molnar , linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On 07/15/2013 03:27 PM, Russell King - ARM Linux wrote: > On Mon, Jul 15, 2013 at 03:16:12PM -0700, Andrew Morton wrote: >> I've been thinking for a while that CONFIG_BUG=n is a pretty dumb thing >> to do, and that maintaining it (and trying to fix the warnings it >> produces) aren't worth the effort and that we should remove the whole >> thing. Perhaps your patch changes that calculus, dunno. Please discuss. > > This isn't about introducing "CONFIG_BUG=n" - this is about making a > kernel with CONFIG_BUG=n build without producing tonnes and tonnes of > warnings, as it does today. It makes building randconfig pretty > useless to find what could be more important warnings. > Well, there are three alternatives here, right: 1. We can use unreachable(), which means that the compiler can assume it never happens. 2. We can trap without metadata. 3. We can trap with metadata (current CONFIG_BUG=y). I am *guessing* this does 2, but it isn't clear. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 From: hpa@zytor.com (H. Peter Anvin) Date: Mon, 15 Jul 2013 15:35:16 -0700 Subject: [PATCH, re-send] Always trap on BUG() In-Reply-To: <20130715222755.GY24642@n2100.arm.linux.org.uk> References: <201307051738.35930.arnd@arndb.de> <20130715151612.9499c2b2ad40e88d183a4600@linux-foundation.org> <20130715222755.GY24642@n2100.arm.linux.org.uk> Message-ID: <51E47924.9030005@zytor.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 07/15/2013 03:27 PM, Russell King - ARM Linux wrote: > On Mon, Jul 15, 2013 at 03:16:12PM -0700, Andrew Morton wrote: >> I've been thinking for a while that CONFIG_BUG=n is a pretty dumb thing >> to do, and that maintaining it (and trying to fix the warnings it >> produces) aren't worth the effort and that we should remove the whole >> thing. Perhaps your patch changes that calculus, dunno. Please discuss. > > This isn't about introducing "CONFIG_BUG=n" - this is about making a > kernel with CONFIG_BUG=n build without producing tonnes and tonnes of > warnings, as it does today. It makes building randconfig pretty > useless to find what could be more important warnings. > Well, there are three alternatives here, right: 1. We can use unreachable(), which means that the compiler can assume it never happens. 2. We can trap without metadata. 3. We can trap with metadata (current CONFIG_BUG=y). I am *guessing* this does 2, but it isn't clear. -hpa