Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758896AbbEFEMK (ORCPT ); Wed, 6 May 2015 00:12:10 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:34376 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752794AbbEFEMH (ORCPT ); Wed, 6 May 2015 00:12:07 -0400 Message-ID: <5549948B.7030504@linaro.org> Date: Wed, 06 May 2015 12:11:55 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Sudeep Holla CC: "Rafael J. Wysocki" , Will Deacon , Catalin Marinas , Boris Ostrovsky , Stefano Stabellini , Lorenzo Pieralisi , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" Subject: Re: [PATCH v2 7/7] ACPI / processor: Introduce invalid_phys_cpuid() References: <1430793998-21631-1-git-send-email-hanjun.guo@linaro.org> <1430793998-21631-8-git-send-email-hanjun.guo@linaro.org> <5548A8C5.1080406@arm.com> In-Reply-To: <5548A8C5.1080406@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1734 Lines: 57 On 2015年05月05日 19:25, Sudeep Holla wrote: > > > On 05/05/15 03:46, Hanjun Guo wrote: >> Introduce invalid_phys_cpuid() to identify cpu with invalid >> physical ID, then used it as replacement of the direct comparisons >> with PHYS_CPUID_INVALID. >> >> Signed-off-by: Hanjun Guo >> --- >> drivers/acpi/acpi_processor.c | 4 ++-- >> drivers/acpi/processor_core.c | 4 ++-- >> include/linux/acpi.h | 5 +++++ >> 3 files changed, 9 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/acpi/acpi_processor.c >> b/drivers/acpi/acpi_processor.c >> index 62c846b..92a5f73 100644 >> --- a/drivers/acpi/acpi_processor.c > > [...] > >> diff --git a/include/linux/acpi.h b/include/linux/acpi.h >> index 913b49f..cc82ff3 100644 >> --- a/include/linux/acpi.h >> +++ b/include/linux/acpi.h >> @@ -163,6 +163,11 @@ static inline bool invalid_logical_cpuid(u32 cpuid) >> return (int)cpuid < 0; >> } >> >> +static inline bool invalid_phys_cpuid(phys_cpuid_t phys_id) >> +{ >> + return (int)phys_id < 0; > > Should this be phys_id == PHYS_CPUID_INVALID ? else I don't see why we > need to even define PHYS_CPUID_INVALID Oh, we need PHYS_CPUID_INVALID because we defined +#ifndef PHYS_CPUID_INVALID +typedef u32 phys_cpuid_t; +#define PHYS_CPUID_INVALID (phys_cpuid_t)(-1) +#endif in the common head file linux/acpi.h, as it is needed for phys_cpuid_t for ARM64. this is already discussed here: https://lkml.org/lkml/2015/3/30/311 Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/