Re: optimised rw-semaphores for MIPS/MIPS64

David Howells (dhowells@redhat.com)
Wed, 11 Jul 2001 15:18:14 +0100


------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <2571.994861087.1@warthog.cambridge.redhat.com>

You'll also need the asm-mips*/compiler.h patch.

David

------- =_aaaaaaaaaa0
Content-Type: text/plain; name="compilerh.diff"; charset="us-ascii"
Content-ID: <2571.994861087.2@warthog.cambridge.redhat.com>
Content-Description: compiler smoothing header files patch

diff -uNr -x CVS -x TAGS linux-2.4-mips/include/asm-mips/compiler.h linux-mips-rwsem/include/asm-mips/compiler.h
--- linux-2.4-mips/include/asm-mips/compiler.h Thu Jan 1 01:00:00 1970
+++ linux-mips-rwsem/include/asm-mips/compiler.h Wed Jul 11 15:12:33 2001
@@ -0,0 +1,13 @@
+#ifndef __ASM_COMPILER_H
+#define __ASM_COMPILER_H
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+ a mechanism by which the user can annotate likely branch directions and
+ expect the blocks to be reordered appropriately. Define __builtin_expect
+ to nothing for earlier compilers. */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#endif /* __ASM_COMPILER_H */
diff -uNr -x CVS -x TAGS linux-2.4-mips/include/asm-mips64/compiler.h linux-mips-rwsem/include/asm-mips64/compiler.h
--- linux-2.4-mips/include/asm-mips64/compiler.h Thu Jan 1 01:00:00 1970
+++ linux-mips-rwsem/include/asm-mips64/compiler.h Wed Jul 11 15:12:05 2001
@@ -0,0 +1,13 @@
+#ifndef __ASM_COMPILER_H
+#define __ASM_COMPILER_H
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+ a mechanism by which the user can annotate likely branch directions and
+ expect the blocks to be reordered appropriately. Define __builtin_expect
+ to nothing for earlier compilers. */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#endif /* __ASM_COMPILER_H */

------- =_aaaaaaaaaa0--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/