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] linux/x86: don't initialize cpu_data[]'s apicid fiel

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: don't initialize cpu_data[]'s apicid field on generic code
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Wed, 13 May 2009 15:27:12 +0100
Delivery-date: Wed, 13 May 2009 07:27:38 -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
Afaict, this is not only redundant with the intialization done in
drivers/xen/core/smpboot.c, but actually results - at least for
secondary CPUs - in the Xen-specific value written to be later
overwritten with whatever the generic code determines (with no
guarantee that the two values are identical).

As usual, written and tested on 2.6.30-rc4 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- head-2009-05-04.orig/arch/i386/kernel/cpu/common-xen.c      2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/arch/i386/kernel/cpu/common-xen.c   2009-05-04 
11:04:43.000000000 +0200
@@ -301,11 +301,13 @@ void __cpuinit generic_identify(struct c
                        if (c->x86 >= 0x6)
                                c->x86_model += ((tfms >> 16) & 0xF) << 4;
                        c->x86_mask = tfms & 15;
+#ifndef CONFIG_XEN
 #ifdef CONFIG_X86_HT
                        c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0);
 #else
                        c->apicid = (ebx >> 24) & 0xFF;
 #endif
+#endif
                } else {
                        /* Have CPUID level 0 only - unheard of */
                        c->x86 = 4;
--- head-2009-05-04.orig/arch/x86_64/kernel/setup-xen.c 2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/arch/x86_64/kernel/setup-xen.c      2009-05-04 
11:04:43.000000000 +0200
@@ -1378,7 +1378,9 @@ void __cpuinit identify_cpu(struct cpuin
                        c->x86_capability[2] = cpuid_edx(0x80860001);
        }
 
+#ifndef CONFIG_XEN
        c->apicid = phys_pkg_id(0);
+#endif
 
        /*
         * Vendor-specific initialization.  In this section we




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86: don't initialize cpu_data[]'s apicid field on generic code, Jan Beulich <=