From patchwork Wed May 18 22:33:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 96264 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8E6E6B6F59 for ; Thu, 19 May 2011 08:33:54 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QMpJN-0007BH-S6; Wed, 18 May 2011 22:33:50 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QMpJM-0006sZ-K9; Wed, 18 May 2011 22:33:48 +0000 Received: from [2002:4e20:1eda::1] (helo=caramon.arm.linux.org.uk) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QMpJI-0006sF-VF for linux-arm-kernel@lists.infradead.org; Wed, 18 May 2011 22:33:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=jxWaowlpiLBen/eMtgFDtOQl9rNx9XZjfz7UsS/5Is8=; b=EQh/LoEZSKq0RgEeKCgZpaEXWSfbKHJy7trne5hu9lF7YPTU/KBWZHUOeljw3SuO1WKtfIz1Q8an0lOav7YdTZ8RW+sFPnCZl4FMTLubdgDcddtUXom1IW2VjgBUtGZ6lWivYyDeT+2iFjb1DK3VCq4XdY8ZrTPbiLychZ5/JQY=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QMpIv-0004lz-G0; Wed, 18 May 2011 23:33:22 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1QMpIu-0006Ex-7G; Wed, 18 May 2011 23:33:20 +0100 Date: Wed, 18 May 2011 23:33:19 +0100 From: Russell King - ARM Linux To: Nicolas Pitre Subject: Re: [PATCH 1/1] ARM: thumb: Have the machine name indicate operation in thumb mode. Message-ID: <20110518223319.GB21384@n2100.arm.linux.org.uk> References: <20110513195316.9AD0940CD1@eskimo.mtv.corp.google.com> <20110514100232.GC30539@n2100.arm.linux.org.uk> <20110516121657.GA7715@arm.com> <20110516144311.GC7715@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110518_183345_744436_24FBE9E5 X-CRM114-Status: GOOD ( 26.33 ) X-Spam-Score: 1.2 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: Vadim Bendebury =?utf-8?B?KNCy0LEp?= , Catalin Marinas , "bif , " , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Wed, May 18, 2011 at 06:27:56PM -0400, Nicolas Pitre wrote: > On Wed, 18 May 2011, Vadim Bendebury (вб) wrote: > > > On Mon, May 16, 2011 at 7:43 AM, Dave Martin wrote: > > >On Mon, May 16, 2011 at 10:32:16AM -0400, Nicolas Pitre wrote: > > >> I think this can be useful to know how the kernel was compiled for bug > > >> tracking purposes, just like we record the Git commit ID of the checked > > >> out source tree, the gcc version, the build date, etc.  Which pretty > > >> much indicates that the thumbness of the kernel should probably be > > >> stored in the kernel banner not the platform name. > > > > > > That seems a reasonable approach to me. > > > > > > > guys, thank you for your comments. Indeed, this is meant to be just a > > convenience to allow to quickly tell what kind of kernel a system is > > running, comes handy when there are many systems around with > > differently compiled kernels. > > > > So, would it be acceptable if I move this information into the kernel > > banner (namely, add it to the machine hardware name part of the output > > included in 'uname -m' and 'uname -a')? > > Yes, I think that would be the most sensible place. Looking at > scripts/mkcompile_h which is used to create include/generated/compile.h, > it appears that $CONFIG_FLAGS would be the most appropriate place for > this, however it is not currently set up to allow architecture specific > flags to be passed in. We already have a way of adding stuff for bug tracking purposes. The "Internal error" line is perpended with 'PREEMPT' or 'SMP' depending on what build options were enabled. We just need to do the same with T2. IOW, something like this: diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 3b54ad1..78d7714 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -225,6 +225,11 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) #else #define S_SMP "" #endif +#ifdef CONFIG_THUMB2_KERNEL +#define S_ISA " T2" +#else +#define S_ISA " ARM" +#endif static int __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) { @@ -232,8 +237,8 @@ static int __die(const char *str, int err, struct thread_info *thread, struct pt static int die_counter; int ret; - printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", - str, err, ++die_counter); + printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP + S_ISA "\n", str, err, ++die_counter); sysfs_printk_last_file(); /* trap and error numbers are mostly meaningless on ARM */