linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michal Sojka <sojkam1@fel.cvut.cz>, linuxppc-dev@lists.ozlabs.org
Subject: Re: MPC5200 does not boot
Date: Tue, 2 Aug 2016 13:16:43 +1000	[thread overview]
Message-ID: <20160802131643.0bb9a777@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <1470105873.12584.7.camel@kernel.crashing.org>

On Tue, 02 Aug 2016 12:44:33 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> On Tue, 2016-08-02 at 00:44 +0200, Michal Sojka wrote:
> > Hi Benjamin,
> >=20
> > the following commit causes my MPC5200 not to boot.
> >=20
> > =C2=A0=C2=A0=C2=A0=C2=A0commit 9402c684613163888714df0955fa1f17142b08bf=
 =20
> > > =C2=A0=C2=A0=C2=A0=C2=A0Author: Benjamin Herrenschmidt <benh@kernel.c=
rashing.org> =20
> > =C2=A0=C2=A0=C2=A0=C2=A0Date:=C2=A0=C2=A0=C2=A0Tue Jul 5 15:03:41 2016 =
+1000
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0powerpc: Factor do_feat=
ure_fixup calls
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A032 and 64-bit do a simi=
lar set of calls early on, we move it all to
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0a single common functio=
n to make the boot code more readable.
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Signed-off-by: Benjamin=
 Herrenschmidt <benh@kernel.crashing.org> =20
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Signed-off-by: Michae=
l Ellerman <mpe@ellerman.id.au> =20
> >=20
> > I suspect that the cause will be similar as described in commit
> > 1cd03890ea64795e53f17a94928cca22495acb2a. Unfortunately, I don't have
> > much time to debug this, but I can easily test patches. =20
>=20
> Are you sure of your bisection ? Did you verify that reverting that one
> patch fixes it ? Because all this does is move code to a function,
> the code is functionally the same and called in the same place...

+	struct cpu_spec *spec =3D *PTRRELOC(&cur_cpu_spec);
+
+	/*
+	 * Apply the CPU-specific and firmware specific fixups to kernel text
+	 * (nop out sections not relevant to this CPU or this firmware).
+	 */
+	do_feature_fixups(spec->cpu_features,
+			  PTRRELOC(&__start___ftr_fixup),
+			  PTRRELOC(&__stop___ftr_fixup));

Shouldn't these be PTRRELOC(spec)->cpu_features ? You are relocating
access to the pointer word, but not the address it contains.
identify_cpu() returns the relocated pointer which is what 32-bit used
to use.

Thanks,
Nick

  reply	other threads:[~2016-08-02  3:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 22:44 MPC5200 does not boot Michal Sojka
2016-08-02  2:44 ` Benjamin Herrenschmidt
2016-08-02  3:16   ` Nicholas Piggin [this message]
2016-08-02  3:18     ` Benjamin Herrenschmidt
2016-08-02  5:38 ` Benjamin Herrenschmidt
2016-08-02  5:47   ` Michal Sojka
2016-08-10 10:52   ` Michal Sojka

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=20160802131643.0bb9a777@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sojkam1@fel.cvut.cz \
    /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).