All of lore.kernel.org
 help / color / mirror / Atom feed
* Booting MX7Solo with 4.5-rc6
@ 2016-02-29 14:23 Fabio Estevam
  2016-02-29 15:23 ` Frank Li
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2016-02-29 14:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I am trying to boot linux-next 20160229 on a m7solo warp board and
this is what I get:

http://pastebin.com/TmQdqd2B

I can boot this board fine using NXP 3.14.52 kernel.

These clock warnings also happen on a mx7d sabresd board, but the boot
proceed fine.

Any ideas as to what needs to be done in order to boot a MX7S?

I have also tried to disable cpu1 in the imx7d.dtsi, but it did not help.

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting MX7Solo with 4.5-rc6
  2016-02-29 14:23 Booting MX7Solo with 4.5-rc6 Fabio Estevam
@ 2016-02-29 15:23 ` Frank Li
  2016-02-29 15:34   ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Li @ 2016-02-29 15:23 UTC (permalink / raw)
  To: linux-arm-kernel



> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> Sent: Monday, February 29, 2016 8:23 AM
> To: Frank Li <frank.li@nxp.com>; Hui Liu <jason.hui.liu@nxp.com>
> Cc: Peng Fan <peng.fan@nxp.com>; linux-arm-kernel at lists.infradead.org;
> Dong Aisheng <dongas86@gmail.com>
> Subject: Booting MX7Solo with 4.5-rc6
> 
> Hi,
> 
> I am trying to boot linux-next 20160229 on a m7solo warp board and this is
> what I get:
> 
> http://pastebin.com/TmQdqd2B
> 
> I can boot this board fine using NXP 3.14.52 kernel.
> 
> These clock warnings also happen on a mx7d sabresd board, but the boot
> proceed fine.

It caused usleep_range(50, 500) in clk_pllv3_wait_lock.
Need aisheng's patch to fix it.
> 
> Any ideas as to what needs to be done in order to boot a MX7S?

Can you try to disable arch_timer in dts?

> 
> I have also tried to disable cpu1 in the imx7d.dtsi, but it did not help.
> 
> Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting MX7Solo with 4.5-rc6
  2016-02-29 15:23 ` Frank Li
@ 2016-02-29 15:34   ` Fabio Estevam
  2016-03-01  1:55     ` Hui Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2016-02-29 15:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 29, 2016 at 12:23 PM, Frank Li <frank.li@nxp.com> wrote:
>
>
>> -----Original Message-----
>> From: Fabio Estevam [mailto:festevam at gmail.com]
>> Sent: Monday, February 29, 2016 8:23 AM
>> To: Frank Li <frank.li@nxp.com>; Hui Liu <jason.hui.liu@nxp.com>
>> Cc: Peng Fan <peng.fan@nxp.com>; linux-arm-kernel at lists.infradead.org;
>> Dong Aisheng <dongas86@gmail.com>
>> Subject: Booting MX7Solo with 4.5-rc6
>>
>> Hi,
>>
>> I am trying to boot linux-next 20160229 on a m7solo warp board and this is
>> what I get:
>>
>> http://pastebin.com/TmQdqd2B
>>
>> I can boot this board fine using NXP 3.14.52 kernel.
>>
>> These clock warnings also happen on a mx7d sabresd board, but the boot
>> proceed fine.
>
> It caused usleep_range(50, 500) in clk_pllv3_wait_lock.
> Need aisheng's patch to fix it.

Yes, I know, but they should not prevent the boot from happening.

>> Any ideas as to what needs to be done in order to boot a MX7S?
>
> Can you try to disable arch_timer in dts?

Just disabled it, but it did not help. Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting MX7Solo with 4.5-rc6
  2016-02-29 15:34   ` Fabio Estevam
@ 2016-03-01  1:55     ` Hui Liu
  2016-03-01 13:20       ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Hui Liu @ 2016-03-01  1:55 UTC (permalink / raw)
  To: linux-arm-kernel


> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> Sent: Monday, February 29, 2016 11:35 PM
> To: Frank Li <frank.li@nxp.com>
> Cc: Hui Liu <jason.hui.liu@nxp.com>; Peng Fan <peng.fan@nxp.com>; linux-arm-
> kernel at lists.infradead.org; Dong Aisheng <dongas86@gmail.com>
> Subject: Re: Booting MX7Solo with 4.5-rc6
> 
> On Mon, Feb 29, 2016 at 12:23 PM, Frank Li <frank.li@nxp.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Fabio Estevam [mailto:festevam at gmail.com]
> >> Sent: Monday, February 29, 2016 8:23 AM
> >> To: Frank Li <frank.li@nxp.com>; Hui Liu <jason.hui.liu@nxp.com>
> >> Cc: Peng Fan <peng.fan@nxp.com>;
> >> linux-arm-kernel at lists.infradead.org;
> >> Dong Aisheng <dongas86@gmail.com>
> >> Subject: Booting MX7Solo with 4.5-rc6
> >>
> >> Hi,
> >>
> >> I am trying to boot linux-next 20160229 on a m7solo warp board and
> >> this is what I get:
> >>
> >> http://pastebin.com/TmQdqd2B

You can't dequeue the idle thread, thus kernel throw the oops:

bad: scheduling from the idle thread!

The reason is that the code is buggy for using the usleep_range in the clk_pllv3_wait_lock function,
>From the stack dump:

[    0.000000] [<c0152364>] (dequeue_task_idle) from [<c0149bf0>] (deactivate_task+0x64/0x68)
[    0.000000]  r4:c0d064c0 r3:c0152364
[    0.000000] [<c0149b8c>] (deactivate_task) from [<c08dfac0>] (__schedule+0x2cc/0x6d8)
[    0.000000]  r6:c0d06804 r5:debbb450 r4:c0d064c0 r3:00000002
[    0.000000] [<c08df7f4>] (__schedule) from [<c08dfff4>] (schedule+0x3c/0xa0)
[    0.000000]  r10:c0d064c0 r9:c155fd78 r8:00000001 r7:00000000 r6:0006ddd0 r5:00000000
[    0.000000]  r4:0007a120
[    0.000000] [<c08dffb8>] (schedule) from [<c08e4600>] (schedule_hrtimeout_range_clock+0xd4/0x13c)
[    0.000000] [<c08e452c>] (schedule_hrtimeout_range_clock) from [<c08e468c>] (schedule_hrtimeout_range+0x24/0x2c)
[    0.000000]  r10:000006d8 r8:000000e8 r7:00000003 r6:ffff8ad1 r5:c0d02100 r4:de40c1c0
[    0.000000] [<c08e4668>] (schedule_hrtimeout_range) from [<c08e40b0>] (usleep_range+0x54/0x5c)
[    0.000000] [<c08e405c>] (usleep_range) from [<c068b3e4>] (clk_pllv3_wait_lock+0x7c/0xb4)
[    0.000000] [<c068b368>] (clk_pllv3_wait_lock) from [<c068b5f4>] (clk_pllv3_prepare+0x2c/0x30)
[    0.000000]  r6:c0d5c8f4 r5:00000000 r4:de407700 r3:e0840130
[    0.000000] [<c068b5c8>] (clk_pllv3_prepare) from [<c0685a68>] (clk_core_prepare+0xa0/0xcc)
[    0.000000] [<c06859c8>] (clk_core_prepare) from [<c0685a48>] (clk_core_prepare+0x80/0xcc)
[    0.000000]  r5:00000000 r4:de407a00
[    0.000000] [<c06859c8>] (clk_core_prepare) from [<c0685a48>] (clk_core_prepare+0x80/0xcc)
[    0.000000]  r5:00000000 r4:de407c80
[    0.000000] [<c06859c8>] (clk_core_prepare) from [<c0685ab4>] (clk_prepare+0x20/0x30)
[    0.000000]  r5:00000000 r4:de40cd80
[    0.000000] [<c0685a94>] (clk_prepare) from [<c0c4a398>] (imx7d_clocks_init+0x6114/0x6198)
[    0.000000]  r4:de40cd80 r3:600000d3
[    0.000000] [<c0c44284>] (imx7d_clocks_init) from [<c0c308a0>] (of_clk_init+0x140/0x1f0)
[    0.000000]  r10:c0d01f70 r9:00000001 r8:c0d01f68 r7:00000000 r6:de4043c0 r5:debddfd4
[    0.000000]  r4:00000003
[    0.000000] [<c0c30760>] (of_clk_init) from [<c0c049f8>] (time_init+0x2c/0x38)
[    0.000000]  r10:00000001 r9:410fc075 r8:defffb40 r7:c0c5ca48 r6:c0d75000 r5:ffffffff
[    0.000000]  r4:00000000
[    0.000000] [<c0c049cc>] (time_init) from [<c0c00be8>] (start_kernel+0x26c/0x404)
[    0.000000] [<c0c0097c>] (start_kernel) from [<8000807c>] (0x8000807c)


Please remove the usleep_range in the function clk_pllv3_wait_lock. 

Jason Liu

> >>
> >> I can boot this board fine using NXP 3.14.52 kernel.
> >>
> >> These clock warnings also happen on a mx7d sabresd board, but the
> >> boot proceed fine.
> >
> > It caused usleep_range(50, 500) in clk_pllv3_wait_lock.
> > Need aisheng's patch to fix it.
> 
> Yes, I know, but they should not prevent the boot from happening.
> 
> >> Any ideas as to what needs to be done in order to boot a MX7S?
> >
> > Can you try to disable arch_timer in dts?
> 
> Just disabled it, but it did not help. Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Booting MX7Solo with 4.5-rc6
  2016-03-01  1:55     ` Hui Liu
@ 2016-03-01 13:20       ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2016-03-01 13:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 29, 2016 at 10:55 PM, Hui Liu <jason.hui.liu@nxp.com> wrote:

> Please remove the usleep_range in the function clk_pllv3_wait_lock.

Yes, if I do like this:

--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -63,7 +63,7 @@ static int clk_pllv3_wait_lock(struct clk_pllv3 *pll)
                        break;
                if (time_after(jiffies, timeout))
                        break;
-               usleep_range(50, 500);
+               udelay(500);
        } while (1);

        return readl_relaxed(pll->base) & BM_PLL_LOCK ? 0 : -ETIMEDOUT;

Then the warning disappears, but the kernel still hangs:

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.5.0-rc6-next-20160229-dirty (fabio at fabio-Latitud6
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructie
[    0.000000] Machine model: Warp i.MX7 Board
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] cma: Reserved 16 MiB at 0x9f000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 13 pages/cpu @debbe000 s24512 r8192 d20544 u5328
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa8
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk2p2 p
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 482140K/524288K available (8196K kernel code, 460K rwdat)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0bc906c   (12037 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0d731a0   ( 461 kB)
[    0.000000]        .bss : 0xc0d75000 - 0xc157d8d0   (8227 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Running RCU self tests
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU lockdep checking is enabled.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16

So it is something else that is preventing the kernel to boot on a MX7 Solo.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-01 13:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 14:23 Booting MX7Solo with 4.5-rc6 Fabio Estevam
2016-02-29 15:23 ` Frank Li
2016-02-29 15:34   ` Fabio Estevam
2016-03-01  1:55     ` Hui Liu
2016-03-01 13:20       ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.