Skip to contentSkip to conversation

What does unwcheck.pl do?

DISCUSSION Roland Dreier 4 participants 5 messages Oct 25, 2004 – Oct 27, 2004

lore
Share & tools
lore
#0 lore raw

When I build an ia64 kernel, I get a warning about ia64_monarch_init_handler:

	$ make O=../kbuild-ia64
	  Using /data/home/roland/Src/linux-2.6.9 as source for kernel
	  CHK     include/linux/version.h
	make[2]: rch/ia64/kernel/asm-offsets.s' is up to date.
	  CHK     include/asm-ia64/offsets.h
	  CHK     include/linux/compile.h
	ERROR: ia64_monarch_init_handler: 186 slots, total region length = 0
	1 error detected in 9381 functions.
	make[1]: [unwcheck] Error 1 (ignored)
	  Building modules, stage 2.
	  MODPOST

This is with gcc 3.4.1/binutils 2.15 (built with Dan Kegel's crosstool):

	$ ${CROSS_COMPILE}gcc --version
	ia64-unknown-linux-gnu-gcc (GCC) 3.4.1
	Copyright (C) 2004 Free Software Foundation, Inc.
	This is free software; see the source for copying conditions.  There is NO
	warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
	$ ${CROSS_COMPILE}ld --version
	GNU ld version 2.15
	Copyright 2002 Free Software Foundation, Inc.
	This program is free software; you may redistribute it under the terms of
	the GNU General Public License.  This program has absolutely no warranty.

I can see the ERROR: comes from unwcheck.pl but I have no idea what it is checking (something to do with unwind info?) let alone how to fix the problem.

Is this benign or is there something to be fixed?

Thanks,
Roland

#1 lore raw
Quoted 2 lines · Roland Dreier

ERROR: ia64_monarch_init_handler: 186 slots, total region length = 0 1 error detected in 9381 functions.

Don't worry about it. Somebody should fix it at some point, but it's nothing you introduced.

Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
#2 lore raw
In reply to Roland Dreier
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Roland Dreier

Roland> I can see the ERROR: comes from unwcheck.pl but I have no Roland> idea what it is checking (something to do with unwind info?) Roland> let alone how to fix the problem.

Roland> Is this benign or is there something to be fixed?

Both: it needs to be fixed, but it's (mostly) benign since the only time we're executing that code is when the unwinder can't run anyhow, since we're in the middle of delivering an MCA. That may (and probably will) change in the future, so it's something that should be fixed.

I was hoping someone who knows and could test the MCA code better would fix it but that hasn't happened yet, so it's time for plan B.

Tony, below is a patch that fixes the unwind info enough that the warning/error goes away. The unwind-info may not be 100% correct though. Someone who can test/exercise this code may want to check on that.

	--david

=== arch/ia64/kernel/mca_asm.S 1.14 vs edited ==--- 1.14/arch/ia64/kernel/mca_asm.S 2003-12-23 08:52:44 -08:00
+++ edited/arch/ia64/kernel/mca_asm.S 2004-10-26 01:29:47 -07:00
@@ -868,7 +868,7 @@

GLOBAL_ENTRY(ia64_monarch_init_handler)
-
+ .prologue
// stash the information the SAL passed to os SAL_TO_OS_MCA_HANDOFF_STATE_SAVE(r2) ;;
@@ -907,6 +907,7 @@
adds out0,sp // out0 = pointer to pt_regs
;;
DO_SAVE_SWITCH_STACK
+ .body
adds out1,sp // out0 = pointer to switch_stack

br.call.sptk.many rp=ia64_init_handler

#3 lore raw
In reply to Roland Dreier
Quoted 4 lines

Tony, below is a patch that fixes the unwind info enough that the warning/error goes away. The unwind-info may not be 100% correct though. Someone who can test/exercise this code may want to check on that.

I tried the patch ... but the error message is still there intermittently. I saw it on the build for my zx2000 (zx1_defconfig with SMP=n), but not for the tiger (tiger_defconfig).

-Tony

#4 lore raw
In reply to Roland Dreier
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tony

Tony, below is a patch that fixes the unwind info enough that the warning/error goes away. The unwind-info may not be 100% correct though. Someone who can test/exercise this code may want to check on that.

Tony> I tried the patch ... but the error message is still there Tony> intermittently. I saw it on the build for my zx2000 Tony> (zx1_defconfig with SMP=n), but not for the tiger Tony> (tiger_defconfig).

Works fine here. Are you sure you're not seeing the effect of a not-quite-up-to-date toolchain?

	--david