Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934934AbcJHFXN (ORCPT ); Sat, 8 Oct 2016 01:23:13 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:53522 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S934857AbcJHFXE (ORCPT ); Sat, 8 Oct 2016 01:23:04 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="11726896" Subject: Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping To: Thomas Gleixner References: <1472114120-3281-4-git-send-email-douly.fnst@cn.fujitsu.com> <4608f474-c49e-550b-90e2-c5f4c25e00f5@cn.fujitsu.com> CC: Yinghai Lu , Linux Kernel Mailing List , Ingo Molnar , "H. Peter Anvin" , "linux-tip-commits@vger.kernel.org" , Tony Luck , "Rafael J. Wysocki" , "lenb@kernel.org" , "Zheng, Lv" , , From: Dou Liyang Message-ID: <8c52c038-3c7d-748f-d4d0-fa021f6530dc@cn.fujitsu.com> Date: Sat, 8 Oct 2016 13:22:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 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: 28F2642BC52E.AD7E6 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: 927 Lines: 38 Hi tglx, At 10/07/2016 09:00 PM, Thomas Gleixner wrote: > On Fri, 7 Oct 2016, Thomas Gleixner wrote: >> On Fri, 7 Oct 2016, Dou Liyang wrote: >>> Is it possible that the "-1/oxffffffff" could appear in the MADT which is one >>> of the ACPI tables? >> >> According to the SDM the x2apic id is a 32bit ID, so 0xffffffff is a >> legitimate value. Yes, I see. > > The ACPI spec says that bit 0 of the x2apic flags field tells whether the > logical processor is present or not. So the proper check for x2apic is that > flag. > > The lapic structure has the same flag, but the kernel ignores the flags for > both lapic and x2apic. It seems the kernel uses the flags in this sentence: enabled = processor->lapic_flags & ACPI_MADT_ENABLED; > > I'm going to apply the minimal fix of checking for id == 0xff in > acpi_lapic_parse() for now, but this needs to be revisited and fixed > proper. Yes, I will do it. Thanks Dou.