Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752074AbdGBRzC (ORCPT ); Sun, 2 Jul 2017 13:55:02 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:40246 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777AbdGBRzB (ORCPT ); Sun, 2 Jul 2017 13:55:01 -0400 Date: Sun, 2 Jul 2017 19:54:51 +0200 (CEST) From: Thomas Gleixner To: Dou Liyang cc: x86@kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, mingo@kernel.org, hpa@zytor.com, ebiederm@xmission.com, bhe@redhat.com, boris.ostrovsky@oracle.com, peterz@infradead.org, izumi.taku@jp.fujitsu.com Subject: Re: [PATCH v5 04/12] x86/apic: Move logical APIC ID away from apic_bsp_setup() In-Reply-To: <5c6ad9d0779fa59825731d58de37a6786f991d83.1498795030.git.douly.fnst@cn.fujitsu.com> Message-ID: References: <5c6ad9d0779fa59825731d58de37a6786f991d83.1498795030.git.douly.fnst@cn.fujitsu.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 731 Lines: 29 On Fri, 30 Jun 2017, Dou Liyang wrote: > /* > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c > index 93f0cda..d6721f0 100644 > --- a/arch/x86/kernel/smpboot.c > +++ b/arch/x86/kernel/smpboot.c > @@ -1347,8 +1347,11 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) > } > > default_setup_apic_routing(); > - cpu0_logical_apicid = apic_bsp_setup(false); > - > + apic_bsp_setup(false); > + if (x2apic_mode) > + cpu0_logical_apicid = apic_read(APIC_LDR); > + else > + cpu0_logical_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR)); Can you please move that into a seperate helper function? > /* Setup local timer */ > x86_init.timers.setup_percpu_clockev(); > > -- > 2.5.5 > > > >