Received: by 10.192.165.148 with SMTP id m20csp1355321imm; Wed, 25 Apr 2018 17:31:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/dTjM1DT5OadwRCaWqCwGDZmYYi3mUTxeF3bX7Q+yCow4ZHjnuijM2m82KXtbeN7TZZzT3 X-Received: by 10.99.169.1 with SMTP id u1mr26184399pge.251.1524702688209; Wed, 25 Apr 2018 17:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524702688; cv=none; d=google.com; s=arc-20160816; b=gaJ542oV34gtQdQk2g5/2FGFhmVTZlQUJdm9nxjaPMDFwGXxwh0YfY3lmNPDK/zCkh NRUVNmT2Kni90NeB9NXZBIoKGYnQhYO000Ng6JwoZF0lXC/YJJNrR3Kx/wg8Q98HYGfC KrTX8vGr9JGFH7Pl/MH5ZZiADisgdpnhH1STX5HHx4qDsygeHEQ8gqWF1jWJI7oFPYeT HOsEcSNGXyG3l/yrAcJqTsaKzGwfniFP/dgSWBiRbRDDE784S4FOpY5VHOEOHL/o4hVx UynaESoOqqtX/TeCRGlzVAKAIUczaINQzIQVGU9iz4vCoX5NPxaKs4jv+kJ9QKYbARtg l0dQ== 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 u2si2085180pgb.321.2018.04.25.17.31.13; Wed, 25 Apr 2018 17:31:28 -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 S1753769AbeDZA2f (ORCPT + 99 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(+) 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); -- 2.13.6