diff mbox

ARM: Do early I/O mapping if spinlock debugging is enabled (Re: [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v3)

Message ID 20090402000055.GK32530@atomide.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Tony Lindgren April 2, 2009, midnight UTC
* Kevin Hilman <khilman@deeprootsystems.com> [090401 16:18]:
> Tony Lindgren <tony@atomide.com> writes:
> 
> > * Paul Walmsley <paul@pwsan.com> [090401 12:04]:
> >> On Wed, 1 Apr 2009, Syed Mohammed, Khasim wrote:
> >> 
> >> > > -----Original Message-----
> >> > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of
> >> > > Gadiyar, Anand
> >> > > Sent: Wednesday, April 01, 2009 1:55 PM
> >> > > To: Russell King - ARM Linux
> >> > > Cc: Tony Lindgren; linux-arm-kernel@lists.arm.linux.org.uk; linux-omap@vger.kernel.org
> >> > > Subject: RE: [PATCH 3/4] ARM: OMAP3: Add support for 3430 SDP, v3
> >> > > 
> >> > > On Wed, Apr 01, 2009 at 12:18 AM, Russell King - ARM Linux wrote:
> >> > > > On Tue, Mar 31, 2009 at 05:12:18PM +0530, Gadiyar, Anand wrote:
> >> > > > > I could not run the 3430 SDP defconfig from mainline. The image hangs at
> >> > > > > "Starting kernel ...". Enabling CONFIG_DEBUG_LL does not help.
> >> > > >
> >> > > > Did you add the necessary patch to kernel/printk.c ?
> >> > > >
> >> > > 
> >> > > Silly me, I had not done this (despite having read this so many times on this list).
> >> > > 
> >> > > Here's what I get now after adding the patch.

<snip>

> > Not seeing this on overo at least.
> >
> 
> And my Beagle is booting fine with mainline and attached .config.

<snip>

Well turns out it's the same old bug again Juha tracked down earlier..

If CONFIG_DEBUG_SPINLOCK is set, and CONFIG_DEBUG_LL is not set, the IO
does not get mapped. Juha's earlier patch is attached.

Russell, got any better fixes in mind for this?

Tony

Comments

Russell King - ARM Linux April 2, 2009, 7:38 a.m. UTC | #1
On Wed, Apr 01, 2009 at 05:00:56PM -0700, Tony Lindgren wrote:
> Well turns out it's the same old bug again Juha tracked down earlier..
> 
> If CONFIG_DEBUG_SPINLOCK is set, and CONFIG_DEBUG_LL is not set, the IO
> does not get mapped. Juha's earlier patch is attached.
> 
> Russell, got any better fixes in mind for this?

No, and as I've said previously, the kernel assuming that sched_clock
is usable before stuff has been initialized is a bug plain and simple.

Your patch may fix OMAP, but it won't fix everything.

It's just not going to be possible to make this work.  spinlock debugging
needs to stop using sched_clock.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren April 2, 2009, 2:54 p.m. UTC | #2
* Russell King - ARM Linux <linux@arm.linux.org.uk> [090402 00:38]:
> On Wed, Apr 01, 2009 at 05:00:56PM -0700, Tony Lindgren wrote:
> > Well turns out it's the same old bug again Juha tracked down earlier..
> > 
> > If CONFIG_DEBUG_SPINLOCK is set, and CONFIG_DEBUG_LL is not set, the IO
> > does not get mapped. Juha's earlier patch is attached.
> > 
> > Russell, got any better fixes in mind for this?
> 
> No, and as I've said previously, the kernel assuming that sched_clock
> is usable before stuff has been initialized is a bug plain and simple.
> 
> Your patch may fix OMAP, but it won't fix everything.
> 
> It's just not going to be possible to make this work.  spinlock debugging
> needs to stop using sched_clock.

Or maybe enable it later on like CONFIG_PRINTK_TIME was changed.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

From c699464bd92629fda1062223467588fcb0e97bca Mon Sep 17 00:00:00 2001
From: Juha Yrjola <juha.yrjola@solidboot.com>
Date: Fri, 16 Jan 2009 16:00:50 +0200
Subject: [PATCH] ARM: Do early I/O mapping if spinlock debugging is enabled

At least on OMAP, sched_clock() requires the I/O maps to be initialized.
Spinlock debugging invokes sched_clock() very early.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 21e17dc..1bc918c 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -282,7 +282,7 @@  __create_page_tables:
 	.endif
 	str	r6, [r0]
 
-#ifdef CONFIG_DEBUG_LL
+#if defined(CONFIG_DEBUG_LL) || defined(CONFIG_DEBUG_SPINLOCK)
 	ldr	r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags
 	/*
 	 * Map in IO space for serial debugging.