linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.0-testX fails to compile on my Athlon
@ 2001-01-01  0:42 Matt Wright
  2001-01-01 20:01 ` wish-kernel
  2001-01-02  8:51 ` [PATCH] " Tom Leete
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Wright @ 2001-01-01  0:42 UTC (permalink / raw)
  To: linux-kernel

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 :)

gcc version = 2.95.2
GNU Make version 3.79.1
GNU ld version 2.9.1 (with BFD 2.9.1.0.25)
fdformat from util-linux-2.10o
insmod version 2.3.21

I'd hope someone has an answer on how to fix this

Matt Wright


----------------------------------------------------------------------------
[root@dipsy linux]# make bzImage            
gcc -D__KERNEL__ -I/root/source/linux/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -malign-functions=4    -c -o
init/main.o init/main.c
In file included from /root/source/linux/include/linux/irq.h:57,
                 from /root/source/linux/include/asm/hardirq.h:6,
                 from /root/source/linux/include/linux/interrupt.h:45,
                 from /root/source/linux/include/asm/string.h:296,
                 from /root/source/linux/include/linux/string.h:21,
                 from /root/source/linux/include/linux/fs.h:23,
                 from /root/source/linux/include/linux/capability.h:17,
                 from /root/source/linux/include/linux/binfmts.h:5,
                 from /root/source/linux/include/linux/sched.h:9,
                 from /root/source/linux/include/linux/mm.h:4,
                 from /root/source/linux/include/linux/slab.h:14,
                 from /root/source/linux/include/linux/malloc.h:4,
                 from /root/source/linux/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/root/source/linux/include/asm/hw_irq.h: In function `x86_do_profile':
/root/source/linux/include/asm/hw_irq.h:198: `current' undeclared (first
use in this function)
/root/source/linux/include/asm/hw_irq.h:198: (Each undeclared identifier
is reported only once
/root/source/linux/include/asm/hw_irq.h:198: for each function it appears
in.)
In file included from /root/source/linux/include/asm/string.h:296,
                 from /root/source/linux/include/linux/string.h:21,
                 from /root/source/linux/include/linux/fs.h:23,
                 from /root/source/linux/include/linux/capability.h:17,
                 from /root/source/linux/include/linux/binfmts.h:5,
                 from /root/source/linux/include/linux/sched.h:9,
                 from /root/source/linux/include/linux/mm.h:4,
                 from /root/source/linux/include/linux/slab.h:14,
                 from /root/source/linux/include/linux/malloc.h:4,
                 from /root/source/linux/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/root/source/linux/include/linux/interrupt.h: In function `raise_softirq':
/root/source/linux/include/linux/interrupt.h:89: `current' undeclared
(first use in this function)
/root/source/linux/include/linux/interrupt.h: In function
`tasklet_schedule':
/root/source/linux/include/linux/interrupt.h:160: `current' undeclared
(first use in this function)
/root/source/linux/include/linux/interrupt.h: In function
`tasklet_hi_schedule':/root/source/linux/include/linux/interrupt.h:174: `current'
undeclared (first use in this function)
In file included from /root/source/linux/include/linux/string.h:21,
                 from /root/source/linux/include/linux/fs.h:23,
                 from /root/source/linux/include/linux/capability.h:17,
                 from /root/source/linux/include/linux/binfmts.h:5,
                 from /root/source/linux/include/linux/sched.h:9,
                 from /root/source/linux/include/linux/mm.h:4,
                 from /root/source/linux/include/linux/slab.h:14,
                 from /root/source/linux/include/linux/malloc.h:4,
                 from /root/source/linux/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/root/source/linux/include/asm/string.h: In function
`__constant_memcpy3d':
/root/source/linux/include/asm/string.h:305: `current' undeclared (first
use in this function)
/root/source/linux/include/asm/string.h: In function `__memcpy3d':
/root/source/linux/include/asm/string.h:312: `current' undeclared (first
use in this function)
make: *** [init/main.o] Error 1
[root@dipsy linux]# 


-
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.4.0-testX fails to compile on my Athlon
  2001-01-01  0:42 2.4.0-testX fails to compile on my Athlon Matt Wright
@ 2001-01-01 20:01 ` wish-kernel
  2001-01-01 22:44   ` Matt Wright
  2001-01-02  8:51 ` [PATCH] " Tom Leete
  1 sibling, 1 reply; 5+ messages in thread
From: wish-kernel @ 2001-01-01 20:01 UTC (permalink / raw)
  To: Matt Wright; +Cc: linux-kernel

> 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....
[snip]
> /root/source/linux/include/asm/string.h: In function `__memcpy3d':
> /root/source/linux/include/asm/string.h:312: `current' undeclared (first
> use in this function)
> make: *** [init/main.o] Error 1
> [root@dipsy linux]# 
Are you trying to compile for SMP as well?  I've seen similar
errors when selecting Athlon with SMP by mistake.

-
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.4.0-testX fails to compile on my Athlon
  2001-01-01 20:01 ` wish-kernel
@ 2001-01-01 22:44   ` Matt Wright
  0 siblings, 0 replies; 5+ messages in thread
From: Matt Wright @ 2001-01-01 22:44 UTC (permalink / raw)
  To: wish-kernel; +Cc: linux-kernel



On Mon, 1 Jan 2001 wish-kernel@dumain.com wrote:

> Are you trying to compile for SMP as well?  I've seen similar
> errors when selecting Athlon with SMP by mistake.

well.. silly me :)... I did have SMP enabled (it appears that's the
default option? but anyways...now I get a whole slew of other
errors.... which I'm not going to go into right now, cos that would
involve spamming everyone with about 4 pages of spam

Matt

-
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Re: 2.4.0-testX fails to compile on my Athlon
  2001-01-01  0:42 2.4.0-testX fails to compile on my Athlon Matt Wright
  2001-01-01 20:01 ` wish-kernel
@ 2001-01-02  8:51 ` Tom Leete
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Leete @ 2001-01-02  8:51 UTC (permalink / raw)
  To: Matt Wright; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]

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 :)
> 

Hello,

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.

Here is a patch I've posted here several times. It moves the mmx functions
from string.h to arch/i386/lib/mmx.c (lib.a).It does not __inline__ the call
for memcpy() of large or unknown length. Athlon supposedly does branch
prediction for function pointers, so that shouldn't hurt too much. The point
is to get it to build: optimize later.

The actual usefulness of this may be limited to development on UP machines.
I don't know whether the AMD-760 SMP boards will be compatable with Linux
SMP. Hearsay is that they will have significant architectural differences
with Intel flavored SMP boards.

Cheers,
Tom

Patch as attachment to avoid mailer brain damage. It has not been tested
lately, but still applies cleanish.

[-- Attachment #2: k7-smp.patch --]
[-- Type: text/plain, Size: 2151 bytes --]

--- linux/arch/i386/lib/mmx.c.orig	Wed Oct 27 21:30:39 1999
+++ linux/arch/i386/lib/mmx.c	Tue Jun  6 04:20:01 2000
@@ -1,6 +1,7 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/sched.h>
+#include <asm/hardirq.h>
 
 /*
  *	MMX 3DNow! library helper functions
@@ -88,6 +89,21 @@
 	stts();
 	return p;
 }
+
+void * __constant_mmx_memcpy3d(void * to, const void * from, size_t len)
+{
+	if(in_interrupt())
+		return __constant_memcpy(to, from, len);
+	return _mmx_memcpy(to, from, len);
+}
+
+void *__mmx_memcpy3d(void *to, const void *from, size_t len)
+{
+	if(in_interrupt())
+		return __memcpy(to, from, len);
+	return _mmx_memcpy(to, from, len);
+}
+
 
 static void fast_clear_page(void *page)
 {
--- linux/include/asm-i386/mmx.h.orig	Tue Jun  6 03:05:02 2000
+++ linux/include/asm-i386/mmx.h	Tue Jun  6 04:25:27 2000
@@ -10,5 +10,7 @@
 extern void *_mmx_memcpy(void *to, const void *from, size_t size);
 extern void mmx_clear_page(void *page);
 extern void mmx_copy_page(void *to, void *from);
+extern __inline__ void *__constant_mmx_memcpy3d(void * to, const void * from, size_t len);
+extern __inline__ void *__mmx_memcpy3d(void *to, const void *from, size_t len);
 
 #endif
--- linux/include/asm-i386/string.h.orig	Tue Jun  6 03:05:02 2000
+++ linux/include/asm-i386/string.h	Tue Jun  6 04:30:37 2000
@@ -287,13 +287,6 @@
 
 #ifdef CONFIG_X86_USE_3DNOW
 
-/* All this just for in_interrupt() ... */
-
-#include <asm/system.h>
-#include <asm/ptrace.h>
-#include <linux/smp.h>
-#include <linux/spinlock.h>
-#include <linux/interrupt.h>
 #include <asm/mmx.h>
 
 /*
@@ -302,16 +295,16 @@
 
 static inline void * __constant_memcpy3d(void * to, const void * from, size_t len)
 {
-	if(len<512 || in_interrupt())
+	if(len<512)
 		return __constant_memcpy(to, from, len);
-	return _mmx_memcpy(to, from, len);
+	return __constant_mmx_memcpy3d(to, from, len);
 }
 
 extern __inline__ void *__memcpy3d(void *to, const void *from, size_t len)
 {
-	if(len<512 || in_interrupt())
+	if(len<512)
 		return __memcpy(to, from, len);
-	return _mmx_memcpy(to, from, len);
+	return __mmx_memcpy3d(to, from, len);
 }
 
 #define memcpy(t, f, n) \

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 2.4.0-testX fails to compile on my Athlon
@ 2001-01-02  1:17 dmeyer
  0 siblings, 0 replies; 5+ messages in thread
From: dmeyer @ 2001-01-02  1:17 UTC (permalink / raw)
  To: linux-kernel

In article <Pine.LNX.4.21.0101011442440.1780-100000@po.teletubbies.dhs.org> you write:
> well.. silly me :)... I did have SMP enabled (it appears that's the
> default option? but anyways...now I get a whole slew of other
> errors.... which I'm not going to go into right now, cos that would
> involve spamming everyone with about 4 pages of spam

Did you do a "make mrproper" after changing to UP (be sure to save
your .config first, though)?  I've had trouble in the past where not
everything that needs to get regenerated does.

-- 
David M. Meyer
dmeyer@dmeyer.net
-
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-01-02  9:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-01  0:42 2.4.0-testX fails to compile on my Athlon Matt Wright
2001-01-01 20:01 ` wish-kernel
2001-01-01 22:44   ` Matt Wright
2001-01-02  8:51 ` [PATCH] " Tom Leete
2001-01-02  1:17 dmeyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).