From patchwork Tue Jun 5 13:55:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 10448391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C14D60284 for ; Tue, 5 Jun 2018 13:56:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C076294F4 for ; Tue, 5 Jun 2018 13:56:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FE54294F7; Tue, 5 Jun 2018 13:56:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F04A5294F4 for ; Tue, 5 Jun 2018 13:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752256AbeFENzv (ORCPT ); Tue, 5 Jun 2018 09:55:51 -0400 Received: from foss.arm.com ([217.140.101.70]:56196 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbeFENzt (ORCPT ); Tue, 5 Jun 2018 09:55:49 -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 13ACA15AD; Tue, 5 Jun 2018 06:55:49 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6D1A53F25D; Tue, 5 Jun 2018 06:55:47 -0700 (PDT) From: Sudeep Holla To: linux-acpi@vger.kernel.org, "Rafael J . Wysocki" , Catalin Marinas , Jeremy Linton Cc: Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hanjun Guo , Geert Uytterhoeven Subject: [PATCH 2/3] ACPI / PPTT: fix build when CONFIG_ACPI_PPTT is not enabled Date: Tue, 5 Jun 2018 14:55:37 +0100 Message-Id: <1528206938-2702-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528206938-2702-1-git-send-email-sudeep.holla@arm.com> References: <1528206938-2702-1-git-send-email-sudeep.holla@arm.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Though CONFIG_ACPI_PPTT is selected by platforms and nor user visible, it may be useful to support the build with CONFIG_ACPI_PPTT disabled. This patch adds the missing dummy/boiler plate implementation to fix the build. Cc: "Rafael J. Wysocki" Signed-off-by: Sudeep Holla --- include/linux/acpi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Hi Rafael, If you are fine with this, can you provide Ack, so that we route this through ARM64 tree where most of the ACPI PPTT support is present. Regards, Sudeep diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 8f2cdb0eca71..0fa28265d095 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1299,8 +1299,28 @@ static inline int lpit_read_residency_count_address(u64 *address) } #endif +#ifdef CONFIG_ACPI_PPTT int find_acpi_cpu_topology(unsigned int cpu, int level); int find_acpi_cpu_topology_package(unsigned int cpu); int find_acpi_cpu_cache_topology(unsigned int cpu, int level); +int acpi_find_last_cache_level(unsigned int cpu); +#else +static inline int find_acpi_cpu_topology(unsigned int cpu, int level) +{ + return -EINVAL; +} +static inline int find_acpi_cpu_topology_package(unsigned int cpu) +{ + return -EINVAL; +} +static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level) +{ + return -EINVAL; +} +static inline int acpi_find_last_cache_level(unsigned int cpu) +{ + return -EINVAL; +} +#endif #endif /*_LINUX_ACPI_H*/