Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp270279imm; Tue, 22 May 2018 18:35:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZofvadCqA0mcZjTJCHIJHRbXg1+yBQpRb298VUnl2Oz5ablbg0KFJZI1ML2w+au5XYAZxkv X-Received: by 2002:a63:203:: with SMTP id 3-v6mr654358pgc.133.1527039321955; Tue, 22 May 2018 18:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527039321; cv=none; d=google.com; s=arc-20160816; b=oOtPTisFz+HraTzQRVEH2edWTjxWypIi6dh7lw4QHCsfn4OeEPs58FYA0KS6DT460/ OnQjuSwx+cUAsMjJCAjGXML9GKJRTiIAaugcXAd26rmt8eo3qhWsPPUX3DIZVrLfVrHw oL9wBRZ0dsSyef5LTcMWkMtwQZ+Xc2RGVjmNX6UGVmeQDyRoee0w5vAM7ps5Md/37iGa Rh70ZMz1uHItzuDi1upQOgnoXECLqyAIf1EEI3A30WYeQQpJmBLZIvqef0A5gI4gktGy 23JHl1Xgxr3Ddb592mAVJ4D/AXV3wITH+ZXhevEbsNpQ5xYnmaY3zXenCp7c7rt1G1Ed NDew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=GtUXENmVw7EF1aYwh86DrpK048Htn9u6lNdYLpSPTBs=; b=quYni5H0JYds59eUwHM/8UXOKXlUhF42gXed6u8ccA6Nd5MoGRHSnVEXBW6oeznOfu YVnZzhncw+zua1kgxGxD42jfcHBF+MV5Sl2w3F/IsvsAaLBX894PJfkr9yS3Shmm9TNA kMqRNGHGd4vLTU1Z9Guie6X1NSYSkgKV4x6hGhjbT/M9QlMhOI0QbmAthIrqvlCdHMit rMKntfVKvr9qFHQXB/Bnofa6QNvGbb3Y5ik3T5M0m1GbOxBnlCGPW7QK4+HopiVoBByQ ZrebPR4HkZkVt+v4W+NmbZJPmx4Ey2xCKVMfEzfUeaTB5kt1Pv7zYq/r2F/gZeHXy8Wl CStQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si11047122pgc.551.2018.05.22.18.34.52; Tue, 22 May 2018 18:35:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753616AbeEWBeZ (ORCPT + 99 others); Tue, 22 May 2018 21:34:25 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:51188 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753513AbeEWBeX (ORCPT ); Tue, 22 May 2018 21:34:23 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="40231300" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 23 May 2018 09:34:22 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id BB5034B40403; Wed, 23 May 2018 09:34:20 +0800 (CST) Received: from localhost.localdomain (10.167.226.106) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.399.0; Wed, 23 May 2018 09:34:20 +0800 Subject: Re: [PATCH 4/5] acpi/processor: Fix the return value of acpi_processor_ids_walk() To: Thomas Gleixner CC: LKML , , , , Ingo Molnar , Jonathan Corbet , "Rafael J. Wysocki" , Len Brown , "H. Peter Anvin" , Peter Zijlstra , "Rafael J. Wysocki" , "Rafael J. Wysocki" References: <20180320110432.28127-1-douly.fnst@cn.fujitsu.com> <20180320110432.28127-5-douly.fnst@cn.fujitsu.com> <7c33b3bd-7e9d-1583-737c-d2edd457bd1a@cn.fujitsu.com> From: Dou Liyang Message-ID: <425bceb1-a03c-06da-f39c-1299662fb6b0@cn.fujitsu.com> Date: Wed, 23 May 2018 09:34:18 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <7c33b3bd-7e9d-1583-737c-d2edd457bd1a@cn.fujitsu.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: BB5034B40403.A96C0 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At 05/22/2018 09:47 AM, Dou Liyang wrote: > > > At 05/19/2018 11:06 PM, Thomas Gleixner wrote: >> On Tue, 20 Mar 2018, Dou Liyang wrote: >> >>> ACPI driver should make sure all the processor IDs in their ACPI >>> Namespace >>> are unique for CPU hotplug. the driver performs a depth-first walk of >>> the >>> namespace tree and calls the acpi_processor_ids_walk(). >>> >>> But, the acpi_processor_ids_walk() will return true if one processor is >>> checked, that cause the walk break after walking pass the first >>> processor. >>> >>> Repace the value with AE_OK which is the standard acpi_status value. >>> >>> Fixes 8c8cb30f49b8 ("acpi/processor: Implement DEVICE operator for >>> processor enumeration") >>> >>> Signed-off-by: Dou Liyang >>> --- >>>   drivers/acpi/acpi_processor.c | 4 ++-- >>>   1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/acpi/acpi_processor.c >>> b/drivers/acpi/acpi_processor.c >>> index 449d86d39965..db5bdb59639c 100644 >>> --- a/drivers/acpi/acpi_processor.c >>> +++ b/drivers/acpi/acpi_processor.c >>> @@ -663,11 +663,11 @@ static acpi_status __init (acpi_handle handle, >>>       } >>>       processor_validated_ids_update(uid); >>> -    return true; >>> +    return AE_OK; >>>   err: >>>       acpi_handle_info(handle, "Invalid processor object\n"); >>> -    return false; >>> +    return AE_OK; >> >> I'm not sure whether this is the right return value here. Rafael? >> +Cc Rafael's common used email address. I am sorry, I created the cc list using ./script/get_maintainers.pl ... and didn't check it. Thanks, dou > Hi, Thomas, Rafael, > > Yes, I used AE_OK to make sure it can skip the invalid objects and > continue to do the following other objects, I'm also not sure. > > For this bug, recently, I sent another patch to remove this check code > away. > >    https://lkml.org/lkml/2018/5/17/320 > > IMO, the duplicate IDs can be avoid by the other code > >    if (invalid_logical_cpuid(pr->id) || !cpu_present(pr->id)) ---- 1) > > As the mapping of cpu_id(pr->id) and processor_id is fixed, when > hot-plugging a physical CPU, if its processor_id is duplicated with the > present, the above condition 1) will be 0, and Linux will do not add > this CPU. > > And, when every time the system starts, this code will be executed, it > will waste more time with the increase in the number of CPU. > > So I prefer to remove this code. > > Thanks, >     dou > > >