WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix bug: unify cpu_dev attr as __cpuinitdata

To: Keir Fraser <keir.xen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix bug: unify cpu_dev attr as __cpuinitdata
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Mon, 4 Jul 2011 11:39:37 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "Shan, Haitao" <haitao.shan@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Sun, 03 Jul 2011 20:40:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acw5+/+CRn/hPgVERPKU3ilzn7cwlg==
Thread-topic: [PATCH] Fix bug: unify cpu_dev attr as __cpuinitdata
Fix bug: unify cpu_dev attr as __cpuinitdata

Currently different x86 cpu define different attr for cpu_dev.
Some cpu define as __initdata, this would be risk under cpu hotplug.
This patch fix the bug, unify them as __cpuinitdata, as what AMD cpu define now.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>
               Shan, Haitao <haitao.shan@xxxxxxxxx>


diff -r c9a131669548 xen/arch/x86/cpu/centaur.c
--- a/xen/arch/x86/cpu/centaur.c        Sat Jul 02 03:13:41 2011 +0800
+++ b/xen/arch/x86/cpu/centaur.c        Mon Jul 04 11:18:40 2011 +0800
@@ -85,7 +85,7 @@ static unsigned int centaur_size_cache(s
        return size;
 }
 
-static struct cpu_dev centaur_cpu_dev __initdata = {
+static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
        .c_vendor       = "Centaur",
        .c_ident        = { "CentaurHauls" },
        .c_init         = init_centaur,
diff -r c9a131669548 xen/arch/x86/cpu/cyrix.c
--- a/xen/arch/x86/cpu/cyrix.c  Sat Jul 02 03:13:41 2011 +0800
+++ b/xen/arch/x86/cpu/cyrix.c  Mon Jul 04 11:18:40 2011 +0800
@@ -284,7 +284,7 @@ static inline int test_cyrix_52div(void)
        return (unsigned char) (test >> 8) == 0x02;
 }
 
-static struct cpu_dev cyrix_cpu_dev __initdata = {
+static struct cpu_dev cyrix_cpu_dev __cpuinitdata = {
        .c_vendor       = "Cyrix",
        .c_ident        = { "CyrixInstead" },
        .c_init         = init_cyrix,
@@ -299,7 +299,7 @@ int __init cyrix_init_cpu(void)
 
 //early_arch_initcall(cyrix_init_cpu);
 
-static struct cpu_dev nsc_cpu_dev __initdata = {
+static struct cpu_dev nsc_cpu_dev __cpuinitdata = {
        .c_vendor       = "NSC",
        .c_ident        = { "Geode by NSC" },
        .c_init         = init_cyrix,
diff -r c9a131669548 xen/arch/x86/cpu/intel.c
--- a/xen/arch/x86/cpu/intel.c  Sat Jul 02 03:13:41 2011 +0800
+++ b/xen/arch/x86/cpu/intel.c  Mon Jul 04 11:18:40 2011 +0800
@@ -271,7 +271,7 @@ static unsigned int intel_size_cache(str
        return size;
 }
 
-static struct cpu_dev intel_cpu_dev __devinitdata = {
+static struct cpu_dev intel_cpu_dev __cpuinitdata = {
        .c_vendor       = "Intel",
        .c_ident        = { "GenuineIntel" },
        .c_models = {
diff -r c9a131669548 xen/arch/x86/cpu/transmeta.c
--- a/xen/arch/x86/cpu/transmeta.c      Sat Jul 02 03:13:41 2011 +0800
+++ b/xen/arch/x86/cpu/transmeta.c      Mon Jul 04 11:18:40 2011 +0800
@@ -92,7 +92,7 @@ static void transmeta_identify(struct cp
        }
 }
 
-static struct cpu_dev transmeta_cpu_dev __initdata = {
+static struct cpu_dev transmeta_cpu_dev __cpuinitdata = {
        .c_vendor       = "Transmeta",
        .c_ident        = { "GenuineTMx86", "TransmetaCPU" },
        .c_init         = init_transmeta,

Attachment: cpu_init_fix.patch
Description: cpu_init_fix.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix bug: unify cpu_dev attr as __cpuinitdata, Liu, Jinsong <=