linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: Commit 384a290283fde63ba8dc671fca5420111cdac19a seems to break 11MPCore boot
Date: Wed, 30 Jan 2013 16:56:28 +0000	[thread overview]
Message-ID: <20130130165628.GA22535@e102568-lin.cambridge.arm.com> (raw)
In-Reply-To: <51094D12.60304@arm.com>

On Wed, Jan 30, 2013 at 04:40:50PM +0000, Punit Agrawal wrote:
> Hi Lorenzo,
> 
> 
> On 30/01/13 16:04, Lorenzo Pieralisi wrote:
> > On Wed, Jan 30, 2013 at 03:23:55PM +0000, Punit Agrawal wrote:
> >> Hi Nicolas,
> >>
> >> I was trying to boot 3.8-rc5 on Realview EB 11MPCore using realview-smp_defconfig as a starting point but the kernel failed to progress past the log below (config attached).
> >>
> >> Pawel suggested I try reverting 384a290283fde63ba8dc671fca5420111cdac19a - "ARM: gic: use a private mapping for CPU target interfaces" that you've authored. With this commit reverted the kernel boots.
> >>
> >> I am not quite sure why the commit breaks 11MPCore but Pawel (cc'd) might be able to shed light on that.
> >
> > I *think* it is because in the ARM11MPcore GIC
> >
> > dist_base + GIC_DIST_TARGET
> >
> > is RAZ for IT0-IT28. To give it a go you should change code in
> >
> > gic_cpu_init()
> >
> > and read (GIC_DIST_TARGET + 0x1c) (where IT29 starts)
> >
> > if I am not mistaken, since that will return the GIC CPU IF ID of the
> > reading CPU.
> 
> With the following changes the kernel boots up further -
> 
> $ git diff
> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
> index 36ae03a..68f6368 100644
> --- a/arch/arm/common/gic.c
> +++ b/arch/arm/common/gic.c
> @@ -400,8 +400,11 @@ static void __cpuinit gic_cpu_init(struct 
> gic_chip_data *gic)
>           * Get what the GIC says our CPU mask is.
>           */
>          BUG_ON(cpu >= NR_GIC_CPU_IF);
> -   cpu_mask = readl_relaxed(dist_base + GIC_DIST_TARGET + 0);
> + cpu_mask = readl_relaxed(dist_base + GIC_DIST_TARGET + 0x1c);
> + cpu_mask = (cpu_mask & 0xff00) >> 8;
> +
>          gic_cpu_map[cpu] = cpu_mask;
> + printk(KERN_INFO "cpu: %d, cpu_mask: 0x%08x\n", cpu, cpu_mask);
> 
>          /*
>           * Clear our mask from the other map entries in case they're
> 
> But doesn't go all the way to init.

That's because IT28 read as zero as well, so using 0x1c does not work.

See Russell's reply, basically we need to scan first 32 IRQs and use
the first non-zero value to init the map.

Lorenzo

      reply	other threads:[~2013-01-30 16:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 15:23 Commit 384a290283fde63ba8dc671fca5420111cdac19a seems to break 11MPCore boot Punit Agrawal
2013-01-30 16:00 ` Nicolas Pitre
2013-01-30 16:05   ` Pawel Moll
2013-01-30 16:21   ` Russell King - ARM Linux
2013-01-30 16:45     ` Russell King - ARM Linux
2013-01-30 17:19       ` Russell King - ARM Linux
2013-01-30 17:30         ` Nicolas Pitre
2013-01-30 17:57           ` Will Deacon
2013-01-30 18:03           ` Russell King - ARM Linux
2013-01-30 18:16             ` Russell King - ARM Linux
2013-01-30 18:19               ` Russell King - ARM Linux
2013-01-30 20:30           ` Russell King - ARM Linux
2013-01-30 21:02             ` Nicolas Pitre
2013-01-30 16:04 ` Lorenzo Pieralisi
2013-01-30 16:40   ` Punit Agrawal
2013-01-30 16:56     ` Lorenzo Pieralisi [this message]

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=20130130165628.GA22535@e102568-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).