Re: new asm-offsets.h patch problems

From: Sam Ravnborg
Date: Sun Sep 11 2005 - 16:34:28 EST


On Sun, Sep 11, 2005 at 01:39:07PM -0700, Luck, Tony wrote:
>
> >I'll try it. Hunk#2 of the change to Makefile didn't apply with
> >patch ... I had to apply it by hand.
>
> Either I goofed on the hand application of this patch, or it isn't
> working. Curious thing is that it works with some config files, but
> not with others. When I first reported this problem, all my builds
> had worked except for the sn2_defconfig one. With this patch applied
> I'm seeing bigsur_defconfig fail quite regularly.
>
> E.g. this sequence (starting from a clean tree):
>
> $ cp arch/ia64/configs/bigsur_defconfig .config
> $ yes '' | make oldconfig

You can just do:
make bigsur_defconfig

> $ make prepare
>
> leaves me with an include/asm-ia64/asm-offsets.h that only has the
> definition of IA64_TASK_SIZE at 0.

I could reproduce this as well.
Did you actually look at the output of the compile?

It looks like the more comprehensive dependency checking hits you now.
What happens is that the compilation of asm-offsets.c fails due to
consistency checks in a few places.

First we have in page.h:
#error Unsupported page size!
Because CONFIG_IA64_PAGE_SIZE_4KB (8KB, 16KB, 32KB) is not defined.

Then next we have in same file:
include/asm/page.h:162: error: `PAGE_SHIFT' undeclared
That's because CONFIG__HUGETLB_PAGE is set

etc etc.

The only real fix is to fix the dependencies or provide
enough defines in your hack.

I wonder why so many errors occurs with ia64 but not others.
Do you have a much different .h files layout?

To give you an indication that this is not mission impossible
I played a bit with the invloved .h files.

Following patch (cut'n'pasted) let bigsur + defconfig succeed
a make prepare.

diff --git a/arch/ia64/kernel/asm-offsets.c
b/arch/ia64/kernel/asm-offsets.c
--- a/arch/ia64/kernel/asm-offsets.c
+++ b/arch/ia64/kernel/asm-offsets.c
@@ -8,10 +8,6 @@

#include <linux/sched.h>

-#include <asm-ia64/processor.h>
-#include <asm-ia64/ptrace.h>
-#include <asm-ia64/siginfo.h>
-#include <asm-ia64/sigcontext.h>
#include <asm-ia64/mca.h>

#include "../kernel/sigframe.h"
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h
--- a/include/asm-ia64/mca.h
+++ b/include/asm-ia64/mca.h
@@ -15,12 +15,6 @@

#if !defined(__ASSEMBLY__)

-#include <linux/interrupt.h>
-#include <linux/types.h>
-
-#include <asm/param.h>
-#include <asm/sal.h>
-#include <asm/processor.h>
#include <asm/mca_asm.h>


And since the header files did compile in my case I would say that
most if not all of the includes are wrong.
A .h file shall be selfcontained, but not a convinient placeholder
for including a lot of .h files.

It still leaves of with the original offending IA64_TASK_SIZE,
but grep did no tell me where task_struct was defined??
So I could not try to give that one spin.

PS. the include of sigframe.h in asm-offsets.c is bad. Please do:
#include "sigframe.h"

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/