]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Add user CPU features for POWER4, POWER5, POWER5+ and Cell.
authorPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 03:29:18 +0000 (14:29 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 03:29:18 +0000 (14:29 +1100)
This is at the request of the glibc folks, who want to use these bits
to select libraries optimized for the microarchitecture and new
instructions in these processors.

Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/cputable.c
include/asm-powerpc/cputable.h

index cc4e9eb1c13f98041ca53467659c0f3b024cee28..1d85cedbbb7b740d4ed9d14db828e469f2942244 100644 (file)
@@ -52,6 +52,9 @@ extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
 #define COMMON_USER            (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
                                 PPC_FEATURE_HAS_MMU)
 #define COMMON_USER_PPC64      (COMMON_USER | PPC_FEATURE_64)
+#define COMMON_USER_POWER4     (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
+#define COMMON_USER_POWER5     (COMMON_USER_PPC64 | PPC_FEATURE_POWER5)
+#define COMMON_USER_POWER5_PLUS        (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS)
 
 
 /* We only set the spe features if the kernel was compiled with
@@ -160,7 +163,7 @@ struct cpu_spec     cpu_specs[] = {
                .pvr_value              = 0x00350000,
                .cpu_name               = "POWER4 (gp)",
                .cpu_features           = CPU_FTRS_POWER4,
-               .cpu_user_features      = COMMON_USER_PPC64,
+               .cpu_user_features      = COMMON_USER_POWER4,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
@@ -175,7 +178,7 @@ struct cpu_spec     cpu_specs[] = {
                .pvr_value              = 0x00380000,
                .cpu_name               = "POWER4+ (gq)",
                .cpu_features           = CPU_FTRS_POWER4,
-               .cpu_user_features      = COMMON_USER_PPC64,
+               .cpu_user_features      = COMMON_USER_POWER4,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
@@ -190,7 +193,7 @@ struct cpu_spec     cpu_specs[] = {
                .pvr_value              = 0x00390000,
                .cpu_name               = "PPC970",
                .cpu_features           = CPU_FTRS_PPC970,
-               .cpu_user_features      = COMMON_USER_PPC64 |
+               .cpu_user_features      = COMMON_USER_POWER4 |
                        PPC_FEATURE_HAS_ALTIVEC_COMP,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
@@ -212,7 +215,7 @@ struct cpu_spec     cpu_specs[] = {
 #else
                .cpu_features           = CPU_FTRS_PPC970,
 #endif
-               .cpu_user_features      = COMMON_USER_PPC64 |
+               .cpu_user_features      = COMMON_USER_POWER4 |
                        PPC_FEATURE_HAS_ALTIVEC_COMP,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
@@ -230,7 +233,7 @@ struct cpu_spec     cpu_specs[] = {
                .pvr_value              = 0x00440000,
                .cpu_name               = "PPC970MP",
                .cpu_features           = CPU_FTRS_PPC970,
-               .cpu_user_features      = COMMON_USER_PPC64 |
+               .cpu_user_features      = COMMON_USER_POWER4 |
                        PPC_FEATURE_HAS_ALTIVEC_COMP,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
@@ -245,7 +248,7 @@ struct cpu_spec     cpu_specs[] = {
                .pvr_value              = 0x003a0000,
                .cpu_name               = "POWER5 (gr)",
                .cpu_features           = CPU_FTRS_POWER5,
-               .cpu_user_features      = COMMON_USER_PPC64,
+               .cpu_user_features      = COMMON_USER_POWER5,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
@@ -260,7 +263,7 @@ struct cpu_spec     cpu_specs[] = {
                .pvr_value              = 0x003b0000,
                .cpu_name               = "POWER5 (gs)",
                .cpu_features           = CPU_FTRS_POWER5,
-               .cpu_user_features      = COMMON_USER_PPC64,
+               .cpu_user_features      = COMMON_USER_POWER5_PLUS,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
@@ -276,7 +279,7 @@ struct cpu_spec     cpu_specs[] = {
                .cpu_name               = "Cell Broadband Engine",
                .cpu_features           = CPU_FTRS_CELL,
                .cpu_user_features      = COMMON_USER_PPC64 |
-                       PPC_FEATURE_HAS_ALTIVEC_COMP,
+                       PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .cpu_setup              = __setup_cpu_be,
index f89fd883e89291b4cd12cee1623b0144664db535..04e2726002cf2d3fadd1bff2cc653b003e80e550 100644 (file)
 #define PPC_FEATURE_HAS_EFP_SINGLE     0x00400000
 #define PPC_FEATURE_HAS_EFP_DOUBLE     0x00200000
 #define PPC_FEATURE_NO_TB              0x00100000
+#define PPC_FEATURE_POWER4             0x00080000
+#define PPC_FEATURE_POWER5             0x00040000
+#define PPC_FEATURE_POWER5_PLUS                0x00020000
+#define PPC_FEATURE_CELL               0x00010000
 
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__