public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: libc-hacker@sources.redhat.com
Subject: [PATCH]: Recognize HWCAP_SPARC_BLKINIT
Date: Fri, 24 Feb 2006 23:37:00 -0000	[thread overview]
Message-ID: <20060224.153709.86558879.davem@davemloft.net> (raw)


SUN4V Niagara processors have a load-twin/block-init-store capability
which is indicated by bit 6 in the HWCAP_* mask from the kernel.

Add recognition of that value to glibc, and ask it to use "v9v"
in the library search path.

2006-02-24  David S. Miller  <davem@sunset.davemloft.net>

	* elf/elf.h: Add HWCAP_SPARC_BLKINIT.
	* sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: Add "v9v"
	entry to _dl_sparc32_cap_flags.
	* sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: Add
	HWCAP_SPARC_BLKINIT to HWCAP_IMPORTANT.
	* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Add "v9v"
	entry to _dl_sparc32_cap_flags.
	* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Add
	HWCAP_SPARC_BLKINIT to HWCAP_IMPORTANT.

--- ./elf/elf.h.~1~	2006-02-23 16:01:13.000000000 -0800
+++ ./elf/elf.h	2006-02-23 16:01:18.000000000 -0800
@@ -1258,6 +1258,7 @@ typedef struct
 #define HWCAP_SPARC_MULDIV	8
 #define HWCAP_SPARC_V9		16	/* The cpu is v9, so v8plus is ok.  */
 #define HWCAP_SPARC_ULTRA3	32
+#define HWCAP_SPARC_BLKINIT	64	/* Sun4v with block-init/load-twin. */
 
 /* MIPS R3000 specific definitions.  */
 
--- ./sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c.~1~	2006-02-23 16:01:14.000000000 -0800
+++ ./sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c	2006-02-23 16:01:18.000000000 -0800
@@ -47,11 +47,11 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_sparc32_cap_flags
 #else
-PROCINFO_CLASS const char _dl_sparc32_cap_flags[6][7]
+PROCINFO_CLASS const char _dl_sparc32_cap_flags[7][7]
 #endif
 #ifndef PROCINFO_DECL
 = {
-    "flush", "stbar", "swap", "muldiv", "v9", "ultra3"
+    "flush", "stbar", "swap", "muldiv", "v9", "ultra3", "v9v"
   }
 #endif
 #if !defined SHARED || defined PROCINFO_DECL
--- ./sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h.~1~	2006-02-23 16:01:14.000000000 -0800
+++ ./sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h	2006-02-23 16:01:18.000000000 -0800
@@ -62,7 +62,7 @@ _dl_string_hwcap (const char *str)
   return -1;
 };
 
-#define HWCAP_IMPORTANT (HWCAP_SPARC_V9|HWCAP_SPARC_ULTRA3)
+#define HWCAP_IMPORTANT (HWCAP_SPARC_V9|HWCAP_SPARC_ULTRA3|HWCAP_SPARC_BLKINIT)
 
 /* There are no different platforms defined.  */
 #define _dl_platform_string(idx) ""
--- ./sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c.~1~	2006-02-23 16:01:14.000000000 -0800
+++ ./sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c	2006-02-23 16:01:18.000000000 -0800
@@ -47,11 +47,11 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_sparc64_cap_flags
 #else
-PROCINFO_CLASS const char _dl_sparc64_cap_flags[6][7]
+PROCINFO_CLASS const char _dl_sparc64_cap_flags[7][7]
 #endif
 #ifndef PROCINFO_DECL
 = {
-    "flush", "stbar", "swap", "muldiv", "v9", "ultra3"
+    "flush", "stbar", "swap", "muldiv", "v9", "ultra3", "v9v"
   }
 #endif
 #if !defined SHARED || defined PROCINFO_DECL
--- ./sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h.~1~	2006-02-23 16:01:14.000000000 -0800
+++ ./sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h	2006-02-23 16:01:18.000000000 -0800
@@ -63,7 +63,7 @@ _dl_string_hwcap (const char *str)
   return -1;
 };
 
-#define HWCAP_IMPORTANT (HWCAP_SPARC_ULTRA3)
+#define HWCAP_IMPORTANT (HWCAP_SPARC_ULTRA3|HWCAP_SPARC_BLKINIT)
 
 /* There are no different platforms defined.  */
 #define _dl_platform_string(idx) ""

             reply	other threads:[~2006-02-24 23:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 23:37 David S. Miller [this message]
2006-02-25  1:49 ` Roland McGrath
2006-02-25  1:51   ` David S. Miller
2006-02-25  1:59 ` Roland McGrath
2006-02-25  1:59   ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060224.153709.86558879.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).