From patchwork Fri May 11 23:57:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 135572 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1527096lji; Fri, 11 May 2018 17:01:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrn0H/BTl+5lDX3HKujKvCeq9wW3RcTMa0mr64lIrdsFdmH77NqEuGyaik7uXoLO2uC6Dvl X-Received: by 2002:a63:6f0f:: with SMTP id k15-v6mr878856pgc.91.1526083260557; Fri, 11 May 2018 17:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526083260; cv=none; d=google.com; s=arc-20160816; b=dYL0XDN4AlruszoHzY57Cixb7AT3mZqPh+MFQlHgUGzRuf18Dvchy3TdVl71Q/6mAE Nz4UM0qa1tSH8x6ssp6k1vFTvYd14RZd7a/9IM1U7mADpZikFZqa+LpWm9hm7jjRqMfd VlEIh1hgd7puYC8VMpLkcMh2tRBvh9nsX4061ZzGTFqO7fIAkczEXPjsiNWrCxKn5y6d 6if18GrpMSzGzVi6utPNrF7UVKOpwSQXt6WqKLnQqrjxixnaSQenh1iKghP+1ceEdR0C /LXwNoNtTFuHwjuie2z9l4hsojRXsJmqZY3b7M0XOMOKmyz1F+vtracH/A/bRWd6XN1B 8ecQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=KI88hQ+QtJXnQyQQNDXeocUR3hLl7Wk3Kxs0n5iJEF4=; b=Ne15EMSRwyH74wAsbI82WkcAfziL+gUg37/zS0/JCBTeeSiBLsF4XMmHgoNspC/bv5 YtjtFejYIRU3CAQytohzVB1xQFgt0f0MkErAGYoXeeXOone0m0jZx3AqFOrwtBAd5ByK Ercw1ql2rCM1gXqFDhoCaat+FPm5HfOcGcVR3jURhoBZEosmPeyZQEsy8vug1rZzAuwv I1lyrU2cQFByBONVs6xAYzrFis6ybGrBQaK0s57G3Kzh9kbcnvP08SLQRkWcmbJBQdv3 Uk8t+KpI41rb8swL5kpv74cL7OpQDYChI051+2eDffA2N+0UjGBUSGMaski3T2G2kC1O MH2A== 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 h3-v6si4298005plt.109.2018.05.11.17.01.00; Fri, 11 May 2018 17:01:00 -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 S1752155AbeELAA6 (ORCPT + 29 others); Fri, 11 May 2018 20:00:58 -0400 Received: from foss.arm.com ([217.140.101.70]:50282 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbeEKX7F (ORCPT ); Fri, 11 May 2018 19:59:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8B74E169F; Fri, 11 May 2018 16:59:05 -0700 (PDT) Received: from beelzebub.austin.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7995D3F53D; Fri, 11 May 2018 16:59:04 -0700 (PDT) From: Jeremy Linton To: linux-acpi@vger.kernel.org Cc: Sudeep.Holla@arm.com, linux-arm-kernel@lists.infradead.org, Lorenzo.Pieralisi@arm.com, hanjun.guo@linaro.org, rjw@rjwysocki.net, Will.Deacon@arm.com, Catalin.Marinas@arm.com, gregkh@linuxfoundation.org, Mark.Rutland@arm.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, wangxiongfeng2@huawei.com, vkilari@codeaurora.org, ahs3@redhat.com, Dietmar.Eggemann@arm.com, Morten.Rasmussen@arm.com, palmer@sifive.com, lenb@kernel.org, john.garry@huawei.com, austinwc@codeaurora.org, tnowicki@caviumnetworks.com, jhugo@codeaurora.org, ard.biesheuvel@linaro.org, Jeremy Linton Subject: [PATCH v9 04/12] arm64/acpi: Create arch specific cpu to acpi id helper Date: Fri, 11 May 2018 18:57:59 -0500 Message-Id: <20180511235807.30834-5-jeremy.linton@arm.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180511235807.30834-1-jeremy.linton@arm.com> References: <20180511235807.30834-1-jeremy.linton@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Its helpful to be able to lookup the acpi_processor_id associated with a logical cpu. Provide an arm64 helper to do this. Signed-off-by: Jeremy Linton Tested-by: Ard Biesheuvel Tested-by: Vijaya Kumar K Tested-by: Xiongfeng Wang Tested-by: Tomasz Nowicki Acked-by: Ard Biesheuvel --- arch/arm64/include/asm/acpi.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.13.6 diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 32f465a80e4e..0db62a4cbce2 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -86,6 +86,10 @@ static inline bool acpi_has_cpu_in_madt(void) } struct acpi_madt_generic_interrupt *acpi_cpu_get_madt_gicc(int cpu); +static inline u32 get_acpi_id_for_cpu(unsigned int cpu) +{ + return acpi_cpu_get_madt_gicc(cpu)->uid; +} static inline void arch_fix_phys_package_id(int num, u32 slot) { } void __init acpi_init_cpus(void);