From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754172AbbCaBuY (ORCPT ); Mon, 30 Mar 2015 21:50:24 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:54814 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754016AbbCaBuV (ORCPT ); Mon, 30 Mar 2015 21:50:21 -0400 Message-ID: <5519FD36.2080901@huawei.com> Date: Tue, 31 Mar 2015 09:49:42 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Catalin Marinas , Hanjun Guo CC: "Rafael J. Wysocki" , Mark Rutland , Lorenzo Pieralisi , "Robert Richter" , Arnd Bergmann , Ashwin Chaugule , , Marc Zyngier , Jon Masters , Timur Tabi , Mark Salter , Will Deacon , , Sudeep Holla , Olof Johansson , Mark Brown , Suravee Suthikulpanit , Grant Likely , Graeme Gregory , , Subject: Re: [patch v11 13/23] ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID References: <1427205776-5060-1-git-send-email-hanjun.guo@linaro.org> <1427205776-5060-14-git-send-email-hanjun.guo@linaro.org> <20150325172109.GJ14585@localhost> <551381CD.5010804@huawei.com> <55155DCA.3060006@linaro.org> <20150330135810.GC5964@e104818-lin.cambridge.arm.com> In-Reply-To: <20150330135810.GC5964@e104818-lin.cambridge.arm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.5519FD43.00C5,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9205f24c69d97fe34c5a9602216edefb Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/3/30 21:58, Catalin Marinas wrote: > On Fri, Mar 27, 2015 at 09:40:26PM +0800, Hanjun Guo wrote: >> On 2015年03月26日 11:49, Hanjun Guo wrote: >>> On 2015/3/26 1:21, Catalin Marinas wrote: >>>> On Tue, Mar 24, 2015 at 10:02:46PM +0800, Hanjun Guo wrote: >>>>> --- a/drivers/acpi/acpi_processor.c >>>>> +++ b/drivers/acpi/acpi_processor.c >>>>> @@ -170,7 +170,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr) >>>>> acpi_status status; >>>>> int ret; >>>>> >>>>> - if (pr->phys_id == -1) >>>>> + if (pr->phys_id == PHYS_CPUID_INVALID) >>>>> return -ENODEV; >>>> If PHYS_CPUID_INVALID is the same as INVALID_HWID, we should get rid of >>>> the latter in the arm64 code (as a subsequent clean-up patch). >>> OK, I'm preparing a patch set to introduce invalid_phys_cpuid() and invalid_logical_cpuid() >>> to remove the direct comparison of PHYS_CPUID_INVALID and -1 in ACPI processor drivers, >>> which is suggested by Rafael, I will cleanup PHYS_CPUID_INVALID in this patch set. >> I met difficulty to do so, because we use >> >> +#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, we need macro >> PHYS_CPUID_INVALID to identify if phys_cpuid_t is typedefed >> for different arch, so if we want remove PHYS_CPUID_INVALID >> for ARM64, we need to got back to typedef phys_cpuid_t for >> each arch using ACPI. which means that > What I meant was removing INVALID_HWID from arm64 and always use the > PHYS_CPUID_INVALID but I think we should leave them as they are for now > since PHYS_CPUID_INVALID is defined in the asm/acpi.h file. OK, thanks for the clarify. Hanjun