Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756452AbcJGND1 (ORCPT ); Fri, 7 Oct 2016 09:03:27 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:44119 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756382AbcJGNDT (ORCPT ); Fri, 7 Oct 2016 09:03:19 -0400 Date: Fri, 7 Oct 2016 15:00:41 +0200 (CEST) From: Thomas Gleixner To: Dou Liyang 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" , robert.moore@intel.com, linux-acpi@vger.kernel.org Subject: Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping In-Reply-To: Message-ID: References: <1472114120-3281-4-git-send-email-douly.fnst@cn.fujitsu.com> <4608f474-c49e-550b-90e2-c5f4c25e00f5@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: 699 Lines: 22 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. 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. 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. Thanks, tglx