From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755887AbcIFVXy (ORCPT ); Tue, 6 Sep 2016 17:23:54 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:36129 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753186AbcIFVXw (ORCPT ); Tue, 6 Sep 2016 17:23:52 -0400 Date: Tue, 6 Sep 2016 14:23:49 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Dou Liyang cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: Re: [PATCH] x86: Put the num_processors++ code in a more suitable position In-Reply-To: <1473139887-27587-1-git-send-email-douly.fnst@cn.fujitsu.com> Message-ID: References: <1473139887-27587-1-git-send-email-douly.fnst@cn.fujitsu.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) 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 On Tue, 6 Sep 2016, Dou Liyang wrote: > This is a code optimization. > Not sure that it's optimization, it's just for correctness. > If checking the topology package map of apicid and cpu is failure, > it will stop generating the processor info for that apicid and the > disabled_cpus will plus one. However, the num-processors has already > been added one above. That may cause the number of processors incorrect. > > Just put the num_processors++ code in the more suitable position. > it makes sure that the num-processors will not conflict with the > disabled_cpus. > > Signed-off-by: Dou Liyang Acked-by: David Rientjes