diff mbox

MPC5200 does not boot

Message ID 1470116323.12584.11.camel@kernel.crashing.org (mailing list archive)
State Superseded
Headers show

Commit Message

Benjamin Herrenschmidt Aug. 2, 2016, 5:38 a.m. UTC
On Tue, 2016-08-02 at 00:44 +0200, Michal Sojka wrote:
> Hi Benjamin,
> 
> the following commit causes my MPC5200 not to boot.
> 
>     commit 9402c684613163888714df0955fa1f17142b08bf
>     Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>     Date:   Tue Jul 5 15:03:41 2016 +1000
>      
>         powerpc: Factor do_feature_fixup calls
>         
>         32 and 64-bit do a similar set of calls early on, we move it
> all to
>         a single common function to make the boot code more readable.
>         
>         Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.o
> rg>
>         Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> 
> 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.

Does this fixes it for you ?

Comments

Michal Sojka Aug. 2, 2016, 5:47 a.m. UTC | #1
On Tue, Aug 02 2016, Benjamin Herrenschmidt wrote:
> On Tue, 2016-08-02 at 00:44 +0200, Michal Sojka wrote:
>> Hi Benjamin,
>> 
>> the following commit causes my MPC5200 not to boot.
>> 
>>     commit 9402c684613163888714df0955fa1f17142b08bf
>
> Does this fixes it for you ?

Yes, it does.

Thanks.
-Michal


> diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
> index defb299..fd36e13 100644
> --- a/arch/powerpc/lib/feature-fixups.c
> +++ b/arch/powerpc/lib/feature-fixups.c
> @@ -154,7 +154,7 @@ static void do_final_fixups(void)
>  
>  void apply_feature_fixups(void)
>  {
> -	struct cpu_spec *spec = *PTRRELOC(&cur_cpu_spec);
> +	struct cpu_spec *spec = PTRRELOC(*PTRRELOC(&cur_cpu_spec));
>  
>  	/*
>  	 * Apply the CPU-specific and firmware specific fixups to kernel text
Michal Sojka Aug. 10, 2016, 10:52 a.m. UTC | #2
Hi all,

my MPC5200 still does not boot even with the fix bellow applied. I dug a
bit into it and now it seems that commit
309b315b6ec686ce050758cc4e29f6ad1125a83f is to blame.

commit 309b315b6ec686ce050758cc4e29f6ad1125a83f
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date:   Sat Jul 23 14:42:38 2016 +0530

    powerpc: Call jump_label_init() in apply_feature_fixups()
    
    Call jump_label_init() early so that we can use static keys for CPU and
    MMU feature checks.
    
    Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

The following summarizes the situation from my point of view:

1) My system does not boot with 9402c684613163888714df0955fa1f17142b08bf
   "powerpc: Factor do_feature_fixup calls"

2) When the fix bellow is applied on top of
   9402c684613163888714df0955fa1f17142b08bf my system boots.

3) My system does not boot 2c0f99516f53911c3f2f81ab3815841e3408f11e
   which is the mainline commit containing the fix below.

4) I bisected the commits between
   9402c684613163888714df0955fa1f17142b08bf and
   2c0f99516f53911c3f2f81ab3815841e3408f11e with manually applying the
   fix bellow and 309b315b6ec686ce050758cc4e29f6ad1125a83f was the first
   bad commit that didn't boot.

Let me know if you need more information.

Thanks.
-Michal

On Tue, Aug 02 2016, Benjamin Herrenschmidt wrote:
> On Tue, 2016-08-02 at 00:44 +0200, Michal Sojka wrote:
>> Hi Benjamin,
>> 
>> the following commit causes my MPC5200 not to boot.
>> 
>>     commit 9402c684613163888714df0955fa1f17142b08bf
>>     Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>     Date:   Tue Jul 5 15:03:41 2016 +1000
>>      
>>         powerpc: Factor do_feature_fixup calls
>>         
>>         32 and 64-bit do a similar set of calls early on, we move it
>> all to
>>         a single common function to make the boot code more readable.
>>         
>>         Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.o
>> rg>
>>         Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>> 
>> 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.
>
> Does this fixes it for you ?
>
> diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
> index defb299..fd36e13 100644
> --- a/arch/powerpc/lib/feature-fixups.c
> +++ b/arch/powerpc/lib/feature-fixups.c
> @@ -154,7 +154,7 @@ static void do_final_fixups(void)
>  
>  void apply_feature_fixups(void)
>  {
> -	struct cpu_spec *spec = *PTRRELOC(&cur_cpu_spec);
> +	struct cpu_spec *spec = PTRRELOC(*PTRRELOC(&cur_cpu_spec));
>  
>  	/*
>  	 * Apply the CPU-specific and firmware specific fixups to kernel text
diff mbox

Patch

diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index defb299..fd36e13 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -154,7 +154,7 @@  static void do_final_fixups(void)
 
 void apply_feature_fixups(void)
 {
-	struct cpu_spec *spec = *PTRRELOC(&cur_cpu_spec);
+	struct cpu_spec *spec = PTRRELOC(*PTRRELOC(&cur_cpu_spec));
 
 	/*
 	 * Apply the CPU-specific and firmware specific fixups to kernel text