2.2.0 pre1 (Ack!)

Tom Rini tmrini at ntplx.net
Tue Dec 29 10:15:09 EST 1998


Hello,
  Well, Linus has gone and released 2.2.0-pre1.  And it of course, doesn't
compile on ppc due to some new changes (tho I think alpha, sparc, et all
are whacked now too).  I've attached a patch I wrote vs 2.1.33-pre5 which
seemed to fix it, tho I have no idea of how correct it is.  Could any of
the knowledgable (or even the slightly less knowledgable) comment on it?
(And if it works, send it along, along w/ some more bits and pieces (bmac
update and mace hopefully really soon)).

---
Tom Rini (TR1265)
http://dobbstown.yeti.edu/
-------------- next part --------------
--- include/asm-ppc/init.h	Fri May  8 03:18:23 1998
+++ include/asm-ppc/init.h	Mon Dec 28 11:17:23 1998
@@ -31,6 +31,9 @@
 #define __FINIT	.previous
 #define __INITDATA	.section	".data.init",#alloc,#write
 
+#define __cacheline_aligned __attribute__ \
+			((__section__ (".data.cacheline_aligned")))
+
 #else /* not egcs */
 
 #define __init
@@ -52,5 +55,7 @@
 #define __openfirmware
 #define __openfirmwaredata
 #define __openfirmwarefunc(x) x
+
+#define __cacheline_aligned
 #endif /* egcs */
 #endif
--- include/asm-ppc/timex.h	Mon Dec 28 11:09:51 1998
+++ include/asm-ppc/timex.h	Mon Dec 28 11:12:02 1998
@@ -12,4 +12,18 @@
 	(1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
 		<< (SHIFT_SCALE-SHIFT_HZ)) / HZ)
 
+typedef unsigned long long cycles_t;
+
+extern cycles_t cacheflush_time;
+
+static inline cycles_t get_cycles (void)
+{
+	cycles_t value;
+
+	__asm__("rdtsc"
+		:"=a" (*(((int *)&value)+0)),
+		 "=d" (*(((int *)&value)+1)));
+	return value;
+}
+
 #endif


More information about the Linuxppc-dev mailing list