Skip to contentSkip to conversation

X86: Remove c_identity of the struct cpu_dev

PATCH In review yili 1 participant 2 messages May 8, 2014 – May 9, 2014

lore
Share & tools
lore

yili

author
#0 lore raw

PATCH 1/1 X86: Remove c_identity of the struct cpu_dev

After commit 44e24f85674d (x86: don't call generic_identify() redundantly) the struct cpu_dev don't need the c_identity

---
 xen/arch/x86/cpu/common.c | 13 +------------
 xen/arch/x86/cpu/cpu.h    |  1 -
 2 files changed, 1 insertion(+), 13 deletions(-)
xen/arch/x86/cpu/common.c +1 -12
index 2c128e5..4122684 100644
@@ -270,23 +270,12 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 	generic_identify(c);
 
 #ifdef NOISY_CAPS
-	printk(KERN_DEBUG "CPU: After generic identify, caps:");
+	printk(KERN_DEBUG "CPU: After vendor identify, caps:");
 	for (i = 0; i < NCAPINTS; i++)
 		printk(" %08x", c->x86_capability[i]);
 	printk("\n");
 #endif
 
-	if (this_cpu->c_identify) {
-		this_cpu->c_identify(c);
-
-#ifdef NOISY_CAPS
-		printk(KERN_DEBUG "CPU: After vendor identify, caps:");
-		for (i = 0; i < NCAPINTS; i++)
-			printk(" %08x", c->x86_capability[i]);
-		printk("\n");
-#endif
-	}
-
 	/*
 	 * Vendor-specific initialization.  In this section we
 	 * canonicalize the feature flags, meaning if there are
xen/arch/x86/cpu/cpu.h +0 -1
index a7b7421..68563bb 100644
@@ -6,7 +6,6 @@ struct cpu_dev {
 	char	* c_ident[2];	
 
 	void		(*c_init)(struct cpuinfo_x86 * c);
-	void		(*c_identify)(struct cpuinfo_x86 * c);
 };
 
 extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
Signature · 1 line
1.7.12.4
author
#1 lore raw

After commit 5d1181a5ea5e (xen: Remove x86_32 build target.) , the
function "c_identify" of the struct cpu_dev is useless . It is redundantly.

Quoted 53 lines · yili

After commit 44e24f85674d (x86: don't call generic_identify() redundantly) the struct cpu_dev don't need the c_identity

---
 xen/arch/x86/cpu/common.c | 13 +------------
 xen/arch/x86/cpu/cpu.h    |  1 -
 2 files changed, 1 insertion(+), 13 deletions(-)
xen/arch/x86/cpu/common.c +1 -12
index 2c128e5..4122684 100644
@@ -270,23 +270,12 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
        generic_identify(c);
 
 #ifdef NOISY_CAPS
-       printk(KERN_DEBUG "CPU: After generic identify, caps:");
+       printk(KERN_DEBUG "CPU: After vendor identify, caps:");
        for (i = 0; i < NCAPINTS; i++)
                printk(" %08x", c->x86_capability[i]);
        printk("\n");
 #endif
 
-       if (this_cpu->c_identify) {
-               this_cpu->c_identify(c);
-
-#ifdef NOISY_CAPS
-               printk(KERN_DEBUG "CPU: After vendor identify, caps:");
-               for (i = 0; i < NCAPINTS; i++)
-                       printk(" %08x", c->x86_capability[i]);
-               printk("\n");
-#endif
-       }
-
        /*
         * Vendor-specific initialization.  In this section we
         * canonicalize the feature flags, meaning if there are
xen/arch/x86/cpu/cpu.h +0 -2
index a7b7421..68563bb 100644
@@ -6,7 +6,6 @@ struct cpu_dev {
        char    * c_ident[2];
 
        void            (*c_init)(struct cpuinfo_x86 * c);
-       void            (*c_identify)(struct cpuinfo_x86 * c);
 };
 
 extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
--

1.7.12.4