From patchwork Tue Aug 16 11:34:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 1071172 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7GBZQvj022806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 16 Aug 2011 11:35:47 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QtHvJ-000394-0y; Tue, 16 Aug 2011 11:35:09 +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 1QtHvI-0002o1-HW; Tue, 16 Aug 2011 11:35:08 +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 1QtHvE-0002ne-Ea for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2011 11:35:06 +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-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=xVrzSTGPYENr7cOiPe0LvJR7xrxvDZSnyTAw6fob1k4=; b=i1Wwr7PqKmGYrN1Uw4s0CAiTYvDINk42HBwKZYXx0Qz/UoTQKDFzqN/0qY0pEHAN8qslT0iPqVBnIjIwh1ALkEp/mJSlHvg2mq+bdOx6v3wxUzNuEkDRissnWDP9vUoqmIy5SQYzR6nC8Jq+sa7ucRH8zwOF3YY8K67/g58P3xA=; 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 1QtHuy-0000Rs-Kp; Tue, 16 Aug 2011 12:34:49 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1QtHux-0004WI-Bd; Tue, 16 Aug 2011 12:34:47 +0100 Date: Tue, 16 Aug 2011 12:34:46 +0100 From: Russell King - ARM Linux To: Will Deacon Subject: Re: PB1176 broken in -rc1 Message-ID: <20110816113446.GA17310@n2100.arm.linux.org.uk> References: <20110810152400.GO10121@e102144-lin.cambridge.arm.com> <20110816092615.GC28656@e102144-lin.cambridge.arm.com> <20110816095936.GE28656@e102144-lin.cambridge.arm.com> <20110816100906.GA16159@n2100.arm.linux.org.uk> <20110816101711.GF28656@e102144-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110816101711.GF28656@e102144-lin.cambridge.arm.com> 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-20110816_073505_191724_1F6BACDD X-CRM114-Status: GOOD ( 29.83 ) 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: Jamie Iles , Linus Walleij , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 16 Aug 2011 11:35:47 +0000 (UTC) On Tue, Aug 16, 2011 at 11:17:11AM +0100, Will Deacon wrote: > Hi Russell, > > On Tue, Aug 16, 2011 at 11:09:06AM +0100, Russell King - ARM Linux wrote: > > On Tue, Aug 16, 2011 at 10:59:36AM +0100, Will Deacon wrote: > > > The problem is with earlyprintk because your picking up multiple definitions > > > of DEBUG_LL_UART_OFFSET as a result of basing your config on the defconfig. > > > > > > Take a look at arch/arm/mach-realview/include/mach/debug-macro.S. I don't > > > think there's an easy way to fix this because it's used so early, even DT > > > can't save us. > > > > As I keep saying to people, only use the LL debug during _early_ platform > > bring-up. That's what it's there for. > > > > Tying earlyprintk into the LL debug stuff has made the LL debug easier to > > use, and therefore easier for people to fall into this trap. That's not > > the problem of the LL debug stuff, but the problem of its greater exposure. > > > > So, as the LL debug stuff has this rule, so does earlyprintk. Only use it > > for early platform bring up and *once* you have a kernel booting through > > to the proper console, disable it *immediately*. > > > > Anything else will lead you into these pitfalls. > > Yup, I agree about the usage of earlyprintk. It would be good if the user > could select the platform on which LL debug will work at config time and > then not have to worry about multiple conflicting definitions of > DEBUG_LL_UART_OFFSET. That way, you know on which platform earlyprintk > will work and don't try to use it on any others. Feel free to send a patch to do that. One down side of it is that we already have lots of options, so I suspect it'd get buried and forgotten. As this is a common problem, it probably makes sense to put a choice in arch/arm/Kconfig.debug and have individual LL debug variants depend on that. We already have: config DEBUG_DC21285_PORT bool "Kernel low-level debugging messages via footbridge serial port" depends on DEBUG_LL && FOOTBRIDGE help Say Y here if you want the debug print routines to direct their output to the serial port in the DC21285 (Footbridge). Saying N will cause the debug messages to appear on the first 16550 serial port. and: config DEBUG_CLPS711X_UART2 bool "Kernel low-level debugging messages via UART2" depends on DEBUG_LL && ARCH_CLPS711X help Say Y here if you want the debug print routines to direct their output to the second serial port on these devices. Saying N will cause the debug messages to appear on the first serial port. in there. So I think the first step is (untested): diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 81cbe40..068337f 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -100,9 +100,13 @@ config OC_ETM buffer driver that will allow you to collect traces of the kernel code. +choice + prompt "Kernel low-level debugging port" + depends on DEBUG_LL + config DEBUG_DC21285_PORT bool "Kernel low-level debugging messages via footbridge serial port" - depends on DEBUG_LL && FOOTBRIDGE + depends on FOOTBRIDGE help Say Y here if you want the debug print routines to direct their output to the serial port in the DC21285 (Footbridge). Saying N @@ -111,12 +115,14 @@ config DEBUG_DC21285_PORT config DEBUG_CLPS711X_UART2 bool "Kernel low-level debugging messages via UART2" - depends on DEBUG_LL && ARCH_CLPS711X + depends on ARCH_CLPS711X help Say Y here if you want the debug print routines to direct their output to the second serial port on these devices. Saying N will cause the debug messages to appear on the first serial port. +endchoice + config DEBUG_S3C_UART depends on PLAT_SAMSUNG int "S3C UART to use for low-level debug"