All of lore.kernel.org
 help / color / mirror / Atom feed
* Current SuperH board can't boot
@ 2013-01-11  2:14 Kuninori Morimoto
  2013-01-11  3:04 ` Michel Lespinasse
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2013-01-11  2:14 UTC (permalink / raw)
  To: linux-sh


Hi Paul, Michel, and all

I noticed that SuperH ecovec board can't boot on latest linus/master branch.
NFS rootfs can't mount.
I git-bisect'ed this issue, and found first bad commit.
Below is bad commit and my kernel log.

--- first bad commit -------------------------------
b4265f12340f809447b9a48055e88c444b480c89 is the first bad commit
commit b4265f12340f809447b9a48055e88c444b480c89
Author: Michel Lespinasse <walken@google.com>
Date:   Tue Dec 11 16:02:12 2012 -0800

mm: use vm_unmapped_area() on sh architecture

Update the sh arch_get_unmapped_area[_topdown] functions to make use of
vm_unmapped_area() instead of implementing a brute force search.

[akpm@linux-foundation.org: remove now-unused COLOUR_ALIGN_DOWN()]
Signed-off-by: Michel Lespinasse <walken@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

:040000 040000 4bb40855396d49b51e499d2d4eafff31288b6d03 6b51feb630302d72692ee15eead57bc0b1639147 M	arch

--- kernel boot log -------------------------------
...
asoc-simple-card asoc-simple-card.0:  da7210-hifi <-> fsib-dai mapping ok                                                                
net eth0: attached phy 31 to driver SMSC LAN8700                                                                                         
Sending DHCP requests ..libphy: sh-eth-0:1f - Link is Up - 100/Full                                                                      
., OK                                                                                                                                    
IP-Config: Got DHCP answer from 192.168.10.77, my address is 192.168.10.119                                                              
IP-Config: Complete:                                                                                                                     
     device=eth0, addr\x192.168.10.119, mask%5.255.255.0, gw\x192.168.10.77                                                              
     host\x192.168.10.119, domain=example.org, nis-domain=(none)                                                                          
     bootserver\x192.168.10.77, rootserver\x192.168.10.77, rootpath=/opt/tftpboot/rootfs_ms7724se                                          
     nameserver0\x192.168.10.77ALSA device list:                                                                                          
  #0: FSIB-DA7210                                                                                                                        
VFS: Mounted root (nfs filesystem) on device 0:9.                                                                                        
Freeing unused kernel memory: 136k freed                                                                                                 
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.           
Stack: (0x8f029f3c to 0x8f02a000)                                                                                                        
9f20:                                                                882b1c2a                                                            
9f40: 8f029f4c 00000000 88369c68 882b1cb4 8f029f54 00000000 00000000 00000000                                                            
9f60: 8f029f84 882adcc0 8f029f90 00000000 00000000 00000000 00000000 00000000                                                            
9f80: 88002050 883db36c 883db2e0 00140173 88003a78 8f029f9c 00000000 00000000                                                            
9fa0: 00000000 00000000 00000000 00000000 00000000 00000000 882adc1c 00000000                                                            
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                            
9fe0: 8f029fa4 88003a70 00000000 40008000 00000000 00000000 00000000 00000000                                                            
                                                                                                                                         
Call trace:                                                                                                                              
 [<882b1c2a>] dump_stack+0xe/0x1c                                                                                                        
 [<882b1cb4>] panic+0x7c/0x1b8                                                                                                           
 [<882adcc0>] kernel_init+0xa4/0xf8                                                                                                      
 [<88002050>] run_init_process+0x0/0x24                                                                                                  
 [<88003a78>] kernel_thread_helper+0x8/0x14                                                                                              
 [<882adc1c>] kernel_init+0x0/0xf8                                                                                                       
 [<88003a70>] kernel_thread_helper+0x0/0x14                                                                                              
                                                                                                                                         
1 lock held by init/1:                                                                                                                   
 #0:  (panic_lock){......}, at: [<882b1c62>] panic+0x2a/0x1b8                                                                            


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

* Re: Current SuperH board can't boot
  2013-01-11  2:14 Current SuperH board can't boot Kuninori Morimoto
@ 2013-01-11  3:04 ` Michel Lespinasse
  2013-01-11  3:53 ` Kuninori Morimoto
  2013-01-11  4:03 ` Michel Lespinasse
  2 siblings, 0 replies; 4+ messages in thread
From: Michel Lespinasse @ 2013-01-11  3:04 UTC (permalink / raw)
  To: linux-sh

On Thu, Jan 10, 2013 at 6:14 PM, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:
> Hi Paul, Michel, and all
>
> I noticed that SuperH ecovec board can't boot on latest linus/master branch.
> NFS rootfs can't mount.
> I git-bisect'ed this issue, and found first bad commit.
> Below is bad commit and my kernel log.

Sorry for the trouble. Looking at the commit again and at your logs, I
can't see what's causing this.

Could you please try with CONFIG_DEBUG_VM, CONFIG_DEBUG_VM_RB,
loglevel=8 boot option, and the following patch which I hope may give
us some useful debug information ?

diff --git a/mm/mmap.c b/mm/mmap.c
index 532f447879d4..acc282e26b57 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1557,6 +1557,13 @@ unacct_error:
 	return error;
 }
 
+static void show_vm_unmapped_area_info (struct vm_unmapped_area_info *info)
+{
+	printk("show_vm_unmapped_area_info: %lx %lx [%lx;%lx) %lx %lx\n",
+	       info->flags, info->length, info->low_limit, info->high_limit,
+	       info->align_mask, info->align_offset);
+}
+
 unsigned long unmapped_area(struct vm_unmapped_area_info *info)
 {
 	/*
@@ -1571,6 +1578,9 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
 	struct vm_area_struct *vma;
 	unsigned long length, low_limit, high_limit, gap_start, gap_end;
 
+	validate_mm(mm);
+	show_vm_unmapped_area_info(info);
+
 	/* Adjust search length to account for worst case alignment overhead */
 	length = info->length + info->align_mask;
 	if (length < info->length)
@@ -1656,6 +1666,7 @@ found:
 
 	VM_BUG_ON(gap_start + info->length > info->high_limit);
 	VM_BUG_ON(gap_start + info->length > gap_end);
+	printk("unmapped_area: found %lx\n", gap_start);
 	return gap_start;
 }
 
@@ -1665,6 +1676,9 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info)
 	struct vm_area_struct *vma;
 	unsigned long length, low_limit, high_limit, gap_start, gap_end;
 
+	validate_mm(mm);
+	show_vm_unmapped_area_info(info);
+
 	/* Adjust search length to account for worst case alignment overhead */
 	length = info->length + info->align_mask;
 	if (length < info->length)
@@ -1754,6 +1768,7 @@ found_highest:
 
 	VM_BUG_ON(gap_end < info->low_limit);
 	VM_BUG_ON(gap_end < gap_start);
+	printk("unmapped_area_topdown: found %lx\n", gap_end);
 	return gap_end;
 }
 
-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

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

* Re: Current SuperH board can't boot
  2013-01-11  2:14 Current SuperH board can't boot Kuninori Morimoto
  2013-01-11  3:04 ` Michel Lespinasse
@ 2013-01-11  3:53 ` Kuninori Morimoto
  2013-01-11  4:03 ` Michel Lespinasse
  2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2013-01-11  3:53 UTC (permalink / raw)
  To: linux-sh


Hi Michel

Thank you for your quick response.

> Could you please try with CONFIG_DEBUG_VM, CONFIG_DEBUG_VM_RB,
> loglevel=8 boot option, and the following patch which I hope may give
> us some useful debug information ?

Please check, this is my commands

> git checkout b4265f12340f809447b9a48055e88c444b480c89
> patch -p1 < your-patch
> make menuconfig
> grep CONFIG_DEBUG_VM .config
CONFIG_DEBUG_VM=y
CONFIG_DEBUG_VM_RB=y


-------- kernel log ------------------
...
asoc-simple-card asoc-simple-card.0:  da7210-hifi <-> fsib-dai mapping ok
Sending DHCP requests ..libphy: sh-eth-0:1f - Link is Up - 100/Full
., OK
IP-Config: Got DHCP answer from 192.168.10.77, my address is 192.168.10.119
IP-Config: Complete:
     device=eth0, addr\x192.168.10.119, mask%5.255.255.0, gw\x192.168.10.77
     host\x192.168.10.119, domain=example.org, nis-domain=(none)
     bootserver\x192.168.10.77, rootserver\x192.168.10.77, rootpath=/opt/tftpboot/rootfs_ms7724se
     nameserver0\x192.168.10.77ALSA device list:
  #0: FSIB-DA7210
VFS: Mounted root (nfs filesystem) on device 0:9.
Freeing unused kernel memory: 136k freed
show_vm_unmapped_area_info: 0 1000 [29555555;7c000000) 0 0
unmapped_area: found 29555555
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Stack: (0x8f029f3c to 0x8f02a000)
9f20:                                                                882b2fa6
9f40: 8f029f4c 00000000 8836ad68 882b3030 8f029f54 00000000 00000000 00000000
9f60: 8f029f84 882af03c 8f029f90 00000000 00000000 00000000 00000000 00000000
9f80: 88002050 883dd36c 883dd2e0 00140173 88003a78 8f029f9c 00000000 00000000
9fa0: 00000000 00000000 00000000 00000000 00000000 00000000 882aef98 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 8f029fa4 88003a70 00000000 40008000 00000000 00000000 00000000 00000000

Call trace:
 [<882b2fa6>] dump_stack+0xe/0x1c
 [<882b3030>] panic+0x7c/0x1b8
 [<882af03c>] kernel_init+0xa4/0xf8
 [<88002050>] run_init_process+0x0/0x24
 [<88003a78>] kernel_thread_helper+0x8/0x14
 [<882aef98>] kernel_init+0x0/0xf8
 [<88003a70>] kernel_thread_helper+0x0/0x14

1 lock held by init/1:
 #0:  (panic_lock){......}, at: [<882b2fde>] panic+0x2a/0x1b8
------------------------------

Best regards
---
Kuninori Morimoto

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

* Re: Current SuperH board can't boot
  2013-01-11  2:14 Current SuperH board can't boot Kuninori Morimoto
  2013-01-11  3:04 ` Michel Lespinasse
  2013-01-11  3:53 ` Kuninori Morimoto
@ 2013-01-11  4:03 ` Michel Lespinasse
  2 siblings, 0 replies; 4+ messages in thread
From: Michel Lespinasse @ 2013-01-11  4:03 UTC (permalink / raw)
  To: linux-sh

On Thu, Jan 10, 2013 at 7:53 PM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> show_vm_unmapped_area_info: 0 1000 [29555555;7c000000) 0 0
> unmapped_area: found 29555555

Ah, got it. The issue is that most architectures define
TASK_UNMAPPED_BASE as a page aligned constant, but sh doesn't.

Changing the TASK_UNMAPPED_BASE definition to PAGE_ALIGN(TASK_SIZE /
3) should fix the issue.

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

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

end of thread, other threads:[~2013-01-11  4:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11  2:14 Current SuperH board can't boot Kuninori Morimoto
2013-01-11  3:04 ` Michel Lespinasse
2013-01-11  3:53 ` Kuninori Morimoto
2013-01-11  4:03 ` Michel Lespinasse

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.