Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755216AbcKJKv0 (ORCPT ); Thu, 10 Nov 2016 05:51:26 -0500 Received: from mx0a-000f0801.pphosted.com ([67.231.144.122]:42055 "EHLO mx0a-000f0801.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771AbcKJKvX (ORCPT ); Thu, 10 Nov 2016 05:51:23 -0500 Subject: Re: [PATCH] x86/cpuid: Deal with broken firmware once more To: "M. Vefa Bicakci" , Thomas Gleixner , Sebastian Andrzej Siewior References: <20161102122557.qs4rl6mb7n7l7j7p@linutronix.de> <24e69019-60d0-29e7-e31f-c6f00f9ed98a@brocade.com> <58e229e2-91f4-a97f-1b9f-089f48ef994a@brocade.com> <86609338-2b45-ed7e-fb07-99421e43a2f1@brocade.com> <49fe8cc5-0f0f-6cac-7a5c-803e81f5667d@runbox.com> CC: "x86@kernel.org" , LKML , Peter Zijlstra , Borislav Petkov From: "Charles (Chas) Williams" Message-ID: Date: Thu, 10 Nov 2016 05:50:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.3.0 MIME-Version: 1.0 In-Reply-To: <49fe8cc5-0f0f-6cac-7a5c-803e81f5667d@runbox.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: hq1wp-excas12.corp.brocade.com (10.70.38.22) To BRMWP-EXMB12.corp.brocade.com (172.16.59.130) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-10_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611100190 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1101 Lines: 22 On 11/09/2016 10:57 PM, M. Vefa Bicakci wrote: > [ 0.002000] mvb: CPU: Physical Processor ID: 0 > [ 0.002000] mvb: CPU: Processor Core ID: 0 > [ 0.002000] mvb: identify_cpu:1112: c: ffff880013b0a040, c->logical_proc_id: 65535 > [ 0.002000] mvb: __default_cpu_present_to_apicid:612: Returning 65535! mps_cpu: 1, nr_cpu_ids: 2, cpu_present(mps_cpu): 1 > [ 0.002000] smpboot: mvb: topology_update_package_map:270: cpu: 1, pkg: 4095 > [ 0.002000] smpboot: APIC(ffff) Converting physical 4095 to logical package 0 > [ 0.002000] smpboot: mvb: topology_update_package_map:305: cpu: 1, cpu_data(cpu).logical_proc_id: 0 This seems strange. 0xffff is BAD_APICID. Why didn't this fail here: for_each_present_cpu(cpu) { unsigned int apicid = apic->cpu_present_to_apicid(cpu); if (apicid == BAD_APICID || !apic->apic_id_valid(apicid)) <<<<<<<<<< continue; if (!topology_update_package_map(apicid, cpu)) continue; topology_update_package_map() should never have been called?