Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752224AbdGCCCz (ORCPT ); Sun, 2 Jul 2017 22:02:55 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:31807 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752142AbdGCCCx (ORCPT ); Sun, 2 Jul 2017 22:02:53 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="20759418" Subject: Re: [PATCH v5 04/12] x86/apic: Move logical APIC ID away from apic_bsp_setup() To: Thomas Gleixner References: <5c6ad9d0779fa59825731d58de37a6786f991d83.1498795030.git.douly.fnst@cn.fujitsu.com> CC: , , , , , , , , , From: Dou Liyang Message-ID: <2bacfc29-ab66-2749-ceca-f1377c5fed90@cn.fujitsu.com> Date: Mon, 3 Jul 2017 10:02:45 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: E091047E9887.AC1E7 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 44 Hi, Thomas At 07/03/2017 01:54 AM, Thomas Gleixner wrote: > 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? Yes, it will be a separate helper function in the next version. Thanks, dou. > >> /* Setup local timer */ >> x86_init.timers.setup_percpu_clockev(); >> >> -- >> 2.5.5 >> >> >> >> > > >