linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] m68k: mm: fix wrong m68k_fixup_info addresses
@ 2020-06-24 23:34 Angelo Dureghello
  2020-06-25  8:13 ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Angelo Dureghello @ 2020-06-24 23:34 UTC (permalink / raw)
  To: gerg; +Cc: linux-m68k, Angelo Dureghello

On mcf5441x, mmu enabled, using a small initramfs, the boot was
recently hanging silently in the initial phase, inside
arch/m68k/mm/init.c, m68k_setup_node()

initrd at 0x47d2f000:0x47d82f64
overlap at 1073741889 for chunk 0
overlap at 1073746176 for chunk 0
overlap at 1073746736 for chunk 0
overlap at 1073746737 for chunk 0
overlap at 1073746738 for chunk 0
overlap at 1073746739 for chunk 0
overlap at 1073746740 for chunk 0

From some debugging, at m68k_setup_node(), the 25-bits shift value
(virt_to_node_shift) seems unset, because applied to a wrong
address (address previously set from m68k_fixup).

Tried some fixes, but the more low-risk and hopefully correct seems
to just add a volatile inside __virt_to_node_shift(). This seems to
produce correct addresses for the next fixup to work. Cannot test this
on other mmu ColdFire cpu's so every test is eventually welcome.

Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
---
 arch/m68k/include/asm/page_mm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h
index e6b75992192b..1eff386cc64b 100644
--- a/arch/m68k/include/asm/page_mm.h
+++ b/arch/m68k/include/asm/page_mm.h
@@ -135,7 +135,7 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
 {
 	int shift;
 
-	asm (
+	asm volatile (
 		"1:	moveq	#0,%0\n"
 		m68k_fixup(%c1, 1b)
 		: "=d" (shift)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] m68k: mm: fix wrong m68k_fixup_info addresses
@ 2020-11-08 16:34 Angelo Dureghello
  0 siblings, 0 replies; 7+ messages in thread
From: Angelo Dureghello @ 2020-11-08 16:34 UTC (permalink / raw)
  To: gerg; +Cc: linux-m68k, geert, Angelo Dureghello

After rebasing today with mainline/master, i am hitting
this issue again:

https://www.spinics.net/lists/linux-m68k/msg15881.html

   Loading Ramdisk to 47ccc000, end 47d85544 ... OK
...
initrd at 0x47ccc000:0x47d85544
overlap at 1073741889 for chunk 0
overlap at 1073746200 for chunk 0
overlap at 1073746760 for chunk 0
overlap at 1073746761 for chunk 0
overlap at 1073746762 for chunk 0
overlap at 1073746763 for chunk 0
overlap at 1073746764 for chunk 0

This time i am using gcc-10.1.0-nolibc, but the issue
re-appeared. Add volatile again to solve the issue.

Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
---
 arch/m68k/include/asm/page_mm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h
index e6b75992192b..1eff386cc64b 100644
--- a/arch/m68k/include/asm/page_mm.h
+++ b/arch/m68k/include/asm/page_mm.h
@@ -135,7 +135,7 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
 {
 	int shift;
 
-	asm (
+	asm volatile (
 		"1:	moveq	#0,%0\n"
 		m68k_fixup(%c1, 1b)
 		: "=d" (shift)
-- 
2.28.0


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

end of thread, other threads:[~2020-11-08 16:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 23:34 [PATCH] m68k: mm: fix wrong m68k_fixup_info addresses Angelo Dureghello
2020-06-25  8:13 ` Geert Uytterhoeven
2020-06-26 20:14   ` Angelo Dureghello
2020-07-13 19:41     ` Angelo Dureghello
2020-07-14 13:01       ` Greg Ungerer
2020-07-14 15:41         ` Angelo Dureghello
2020-11-08 16:34 Angelo Dureghello

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).