Skip to contentSkip to conversation

2.6.31-rc1: sparc T2: Fast Data Access MMU Miss

DISCUSSION David Miller 3 participants 5 messages Sep 4, 2009 – Sep 8, 2009 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

From: Alexander Beregalov <[email protected]>
Date: Mon, 29 Jun 2009 19:30:12 +0400

Quoted 4 lines

This is the first time I try to boot Linux on that system, perhaps config is wrong (attached).
Kernel is 2.6.31-rc1-00195-g5298976.
Gentoo LiveCD kernel 2.6.24 works fine.

I can reproduce with your config, debugging now, thanks!

author maintainer
#1 lore raw

The problem is that is a missing "notrace" annotation.

It triggers with your config because some functions don't get inlined by the compiler which normally would be (which is why I've never seen this before).

Please try this patch, thanks!

sparc64: Fix bootup with mcount in some configs.

Functions invoked early when booting up a cpu can't use tracing because mcount requires a valid 'current_thread_info()' and TLB mappings to be setup.

The code path of sun4v_register_mondo_queues --> register_one_mondo is one such case. sun4v_register_mondo_queues already has the necessary 'notrace' annotation, but register_one_mondo does not.

Normally register_on_mondo is inlined so the bug doesn't trigger, but with some config/compiler combinations, it won't be so we must properly mark it notrace.

While we're here, add 'notrace' annoations to prom_printf and prom_halt so that early error handling won't have the same problem.

arch/sparc/kernel/irq_64.c +1 -1
index f0ee790..8daab33 100644
@@ -886,7 +886,7 @@ void notrace init_irqwork_curcpu(void)
  * Therefore you cannot make any OBP calls, not even prom_printf,
  * from these two routines.
  */
-static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask)
+static void __cpuinit notrace register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask)
 {
 	unsigned long num_entries = (qmask + 1) / 64;
 	unsigned long status;
arch/sparc/prom/misc_64.c +1 -1
index eedffb4..39fc6af 100644
@@ -88,7 +88,7 @@ void prom_cmdline(void)
 /* Drop into the prom, but completely terminate the program.
  * No chance of continuing.
  */
-void prom_halt(void)
+void notrace prom_halt(void)
 {
 #ifdef CONFIG_SUN_LDOMS
 	if (ldom_domaining_enabled)
arch/sparc/prom/printf.c +3 -4
index 660943e..ca86926 100644
@@ -14,14 +14,14 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/compiler.h>
 
 #include <asm/openprom.h>
 #include <asm/oplib.h>
 
 static char ppbuf[1024];
 
-void
-prom_write(const char *buf, unsigned int n)
+void notrace prom_write(const char *buf, unsigned int n)
 {
 	char ch;
 
@@ -33,8 +33,7 @@ prom_write(const char *buf, unsigned int n)
 	}
 }
 
-void
-prom_printf(const char *fmt, ...)
+void notrace prom_printf(const char *fmt, ...)
 {
 	va_list args;
 	int i;
#2 lore raw
In reply to David Miller

2009/9/4 David Miller <[email protected]>:

Quoted 10 lines

The problem is that is a missing "notrace" annotation.

It triggers with your config because some functions don't get inlined by the compiler which normally would be (which is why I've never seen this before).

Please try this patch, thanks!

sparc64: Fix bootup with mcount in some configs.

Sorry, I can't test. I don't have an access to this hardware anymore.

author maintainer
#3 lore raw
In reply to David Miller

From: Alexander Beregalov <[email protected]>
Date: Fri, 4 Sep 2009 15:21:37 +0400

Quoted 8 lines

2009/9/4 David Miller <[email protected]>:

Quoted 7 lines

The problem is that is a missing "notrace" annotation.

It triggers with your config because some functions don't get inlined by the compiler which normally would be (which is why I've never seen this before).

Quoted 5 lines
Quoted 3 lines

Please try this patch, thanks!

sparc64: Fix bootup with mcount in some configs.

Sorry, I can't test. I don't have an access to this hardware anymore.

Thanks for reporting the problem, anyways.

#4 lore raw
In reply to David Miller
Quoted 7 lines · David Miller

The problem is that is a missing "notrace" annotation.

It triggers with your config because some functions don't get inlined by the compiler which normally would be (which is why I've never seen this before).

Please try this patch, thanks!

rebuilding with the notrace patch as well as RTC and NMI patches.

Will reboot later today during local lunch hour in case I need to run to the remote site for a power cycle.