On 09 May 2002 14:42:15 -0700, Thomas Duffy <[EMAIL PROTECTED]> wrote: >I am working on getting the new kbuild 2.5 asm offsets working in the >2.5.14 sparc64 tree and running into one issue. > >in kernel/sched.c, a call to switch_task is called. this is #defined in >include/asm-sparc64/system.h with inline assembly that uses various >offsets. > >How can I make kbuild 2.5 take care of the build time substitution of >offsets in a header file?
I wish people would not do that. Using asm offsets in headers means that the offsets must be calculated before any header is used, the code must be defined as setup() and all code that includes system.h (everything?) must have flags -I$(KBUILD_OBJTREE)/arch/$(ARCH). It also means that any change to any offset will ripple through the entire kernel build instead of only affecting a few assembler objects. IA64 has the same bad design, with asm offsets polluting headers. See patch kbuild-2.5-ia64-2.5.10-020426-1, file arch/ia64/Makefile.in and the comment about recursive includes in arch/ia64/Makefile.defs.noconfig. The IA64 port suffers from an even nastier problem. To calculate the offsets, asm-offsets.c includes a couple of kernel headers. They indirectly include asm/thread_info.h which refers to IA64_TASK_SIZE which cannot be calculated until asm-offsets.c has been compiled. So you cannot calculate IA64_TASK_SIZE unless you already have a value for IA64_TASK_SIZE! The kbuild 2.5 patch to include/asm-ia64/thread_info.h has a test on KBUILD_SETUP to kludge around this recursive dependency. _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel