2.4.0-testX fails to compile on my Athlon
Quoted 8 lines · Tom Leete
Quoted 7 lines · Matt Wright
I've looked for answers to this question before, but all I could find was someone asking a similar question and no replies...
I'm having great trouble getting 2.4.0-testX to compile on my system when I select Athlon/K7 as the Processor Family....
Quoted 6 lines
Quoted 2 lines
I've attached below the error's I'm getting.... the kernel DOES compile if I select anything else... but I don't have anything else :)
The problem with SMP+K7 builds is that
include/asm-i386/string.hhas no business usingin_interrupt(). That introduces circular dependencies which nobody has been able to rearrange away.
I solved it by porting check_asm code from arch/sparc into i386 (I had to learn check_asm about 'union'), and then replacing smp_processor_id() define in smp.h with
#include <asm/asm_offsets.h>
#include <asm/current.h>
#define smp_processor_id() (*(int*)(((unsigned char*)current)+AOFF_task_processor))
So now I still have real spinlocks (so I can debug some problems with nested console_lock), but inline memcpy...
Unfortunately, real diff is at home... And it has one bad side effect, that you must rerun 'make dep' manually if you modify task_struct in linux/sched.h, as asm/asm_offsets.h -> linux/sched.h dependancy is not handled by makefiles. But I do not do this modification very often, fortunately... Maybe if I placed check_asm somewhere else than where sparc tree has it...
For 2.4.0, probably disabling 3DNow in kernel when using SMP is best solution, as AFAIK nobody tested correctness of 3DNow code on SMP... Or is it obviously correct?
Best regards,
Petr Vandrovec [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines
For 2.4.0, probably disabling 3DNow in kernel when using SMP is best solution, as AFAIK nobody tested correctness of 3DNow code on SMP... Or is it obviously correct?
Its obviously correct. At least if it doesnt work the MMX/XMM code for raid should also fail horribly ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · Petr Vandrovec
Unfortunately, real diff is at home... And it has one bad side effect, that you must rerun 'make dep' manually if you modify
task_structinlinux/sched.h, asasm/asm_offsets.h->linux/sched.hdependancy is not handled by makefiles. But I do not do this modification very often, fortunately... Maybe if I placedcheck_asmsomewhere else than where sparc tree has it...
So diff is not at home anymore... Maybe it should be polished more, as #ifdef CHECK_ASM in smp.h is not nice (probably generating dummy asm_offsets.h for check_asm pass), but after I looked at code generated by this patch and by Tim's patch, I think that Tim's approach with moving in_interrupt() testing out-of-line from asm/string.h is better.
Best regards,
Petr Vandrovec [email protected]
arch/i386/Makefile +4 -1
@@ -139,5 +139,8 @@ archmrproper: -archdep: +archdep: check_asm @$(MAKEBOOT) dep + +check_asm: + $(MAKE) -C arch/i386/kernel check_asm
arch/i386/kernel/Makefile +92 -0
103 lines not on this page · raw message
arch/i386/kernel/check_asm.sh +20 -0
@@ -0,0 +1,20 @@ +#!/bin/sh +case $1 in + -printf) + sed -n -e '/struct[ ]*'$2'_struct[ ]*{/,/};/p' < $3 | sed '/struct[ ]*'$2'_struct[ ]*{/d;/:[0-9]*[ ]*;/d;/^[ ]*$/d;/};/d;s/^[ ]*//;s/volatile[ ]*//;s/\(unsigned\|signed\|struct\|union\)[ ]*//;s/\(\[\|__attribute__\).*;[ ]*$//;s/(\*//;s/)(.*)//;s/;[ ]*$//;s/^[^ ]*[ ]*//;s/,/\ +/g' | sed 's/^[ *]*//;s/[ ]*$//;s/^.*$/printf ("#define AOFF_'$2'_\0 0x%08x\\n", check_asm_data[i++]); printf("#define ASIZ_'$2'_\0 0x%08x\\n", check_asm_data[i++]);/' >> $4 + echo "printf (\"#define ASIZ_$2\\t0x%08x\\n\", check_asm_data[i++]);" >> $4 + ;; + -data) + sed -n -e '/struct[ ]*'$2'_struct[ ]*{/,/};/p' < $3 | sed '/struct[ ]*'$2'_struct[ ]*{/d;/:[0-9]*[ ]*;/d;/^[ ]*$/d;/};/d;s/^[ ]*//;s/volatile[ ]*//;s/\(unsigned\|signed\|struct\|union\)[ ]*//;s/\(\[\|__attribute__\).*;[ ]*$//;s/(\*//;s/)(.*)//;s/;[ ]*$//;s/^[^ ]*[ ]*//;s/,/\ +/g' | sed 's/^[ *]*//;s/[ ]*$//;s/^.*$/ ((char *)\&((struct '$2'_struct *)0)->\0) - ((char *)((struct '$2'_struct *)0)), sizeof(((struct '$2'_struct *)0)->\0),/' >> $4 + echo " sizeof(struct $2_struct)," >> $4 + ;; + -ints) + sed -n -e '/check_asm_data:/,/\.size/p' <$2 | sed -e 's/check_asm_data://' -e 's/\.size.*//' -e 's/\.long[ ]\([0-9]*\)/\1,/' >>$3 + ;; + *) + exit 1 + ;; +esac +exit 0
include/asm-i386/smp.h +12 -1
@@ -25,6 +25,9 @@#ifdef CONFIG_SMP #ifndef ASSEMBLY +#include <asm/current.h> +#include <asm/asm_offsets.h> +/* * Private routines/data */
@@ -75,7 +78,15 @@* so this is correct in the x86 case. */ -#define smp_processor_id () (current->processor) +/* +* During first check_asm pass no AOFF/ASIZ is defined. As no code is generated by +* check_asm pass, we can use just arbitrary value. Needed for 3DNow!(tm) copy. +*/ +#ifdef CHECK_ASM +#define smp_processor_id () 0 +#else +#define smp_processor_id () (*(int*)(((unsigned char*)current) + AOFF_task_processor)) +#endif extern __inlineint hard_smp_processor_id (void ) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/