Commit 97532f598273d03cab8bb5206669b6fdd654eb63

Authored by David S. Miller
1 parent 3b3ab2eb9c

[SPARC64]: Add HWCAP_SPARC_BLKINIT elf capability flag for Niagara.

Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 17 additions and 5 deletions Side-by-side Diff

include/asm-sparc64/elf.h
... ... @@ -10,6 +10,7 @@
10 10 #ifdef __KERNEL__
11 11 #include <asm/processor.h>
12 12 #include <asm/uaccess.h>
  13 +#include <asm/spitfire.h>
13 14 #endif
14 15  
15 16 /*
... ... @@ -68,6 +69,7 @@
68 69 #define HWCAP_SPARC_MULDIV 8
69 70 #define HWCAP_SPARC_V9 16
70 71 #define HWCAP_SPARC_ULTRA3 32
  72 +#define HWCAP_SPARC_BLKINIT 64
71 73  
72 74 /*
73 75 * These are used to set parameters in the core dumps.
... ... @@ -145,11 +147,21 @@
145 147 instruction set this cpu supports. */
146 148  
147 149 /* On Ultra, we support all of the v8 capabilities. */
148   -#define ELF_HWCAP ((HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | \
149   - HWCAP_SPARC_SWAP | HWCAP_SPARC_MULDIV | \
150   - HWCAP_SPARC_V9) | \
151   - ((tlb_type == cheetah || tlb_type == cheetah_plus) ? \
152   - HWCAP_SPARC_ULTRA3 : 0))
  150 +static inline unsigned int sparc64_elf_hwcap(void)
  151 +{
  152 + unsigned int cap = (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR |
  153 + HWCAP_SPARC_SWAP | HWCAP_SPARC_MULDIV |
  154 + HWCAP_SPARC_V9);
  155 +
  156 + if (tlb_type == cheetah || tlb_type == cheetah_plus)
  157 + cap |= HWCAP_SPARC_ULTRA3;
  158 + else if (tlb_type == hypervisor)
  159 + cap |= HWCAP_SPARC_BLKINIT;
  160 +
  161 + return cap;
  162 +}
  163 +
  164 +#define ELF_HWCAP sparc64_elf_hwcap();
153 165  
154 166 /* This yields a string that ld.so will use to load implementation
155 167 specific libraries for optimization. This is more specific in