From patchwork Wed Apr 25 23:31:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 134396 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1534462lji; Wed, 25 Apr 2018 17:28:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZreHC4WDu9Imgv/HgfDaugaDkQK883rLbzVU7fOQObbvdOlNQUyNHz+sv44Rtg7uCTOOgiP X-Received: by 2002:a17:902:b60a:: with SMTP id b10-v6mr3520790pls.221.1524702519118; Wed, 25 Apr 2018 17:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524702519; cv=none; d=google.com; s=arc-20160816; b=UQrFyR1MueE9/Dflz0zdJAwSv9b+5C4EU5ZZEU39jde1veWw2dFgTzLqXjsV/Zsudx iDD+TWOp0pF4kXT/uGsYiQd9IxGuF9hg4d172VbEcLe9gT1BPT4UIo6sJ2NrlL68l7Dy +HRi8HuQCAoy+eIPrlFXdskw/08fHKxiNfZIv9Ak3MceQtZmi+ecC7dVYDgxRzZkfFZX 3GTchv1d5OYwrzcJqlfNaeiU8YWbmOSeswcZKUsxlTa/rMJXU/o23ffHdCxoSxCw0QIo 67JxzsyF3vzroZ1F6jUjJZtB+lZ53hnC3dfLLjU1Ny340c5RZc2jB0EwEZ/m3ygOQX6U woRw== 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=X8oIGhkK37WMHWcgEZvYNTfwfcW2tjL2fvwAWo6swsY=; b=BjnhhTWWzgYFKeu7mRxL4jictwADReGmrbEoz0pVndT/dbf5625dhVNYYvVBJ71EI4 8xh71NGhdorgxvxh1F2cH4Mg8AXn8geiSZkyfRZmYCX9IhVaNZvdKsei8JiYpNJwIzxq UzD2WyH5mRtCfYmbV8CbiqN7hYDB0SAD2nn6nYU511fADnZ9p265s6oPHRfvfbWd78tO BGNTCEw3Z4rs03t1fdOeMCASu0U9Ms6HFbwzZ8sro5ThiXc26UOMqxJYanOBDF70b5fO lQsrWe+SLTvHLaGGSS6aG7Mf1Ybw7UEWCAQ7ymK0iLKjmA24yZUu5SAXbofyh1nI08Zn Mo+Q== 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 s1-v6si16759555plr.458.2018.04.25.17.28.38; Wed, 25 Apr 2018 17:28:39 -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 S1753786AbeDZA2f (ORCPT + 29 others); Wed, 25 Apr 2018 20:28:35 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:45654 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbeDZA0N (ORCPT ); Wed, 25 Apr 2018 20:26:13 -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 22E76168F; Wed, 25 Apr 2018 17:26:13 -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 074443F590; Wed, 25 Apr 2018 17:26:11 -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@qti.qualcomm.com, timur@qti.qualcomm.com, ard.biesheuvel@linaro.org, Jeremy Linton Subject: [PATCH v8 04/13] arm64/acpi: Create arch specific cpu to acpi id helper Date: Wed, 25 Apr 2018 18:31:12 -0500 Message-Id: <20180425233121.13270-5-jeremy.linton@arm.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180425233121.13270-1-jeremy.linton@arm.com> References: <20180425233121.13270-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 --- 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);