Re: [PATCH] Re: 2.4.0-testX fails to compile on my Athlon

Petr Vandrovec (VANDROVE@vc.cvut.cz)
Tue, 2 Jan 2001 18:44:21 MET-1


On 2 Jan 01 at 3:51, Tom Leete wrote:
> Matt Wright wrote:
> >
> > 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....
> >
> > 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.h has no
> business using in_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
vandrove@vc.cvut.cz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/