Skip to contentSkip to conversation

gate.S and recent toolchains

PATCH Jes Sorensen 5 participants 14 messages Mar 29, 2006 – Mar 30, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I've been chasing a very strange but since Monday and I am starting to hit a brick wall.

Basically I am unable to build a kernel from Linus' git tree on one system since Monday morning, whereas it boots fine if I build it on an older system. I tried installing an older toolchain on this box but it still didn't seem to make a difference. The system boots, calls init and I most often get the message "INIT: 2.85 booting", then a hang. In some instances I don't even get the INIT message.

What sparked it was Russ Anderson's patch which added a few lines to include/asm-ia64/asmmacros.h, git id d2a28ad9fa7bf16761d070d8a3338375e1574b32

I've tracked it down to being the two lines doing a .section/.previous in the below patch chunk causing it. However it doesn't seem to be the specific .section name that does it, ie. any random .section/.previous pair I add to arch/ia64/kernel/gate.S has the same effect.

Now I am not a wiz in linker/gas magic, so I was hoping someone else had an idea what could be causing this? Anyone seen anything similar?

The specific toolchain I am using is gcc-4.1.0 based, but I tried 3.3.4 (with binutils 2.15) and it failed as well. However 4.0.2 on another system seems to do fine (admittedly it had binutils 2.14.90.x).

Any suggestions would be greatly appreciated.

Thanks,
Jes

include/asm-ia64/asmmacro.h +4 -0
index 77af457..d4cec32 100644
@@ -51,6 +51,17 @@ name:
   [99:]        x
 
 /*
+ * Tag MCA recoverable instruction ranges.
+ */
+
+       .section "__mca_table", "a"             // declare section &

section attributes
+ .previous
+
+# define MCA_RECOVER_RANGE(y) \
+ .xdata4 "__mca_table", y-., 99f-.; \
+ [99:]
+
+/*
* Mark instructions that need a load of a virtual address patched to be
* a load of a physical address. We use this either in critical
performance
* path (ivt.S - TLB miss processing) or in places where it might not be

#1 lore raw
Quoted 6 lines · Jes Sorensen

Hi,

I've been chasing a very strange but since Monday and I am starting to hit a brick wall.

Quoted 6 lines

Basically I am unable to build a kernel from Linus' git tree on one system since Monday morning, whereas it boots fine if I build it on an older system. I tried installing an older toolchain on this box but it still didn't seem to make a difference. The system boots, calls init and I most often get the message "INIT: 2.85 booting", then a hang. In some instances I don't even get the INIT message.

It builds and boots on all the machines I have tried, including the same build and boot machines Jes uses. Jes can't get it to work, I can't get it to fail.

Quoted 48 lines

What sparked it was Russ Anderson's patch which added a few lines to include/asm-ia64/asmmacros.h, git id d2a28ad9fa7bf16761d070d8a3338375e1574b32

I've tracked it down to being the two lines doing a .section/.previous in the below patch chunk causing it. However it doesn't seem to be the specific .section name that does it, ie. any random .section/.previous pair I add to arch/ia64/kernel/gate.S has the same effect.

Now I am not a wiz in linker/gas magic, so I was hoping someone else had an idea what could be causing this? Anyone seen anything similar?

The specific toolchain I am using is gcc-4.1.0 based, but I tried 3.3.4 (with binutils 2.15) and it failed as well. However 4.0.2 on another system seems to do fine (admittedly it had binutils 2.14.90.x).

Any suggestions would be greatly appreciated.

Thanks,
Jes

include/asm-ia64/asmmacro.h +4 -0
index 77af457..d4cec32 100644
@@ -51,6 +51,17 @@ name:
   [99:]        x
 
 /*
+ * Tag MCA recoverable instruction ranges.
+ */
+
+       .section "__mca_table", "a"             // declare section &

section attributes

include/asm-ia64/asmmacro.h +7 -0
+       .previous
+
+# define MCA_RECOVER_RANGE(y)                  \
+       .xdata4 "__mca_table", y-., 99f-.;      \
+  [99:]
+
+/*
  * Mark instructions that need a load of a virtual address patched to be
  * a load of a physical address.  We use this either in critical

performance
* path (ivt.S - TLB miss processing) or in places where it might not be

Signature · 2 lines
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          [email protected]
#2 lore raw
In reply to Jes Sorensen
Quoted 11 lines · Russ Anderson

Hi,

I've been chasing a very strange but since Monday and I am starting to hit a brick wall.

Basically I am unable to build a kernel from Linus' git tree on one system since Monday morning, whereas it boots fine if I build it on an older system. I tried installing an older toolchain on this box but it still didn't seem to make a difference. The system boots, calls init and I most often get the message "INIT: 2.85 booting", then a hang. In some

My kernel says "INIT: version 2.86 booting" and works.

Quoted 50 lines

instances I don't even get the INIT message.

What sparked it was Russ Anderson's patch which added a few lines to include/asm-ia64/asmmacros.h, git id d2a28ad9fa7bf16761d070d8a3338375e1574b32

I've tracked it down to being the two lines doing a .section/.previous in the below patch chunk causing it. However it doesn't seem to be the specific .section name that does it, ie. any random .section/.previous pair I add to arch/ia64/kernel/gate.S has the same effect.

Now I am not a wiz in linker/gas magic, so I was hoping someone else had an idea what could be causing this? Anyone seen anything similar?

The specific toolchain I am using is gcc-4.1.0 based, but I tried 3.3.4 (with binutils 2.15) and it failed as well. However 4.0.2 on another system seems to do fine (admittedly it had binutils 2.14.90.x).

Any suggestions would be greatly appreciated.

Thanks,
Jes

include/asm-ia64/asmmacro.h +4 -0
index 77af457..d4cec32 100644
@@ -51,6 +51,17 @@ name:
   [99:]        x
 
 /*
+ * Tag MCA recoverable instruction ranges.
+ */
+
+       .section "__mca_table", "a"             // declare section &

section attributes

include/asm-ia64/asmmacro.h +7 -0
+       .previous
+
+# define MCA_RECOVER_RANGE(y)                  \
+       .xdata4 "__mca_table", y-., 99f-.;      \
+  [99:]
+
+/*
  * Mark instructions that need a load of a virtual address patched to be
  * a load of a physical address.  We use this either in critical

performance
* path (ivt.S - TLB miss processing) or in places where it might not be

Signature · 2 lines
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          [email protected]
#4 lore raw
In reply to Jes Sorensen

Russ Anderson wrote on Wednesday, March 29, 2006 8:51 AM

Quoted 10 lines
Quoted 6 lines

Basically I am unable to build a kernel from Linus' git tree on one system since Monday morning, whereas it boots fine if I build it on an older system. I tried installing an older toolchain on this box but it still didn't seem to make a difference. The system boots, calls init and I most often get the message "INIT: 2.85 booting", then a hang. In some instances I don't even get the INIT message.

It builds and boots on all the machines I have tried, including the same build and boot machines Jes uses. Jes can't get it to work, I can't get it to fail.

Russ, do you reference __mca_table at run time? It looks like so. It's problematic that __mca_table is in __init section. Though I doubt that was the reason Jes ran into.

- Ken

#5 lore raw
In reply to Jes Sorensen
Quoted 4 lines · Kenneth W

Russ, do you reference __mca_table at run time? It looks like so. It's problematic that __mca_table is in __init section. Though I doubt that was the reason Jes ran into.

It was right next to __ex_table in the original patch. Yes, it is referenced at run time and should not be in the __init section.

Signature · 2 lines
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          [email protected]
#6 lore raw
In reply to Jes Sorensen

Russ Anderson wrote on Wednesday, March 29, 2006 9:23 AM

Quoted 9 lines
Quoted 4 lines · Kenneth W

Russ, do you reference __mca_table at run time? It looks like so. It's problematic that __mca_table is in __init section. Though I doubt that was the reason Jes ran into.

It was right next to __ex_table in the original patch. Yes, it is referenced at run time and should not be in the __init section.

I guess it's a merge error then :-P

- Ken

#7 lore raw
In reply to Jes Sorensen
Quoted 7 lines · Kenneth W

Russ Anderson wrote on Wednesday, March 29, 2006 9:23 AM

Quoted 6 lines
Quoted 4 lines · Kenneth W

Russ, do you reference __mca_table at run time? It looks like so. It's problematic that __mca_table is in __init section. Though I doubt that was the reason Jes ran into.

Quoted 5 lines
Quoted 3 lines

It was right next to __ex_table in the original patch. Yes, it is referenced at run time and should not be in the __init section.

I guess it's a merge error then :-P

This patch moves __mca_table out of the __init section.

Jes, can you give this a try?

-----------------------------------------------------

 arch/ia64/kernel/vmlinux.lds.S |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

Index: linux-2.6-linus/arch/ia64/kernel/vmlinux.lds.S
=================================--- linux-2.6-linus.orig/arch/ia64/kernel/vmlinux.lds.S 2006-03-28 09:03:23.000000000 -0600
+++ linux-2.6-linus/arch/ia64/kernel/vmlinux.lds.S 2006-03-29 11:24:56.943922578 -0600
@@ -70,6 +70,15 @@ SECTIONS
__stop___ex_table = .;
}

+  /* MCA table */
+  . = ALIGN(16);
+  __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
+	{
+	  __start___mca_table = .;
+	  *(__mca_table)
+	  __stop___mca_table = .;

+ }
+
/* Global data */
_data = .;

@@ -128,15 +137,6 @@ SECTIONS
*(.initcall6.init)
*(.initcall7.init)
__initcall_end = .;
- }
-

-  /* MCA table */
-  . = ALIGN(16);
-  __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
-	{
-	  __start___mca_table = .;
-	  *(__mca_table)
-	  __stop___mca_table = .;

}

.data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)

#8 lore raw
In reply to Jes Sorensen
Quoted 7 lines · Kenneth W

Russ Anderson wrote on Wednesday, March 29, 2006 8:51 AM

Quoted 6 lines
Quoted 6 lines

Basically I am unable to build a kernel from Linus' git tree on one system since Monday morning, whereas it boots fine if I build it on an older system. I tried installing an older toolchain on this box but it still didn't seem to make a difference. The system boots, calls init and I most often get the message "INIT: 2.85 booting", then a hang. In some instances I don't even get the INIT message.

Quoted 7 lines
Quoted 3 lines

It builds and boots on all the machines I have tried, including the same build and boot machines Jes uses. Jes can't get it to work, I can't get it to fail.

Russ, do you reference __mca_table at run time? It looks like so. It's problematic that __mca_table is in __init section. Though I doubt that was the reason Jes ran into.

Hi Ken,

I actually noticed that earlier and tried moving it around, but it made no difference. I forgot it again in the noise.

Cheers,
Jes

#9 lore raw
In reply to Jes Sorensen
Quoted 9 lines · H. J. Lu
Quoted 4 lines · Jes Sorensen

The specific toolchain I am using is gcc-4.1.0 based, but I tried 3.3.4 (with binutils 2.15) and it failed as well. However 4.0.2 on another system seems to do fine (admittedly it had binutils 2.14.90.x).

Can you try the current Linux binutils 2.16.91.0.7 at

http://www.kernel.org/pub/linux/devel/binutils/

Will do first thing in the morning.

Thanks,
Jes

#10 lore raw
In reply to Jes Sorensen
Quoted 6 lines · Russ Anderson
Quoted 5 lines · Kenneth W

Russ Anderson wrote on Wednesday, March 29, 2006 9:23 AM

Quoted 4 lines
Quoted 3 lines · Kenneth W

Russ, do you reference __mca_table at run time? It looks like so. It's problematic that __mca_table is in __init section. Though I doubt that was the reason Jes ran into.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

It was right next to __ex_table in the original patch. Yes, it is referenced at run time and should not be in the __init section.

I guess it's a merge error then :-P

This patch moves __mca_table out of the __init section.

Jes, can you give this a try?

I am 99.999% sure it wont make a difference. I even tried reverting your full patch and just adding the two lines to asmmacros.h and I still hit the failture.

Cheers,
Jes

#11 lore raw
In reply to Jes Sorensen

Jes Sorensen wrote on Wednesday, March 29, 2006 10:03 AM

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 6 lines

Basically I am unable to build a kernel from Linus' git tree on one system since Monday morning, whereas it boots fine if I build it on an older system. I tried installing an older toolchain on this box but it still didn't seem to make a difference. The system boots, calls init and I most often get the message "INIT: 2.85 booting", then a hang. In some instances I don't even get the INIT message.

It builds and boots on all the machines I have tried, including the same build and boot machines Jes uses. Jes can't get it to work, I can't get it to fail.

Quoted 6 lines
Quoted 3 lines

Russ, do you reference __mca_table at run time? It looks like so. It's problematic that __mca_table is in __init section. Though I doubt that was the reason Jes ran into.

I actually noticed that earlier and tried moving it around, but it made no difference. I forgot it again in the noise.

That's what I thought as well, very unlikely it is the issue you ran into.

- Ken

#12 lore raw
In reply to Jes Sorensen
Quoted 7 lines · Russ Anderson
Quoted 6 lines · Jes Sorensen

Hi,

I've been chasing a very strange but since Monday and I am starting to hit a brick wall.

Quoted 6 lines
Quoted 6 lines

Basically I am unable to build a kernel from Linus' git tree on one system since Monday morning, whereas it boots fine if I build it on an older system. I tried installing an older toolchain on this box but it still didn't seem to make a difference. The system boots, calls init and I most often get the message "INIT: 2.85 booting", then a hang. In some instances I don't even get the INIT message.

Have you NMI'ed the system to see where it is hanging.

Also, give it a spin on the simulator. These kinds of bugs are frequently easier to debug on the simulator. If you want, send me a pointer to a kernel & I see what happens.

Quoted 62 lines

It builds and boots on all the machines I have tried, including the same build and boot machines Jes uses. Jes can't get it to work, I can't get it to fail.

Quoted 48 lines

What sparked it was Russ Anderson's patch which added a few lines to include/asm-ia64/asmmacros.h, git id d2a28ad9fa7bf16761d070d8a3338375e1574b32

I've tracked it down to being the two lines doing a .section/.previous in the below patch chunk causing it. However it doesn't seem to be the specific .section name that does it, ie. any random .section/.previous pair I add to arch/ia64/kernel/gate.S has the same effect.

Now I am not a wiz in linker/gas magic, so I was hoping someone else had an idea what could be causing this? Anyone seen anything similar?

The specific toolchain I am using is gcc-4.1.0 based, but I tried 3.3.4 (with binutils 2.15) and it failed as well. However 4.0.2 on another system seems to do fine (admittedly it had binutils 2.14.90.x).

Any suggestions would be greatly appreciated.

Thanks,
Jes

include/asm-ia64/asmmacro.h +4 -0
index 77af457..d4cec32 100644
@@ -51,6 +51,17 @@ name:
   [99:]        x
 
 /*
+ * Tag MCA recoverable instruction ranges.
+ */
+
+       .section "__mca_table", "a"             // declare section &

section attributes

include/asm-ia64/asmmacro.h +7 -0
+       .previous
+
+# define MCA_RECOVER_RANGE(y)                  \
+       .xdata4 "__mca_table", y-., 99f-.;      \
+  [99:]
+
+/*
  * Mark instructions that need a load of a virtual address patched to be
  * a load of a physical address.  We use this either in critical

performance
* path (ivt.S - TLB miss processing) or in places where it might not be

Signature · 6 lines
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.
#13 lore raw
In reply to Jes Sorensen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"HJ" = H J Lu <[email protected]> writes:

Quoted 5 lines · Jes Sorensen
Quoted 5 lines

The specific toolchain I am using is gcc-4.1.0 based, but I tried 3.3.4 (with binutils 2.15) and it failed as well. However 4.0.2 on another system seems to do fine (admittedly it had binutils 2.14.90.x).

HJ> Can you try the current Linux binutils 2.16.91.0.7 at

HJ> http://www.kernel.org/pub/linux/devel/binutils/

HJ,

Tried it, no difference :(

Cheers,
Jes