From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752536AbbCZBDO (ORCPT ); Wed, 25 Mar 2015 21:03:14 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:59653 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752408AbbCZBDH convert rfc822-to-8bit (ORCPT ); Wed, 25 Mar 2015 21:03:07 -0400 Date: Wed, 25 Mar 2015 17:21:09 +0000 From: Catalin Marinas To: Hanjun Guo Cc: "Rafael J. Wysocki" , Will Deacon , Olof Johansson , Grant Likely , Mark Rutland , Ashwin Chaugule , Lorenzo Pieralisi , Robert Richter , Arnd Bergmann , Graeme Gregory , linaro-acpi@lists.linaro.org, Marc Zyngier , Jon Masters , Timur Tabi , Mark Salter , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Mark Brown , Suravee Suthikulpanit , Sudeep Holla , linux-arm-kernel@lists.infradead.org Subject: Re: [patch v11 13/23] ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID Message-ID: <20150325172109.GJ14585@localhost> References: <1427205776-5060-1-git-send-email-hanjun.guo@linaro.org> <1427205776-5060-14-git-send-email-hanjun.guo@linaro.org> MIME-Version: 1.0 In-Reply-To: <1427205776-5060-14-git-send-email-hanjun.guo@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginalArrivalTime: 26 Mar 2015 00:56:46.0435 (UTC) FILETIME=[BBD13B30:01D0675F] X-MC-Unique: hC5wdGArTcenWeaQZ71tOw-3 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 24, 2015 at 10:02:46PM +0800, Hanjun Guo wrote: > CPU hardware ID (phys_id) is defined as u32 in structure acpi_processor, > but phys_id is used as int in acpi processor driver, so it will lead to > some inconsistence for the drivers. > > Furthermore, to cater for ACPI arch ports that implement 64 bits CPU > ids a generic CPU physical id type is required. > > So introduce typedef u32 phys_cpuid_t in a common file, and introduce > a macro PHYS_CPUID_INVALID as (phys_cpuid_t)(-1) if it's not defined > by other archs, this will solve the inconsistence in acpi processor driver, > and will prepare for the ACPI on ARM64 for the 64 bit CPU hardware ID > in the following patch. > > CC: Rafael J Wysocki > Suggested-by: Lorenzo Pieralisi > Reviewed-by: Grant Likely > Acked-by: Sudeep Holla > Acked-by: Lorenzo Pieralisi > Acked-by: Rafael J. Wysocki > Signed-off-by: Catalin Marinas > [hj: reworked cpu physid map return codes] > Signed-off-by: Hanjun Guo BTW, am I still the author of this patch? If yes, it's missing a From: line. > --- 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). -- Catalin