From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753788AbcHRKP4 (ORCPT ); Thu, 18 Aug 2016 06:15:56 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:41651 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753237AbcHRKPy (ORCPT ); Thu, 18 Aug 2016 06:15:54 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="10042127" From: "Wei, Jiangang" To: "mingo@kernel.org" CC: "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "hpa@zytor.com" , "mingo@redhat.com" , "x86@kernel.org" , "bp@suse.de" Subject: Re: [PATCH 1/2] x86/smpboot: Check APIC ID before setting up default routing Thread-Topic: [PATCH 1/2] x86/smpboot: Check APIC ID before setting up default routing Thread-Index: AQHR+FKpHpVPx4itC0u8OWD2k1VrfqBN9FAAgAAHuoA= Date: Thu, 18 Aug 2016 10:15:15 +0000 Message-ID: <1471515309.7011.12.camel@localhost> References: <1471416172-9463-1-git-send-email-weijg.fnst@cn.fujitsu.com> <20160818094730.GA1967@gmail.com> In-Reply-To: <20160818094730.GA1967@gmail.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.167.226.50] Content-Type: text/plain; charset="utf-8" Content-ID: <0CB5F362B1315F488C662C8107A5CAB7@fujitsu.local> MIME-Version: 1.0 X-yoursite-MailScanner-ID: EB73742BC500.A7643 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: weijg.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u7IAG0Q1022176 On Thu, 2016-08-18 at 11:47 +0200, Ingo Molnar wrote: > * Wei Jiangang wrote: > > > Check the boot APIC ID firstly, > > and then setup the default routing of APIC looks better. > > > > And move default_setup_apic_routing() close to apic_bsp_setup(), > > which staying in step with the codes in APIC_init_uniprocessor(). > > > > Signed-off-by: Wei Jiangang > > --- > > arch/x86/kernel/smpboot.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > If it's not a bug then please clearly note so in the changelog and > explain why the change results in better code. It's not a bug. The combination of default_setup_apic_routing() and apic_bsp_setup() is used to enable APIC mode. If the return of read_apic_id() is not equal to boot_cpu_physical_apicid, it means the APIC ID of current CPU‘s local APIC is unexpected and enable APIC mode maybe fail. so no need to set up the apic routing. That's why I want to move default_setup_apic_routing() behind checking the boot APIC ID. Sorry for obscure commit message. I will improve it in next version. > > If it's fixing a bug/misfeature then please fix the changelog to > conform to the standard changelog style: > > - first describe the symptoms of the bug - how does a user notice? > > - then describe how the code behaves today and how that is causing the bug > > - and then only describe how it's fixed. Thanks for your detailed explanation. I'll keep in my mind. > > Thanks, > > Ingo > >