This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] powerpc: Use generic memset for RTLD for ppc32/64


Hi,

The usual cache line size for the POWER server processors is 128 bytes.
PPCA2 has a different size, and thus we can't use our current generic
memset code (powerpc/powerpc[32|64]/memset.S) as a base for RTLD's
memset since it assumes cache-line size to be 128 bytes.

This patch forces RTLD to use a generic memset code for PPC32/64. A
PPCA2-optimized memset (non-RTLD) should be available later.

Ok?

Luis


2010-09-27  Luis Machado  <luisgpm@br.ibm.com>

	* sysdeps/powerpc/powerpc32/rtld-memset.c: New file.
	* sysdeps/powerpc/powerpc64/rtld-memset.c: New file.

diff --git a/sysdeps/powerpc/powerpc32/rtld-memset.c b/sysdeps/powerpc/powerpc32/rtld-memset.c
new file mode 100644
index 0000000..f3ed8ad
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/rtld-memset.c
@@ -0,0 +1,4 @@
+/* PPCA2 has a different cache-line size than the usual 128 bytes.  To avoid
+   using code that assumes cache-line size to be 128 bytes (with dcbz
+   instructions) we use the generic code instead.  */
+#include <string/memset.c>
diff --git a/sysdeps/powerpc/powerpc64/rtld-memset.c b/sysdeps/powerpc/powerpc64/rtld-memset.c
new file mode 100644
index 0000000..f3ed8ad
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/rtld-memset.c
@@ -0,0 +1,4 @@
+/* PPCA2 has a different cache-line size than the usual 128 bytes.  To avoid
+   using code that assumes cache-line size to be 128 bytes (with dcbz
+   instructions) we use the generic code instead.  */
+#include <string/memset.c>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]