diff mbox

ARM: mvebu: DT: fix OpenBlocks AX3-4 RAM size

Message ID 1401818320-7202-1-git-send-email-jason@lakedaemon.net (mailing list archive)
State New, archived
Headers show

Commit Message

Jason Cooper June 3, 2014, 5:58 p.m. UTC
The OpenBlocks AX3-4 has a non-DT bootloader.  It also comes with 1GB of
soldered on RAM, and a DIMM slot for expansion.

Unfortunately, atags_to_fdt() doesn't work in big-endian mode, so we see
the following failure when attempting to boot a big-endian kernel:

  686 slab pages
  17 pages shared
  0 pages swap cached
  [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
  Kernel panic - not syncing: Out of memory and no killable processes...

  CPU: 1 PID: 351 Comm: kworker/u4:0 Not tainted 3.15.0-rc8-next-20140603 #1
  [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14)
  [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94)
  [<c0802500>] (dump_stack) from [<c0800068>] (panic+0x90/0x21c)
  [<c0800068>] (panic) from [<c02b5704>] (out_of_memory+0x320/0x340)
  [<c02b5704>] (out_of_memory) from [<c02b93a0>] (__alloc_pages_nodemask+0x874/0x930)
  [<c02b93a0>] (__alloc_pages_nodemask) from [<c02d446c>] (handle_mm_fault+0x744/0x96c)
  [<c02d446c>] (handle_mm_fault) from [<c02cf250>] (__get_user_pages+0xd0/0x4c0)
  [<c02cf250>] (__get_user_pages) from [<c02f3598>] (get_arg_page+0x54/0xbc)
  [<c02f3598>] (get_arg_page) from [<c02f3878>] (copy_strings+0x278/0x29c)
  [<c02f3878>] (copy_strings) from [<c02f38bc>] (copy_strings_kernel+0x20/0x28)
  [<c02f38bc>] (copy_strings_kernel) from [<c02f4f1c>] (do_execve+0x3a8/0x4c8)
  [<c02f4f1c>] (do_execve) from [<c025ac10>] (____call_usermodehelper+0x15c/0x194)
  [<c025ac10>] (____call_usermodehelper) from [<c020e9b8>] (ret_from_fork+0x14/0x3c)
  CPU0: stopping
  CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.15.0-rc8-next-20140603 #1
  [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14)
  [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94)
  [<c0802500>] (dump_stack) from [<c021429c>] (handle_IPI+0x138/0x174)
  [<c021429c>] (handle_IPI) from [<c02087f0>] (armada_370_xp_handle_irq+0xb0/0xcc)
  [<c02087f0>] (armada_370_xp_handle_irq) from [<c0212100>] (__irq_svc+0x40/0x50)
  Exception stack(0xc0b6bf68 to 0xc0b6bfb0)
  bf60:                   e9fad598 00000000 00f509a3 00000000 c0b6a000 c0b724c4
  bf80: c0b72458 c0b6a000 00000000 00000000 c0b66da0 c0b6a000 00000000 c0b6bfb0
  bfa0: c027bb94 c027bb24 60000313 ffffffff
  [<c0212100>] (__irq_svc) from [<c027bb24>] (cpu_startup_entry+0x54/0x214)
  [<c027bb24>] (cpu_startup_entry) from [<c0ac5b30>] (start_kernel+0x318/0x37c)
  [<c0ac5b30>] (start_kernel) from [<00208078>] (0x208078)
  ---[ end Kernel panic - not syncing: Out of memory and no killable processes...

Fix this by setting a sane default (1 GB) in the dts file.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
---
Kevin,

Please test when you have a moment.  If it works for you, feel free to apply it
directly wherever you feel it's appropriate.

thx,

Jason.

 arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kevin Hilman June 3, 2014, 6:07 p.m. UTC | #1
Jason Cooper <jason@lakedaemon.net> writes:

> The OpenBlocks AX3-4 has a non-DT bootloader.  It also comes with 1GB of
> soldered on RAM, and a DIMM slot for expansion.
>
> Unfortunately, atags_to_fdt() doesn't work in big-endian mode, so we see
> the following failure when attempting to boot a big-endian kernel:

The same will happen on kernels without the ATAG_DTB_COMPAT option
enabled too, right?

>   686 slab pages
>   17 pages shared
>   0 pages swap cached
>   [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
>   Kernel panic - not syncing: Out of memory and no killable processes...
>
>   CPU: 1 PID: 351 Comm: kworker/u4:0 Not tainted 3.15.0-rc8-next-20140603 #1
>   [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14)
>   [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94)
>   [<c0802500>] (dump_stack) from [<c0800068>] (panic+0x90/0x21c)
>   [<c0800068>] (panic) from [<c02b5704>] (out_of_memory+0x320/0x340)
>   [<c02b5704>] (out_of_memory) from [<c02b93a0>] (__alloc_pages_nodemask+0x874/0x930)
>   [<c02b93a0>] (__alloc_pages_nodemask) from [<c02d446c>] (handle_mm_fault+0x744/0x96c)
>   [<c02d446c>] (handle_mm_fault) from [<c02cf250>] (__get_user_pages+0xd0/0x4c0)
>   [<c02cf250>] (__get_user_pages) from [<c02f3598>] (get_arg_page+0x54/0xbc)
>   [<c02f3598>] (get_arg_page) from [<c02f3878>] (copy_strings+0x278/0x29c)
>   [<c02f3878>] (copy_strings) from [<c02f38bc>] (copy_strings_kernel+0x20/0x28)
>   [<c02f38bc>] (copy_strings_kernel) from [<c02f4f1c>] (do_execve+0x3a8/0x4c8)
>   [<c02f4f1c>] (do_execve) from [<c025ac10>] (____call_usermodehelper+0x15c/0x194)
>   [<c025ac10>] (____call_usermodehelper) from [<c020e9b8>] (ret_from_fork+0x14/0x3c)
>   CPU0: stopping
>   CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.15.0-rc8-next-20140603 #1
>   [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14)
>   [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94)
>   [<c0802500>] (dump_stack) from [<c021429c>] (handle_IPI+0x138/0x174)
>   [<c021429c>] (handle_IPI) from [<c02087f0>] (armada_370_xp_handle_irq+0xb0/0xcc)
>   [<c02087f0>] (armada_370_xp_handle_irq) from [<c0212100>] (__irq_svc+0x40/0x50)
>   Exception stack(0xc0b6bf68 to 0xc0b6bfb0)
>   bf60:                   e9fad598 00000000 00f509a3 00000000 c0b6a000 c0b724c4
>   bf80: c0b72458 c0b6a000 00000000 00000000 c0b66da0 c0b6a000 00000000 c0b6bfb0
>   bfa0: c027bb94 c027bb24 60000313 ffffffff
>   [<c0212100>] (__irq_svc) from [<c027bb24>] (cpu_startup_entry+0x54/0x214)
>   [<c027bb24>] (cpu_startup_entry) from [<c0ac5b30>] (start_kernel+0x318/0x37c)
>   [<c0ac5b30>] (start_kernel) from [<00208078>] (0x208078)
>   ---[ end Kernel panic - not syncing: Out of memory and no killable processes...
>
> Fix this by setting a sane default (1 GB) in the dts file.
>
> Signed-off-by: Jason Cooper <jason@lakedaemon.net>

Tested-by: Kevin Hilman <khilman@linaro.org>

> ---
> Kevin,
>
> Please test when you have a moment.  If it works for you, feel free to apply it
> directly wherever you feel it's appropriate.

Yes, this works for me as I've been using the same hack to boot several BE
kernels on the openblocks recently.

Could you do the minor changelog update above (ATAG_COMPAT), add the
Tested-by and send to arm@kernel.org so it gets tracked for arm-soc
merge.

Also, what do you think about backporting this for -stable?  At least
for v3.14+ since that's when BE started working.

Kevin
Thomas Petazzoni June 3, 2014, 9:57 p.m. UTC | #2
Dear Kevin Hilman,

On Tue, 03 Jun 2014 11:07:30 -0700, Kevin Hilman wrote:

> Also, what do you think about backporting this for -stable?  At least
> for v3.14+ since that's when BE started working.

Actually, BE started to work in v3.13+.

Thomas
Kevin Hilman June 3, 2014, 10:15 p.m. UTC | #3
On Tue, Jun 3, 2014 at 11:07 AM, Kevin Hilman <khilman@linaro.org> wrote:
> Jason Cooper <jason@lakedaemon.net> writes:
>
>> The OpenBlocks AX3-4 has a non-DT bootloader.  It also comes with 1GB of
>> soldered on RAM, and a DIMM slot for expansion.
>>
>> Unfortunately, atags_to_fdt() doesn't work in big-endian mode, so we see
>> the following failure when attempting to boot a big-endian kernel:
[...]
>>
>> Fix this by setting a sane default (1 GB) in the dts file.
>>
>> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
>
> Tested-by: Kevin Hilman <khilman@linaro.org>

Also FYI, I put a temporary hack into my automated boot setup to use
fdtput to live-patch the openblocks DTB with 1G, and you can see that
openblocks is now passing boot test for big-endian:

   http://lists.linaro.org/pipermail/kernel-build-reports/2014-June/003812.html

Also FYI, I added mvebu_v7_defconfig + CONFIG_CPU_BIG_ENDIAN=y to the
mix, so those should start showing up in subsequent boot tests also.

Kevin
Thomas Petazzoni June 4, 2014, 6:36 a.m. UTC | #4
Dear Kevin Hilman,

On Tue, 3 Jun 2014 15:15:16 -0700, Kevin Hilman wrote:

> Also FYI, I put a temporary hack into my automated boot setup to use
> fdtput to live-patch the openblocks DTB with 1G, and you can see that
> openblocks is now passing boot test for big-endian:
> 
>    http://lists.linaro.org/pipermail/kernel-build-reports/2014-June/003812.html
> 
> Also FYI, I added mvebu_v7_defconfig + CONFIG_CPU_BIG_ENDIAN=y to the
> mix, so those should start showing up in subsequent boot tests also.

Great, thanks a lot for working on adding big endian testing to your
board farm. This is definitely going to be very useful!

Thanks,

Thomas
Jason Cooper June 4, 2014, 1:35 p.m. UTC | #5
On Tue, Jun 03, 2014 at 11:07:30AM -0700, Kevin Hilman wrote:
> Jason Cooper <jason@lakedaemon.net> writes:
> 
> > The OpenBlocks AX3-4 has a non-DT bootloader.  It also comes with 1GB of
> > soldered on RAM, and a DIMM slot for expansion.
> >
> > Unfortunately, atags_to_fdt() doesn't work in big-endian mode, so we see
> > the following failure when attempting to boot a big-endian kernel:
> 
> The same will happen on kernels without the ATAG_DTB_COMPAT option
> enabled too, right?

Yes, good point.

> >   686 slab pages
> >   17 pages shared
> >   0 pages swap cached
> >   [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
> >   Kernel panic - not syncing: Out of memory and no killable processes...
> >
> >   CPU: 1 PID: 351 Comm: kworker/u4:0 Not tainted 3.15.0-rc8-next-20140603 #1
> >   [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14)
> >   [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94)
> >   [<c0802500>] (dump_stack) from [<c0800068>] (panic+0x90/0x21c)
> >   [<c0800068>] (panic) from [<c02b5704>] (out_of_memory+0x320/0x340)
> >   [<c02b5704>] (out_of_memory) from [<c02b93a0>] (__alloc_pages_nodemask+0x874/0x930)
> >   [<c02b93a0>] (__alloc_pages_nodemask) from [<c02d446c>] (handle_mm_fault+0x744/0x96c)
> >   [<c02d446c>] (handle_mm_fault) from [<c02cf250>] (__get_user_pages+0xd0/0x4c0)
> >   [<c02cf250>] (__get_user_pages) from [<c02f3598>] (get_arg_page+0x54/0xbc)
> >   [<c02f3598>] (get_arg_page) from [<c02f3878>] (copy_strings+0x278/0x29c)
> >   [<c02f3878>] (copy_strings) from [<c02f38bc>] (copy_strings_kernel+0x20/0x28)
> >   [<c02f38bc>] (copy_strings_kernel) from [<c02f4f1c>] (do_execve+0x3a8/0x4c8)
> >   [<c02f4f1c>] (do_execve) from [<c025ac10>] (____call_usermodehelper+0x15c/0x194)
> >   [<c025ac10>] (____call_usermodehelper) from [<c020e9b8>] (ret_from_fork+0x14/0x3c)
> >   CPU0: stopping
> >   CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.15.0-rc8-next-20140603 #1
> >   [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14)
> >   [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94)
> >   [<c0802500>] (dump_stack) from [<c021429c>] (handle_IPI+0x138/0x174)
> >   [<c021429c>] (handle_IPI) from [<c02087f0>] (armada_370_xp_handle_irq+0xb0/0xcc)
> >   [<c02087f0>] (armada_370_xp_handle_irq) from [<c0212100>] (__irq_svc+0x40/0x50)
> >   Exception stack(0xc0b6bf68 to 0xc0b6bfb0)
> >   bf60:                   e9fad598 00000000 00f509a3 00000000 c0b6a000 c0b724c4
> >   bf80: c0b72458 c0b6a000 00000000 00000000 c0b66da0 c0b6a000 00000000 c0b6bfb0
> >   bfa0: c027bb94 c027bb24 60000313 ffffffff
> >   [<c0212100>] (__irq_svc) from [<c027bb24>] (cpu_startup_entry+0x54/0x214)
> >   [<c027bb24>] (cpu_startup_entry) from [<c0ac5b30>] (start_kernel+0x318/0x37c)
> >   [<c0ac5b30>] (start_kernel) from [<00208078>] (0x208078)
> >   ---[ end Kernel panic - not syncing: Out of memory and no killable processes...
> >
> > Fix this by setting a sane default (1 GB) in the dts file.
> >
> > Signed-off-by: Jason Cooper <jason@lakedaemon.net>
> 
> Tested-by: Kevin Hilman <khilman@linaro.org>

Thanks!

> > ---
> > Kevin,
> >
> > Please test when you have a moment.  If it works for you, feel free to apply it
> > directly wherever you feel it's appropriate.
> 
> Yes, this works for me as I've been using the same hack to boot several BE
> kernels on the openblocks recently.
> 
> Could you do the minor changelog update above (ATAG_COMPAT), add the
> Tested-by and send to arm@kernel.org so it gets tracked for arm-soc
> merge.

Sure.

> Also, what do you think about backporting this for -stable?  At least
> for v3.14+ since that's when BE started working.

per Thomas, v3.13+

thx,

Jason.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
index 5d42feb31049..178382ca594f 100644
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
@@ -25,7 +25,7 @@ 
 
 	memory {
 		device_type = "memory";
-		reg = <0 0x00000000 0 0xC0000000>; /* 3 GB */
+		reg = <0 0x00000000 0 0x40000000>; /* 1 GB soldered on */
 	};
 
 	soc {