From patchwork Tue Jun 5 14:35:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 137755 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1039310lji; Tue, 5 Jun 2018 07:35:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLfKy4vs4FDcQ/pcQbDoFVGRXY69Fe0x0y19rxASth3bhagEFnyrX99B30PcCCUTk4Xio+n X-Received: by 2002:a17:902:b410:: with SMTP id x16-v6mr26835628plr.324.1528209320676; Tue, 05 Jun 2018 07:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528209320; cv=none; d=google.com; s=arc-20160816; b=vi2RmRT44jy1nYoL419gNHO61fX4P+b6YtO/2walqLebGtJi/8bmbGBqx98/k5rql/ hs+THvpMNc5M5mZCg603eTXD+Au36iq2dU/GZlGrBKZ/ZKpQZH7XnFnV8lRVySOsZEgy HrP71TSWKwA0Gsi4Y0U/PwLMuA9w6A+3zldd5sZby9ewFqwtzvjqnfs8kbhmm3QeHRfC TET5Fg0JQr7/pUcMLbd040KEk9QWqri2LA5EfYaUR9BkH/aVMjEx4oYjRUpAB7ajMHnA cQwJXsMEftAiiKnSRhGD82iNW70fiOVkkj+AubDuJL6F6w9ydj/D0SuhJN3aLQ6kU+HI dZSA== 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=Nkbw+ALaWZO5ScbySHpwGJyQp/X7u2g6rnJTnze18dk=; b=NpdO8gBgN/tAp5ucEU8XDoKVMOgSyGwXCh0oU5Ndq2jm9nIH3jK84dRxUEqYAX1OIe bZKyc8MkUbfH+b5CctsTKYo0Aj0X0HQKsRa4IWkT0JVnfrGRBfudrOzLD8oBXiHOsYrp +FKYgvnADZuPL1buXNZxcSKJMcjAVqAU7D90eEiP4dj3abb78rtWefNSYrhni+FsFIcU dCOU04xzdrUex0zjySt31Y7Td3YeKP9cFmMftwd35fwXW7mIp8TQzMN7u09f3z6btTE+ 34Lw9EibEjBQcGfMDdWCDk8Wyql1F1VRrO+QtKaK0dx74O36Lnat6D22hGXY4SzTqD0r qHaA== 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 p3-v6si26248155plr.131.2018.06.05.07.35.20; Tue, 05 Jun 2018 07:35:20 -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 S1752411AbeFEOfS (ORCPT + 30 others); Tue, 5 Jun 2018 10:35:18 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:56752 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958AbeFEOfO (ORCPT ); Tue, 5 Jun 2018 10:35:14 -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 BE98315AD; Tue, 5 Jun 2018 07:35:13 -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 00CC03F557; Tue, 5 Jun 2018 07:35:11 -0700 (PDT) From: Sudeep Holla To: linux-acpi@vger.kernel.org, "Rafael J . Wysocki" , Catalin Marinas , Jeremy Linton Cc: Sudeep Holla , Morten Rasmussen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hanjun Guo , Geert Uytterhoeven Subject: [PATCH v2 2/3] ACPI / PPTT: fix build when CONFIG_ACPI_PPTT is not enabled Date: Tue, 5 Jun 2018 15:35:03 +0100 Message-Id: <1528209304-3280-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528209304-3280-1-git-send-email-sudeep.holla@arm.com> References: <1528209304-3280-1-git-send-email-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 15 +++++++++++++++ include/linux/cacheinfo.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) 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 v1->v2: - removed duplicate definition for acpi_find_last_cache_level -- 2.7.4 diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 8f2cdb0eca71..4b35a66383f9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1299,8 +1299,23 @@ 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); +#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; +} +#endif #endif /*_LINUX_ACPI_H*/ diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h index 89397e30e269..70e19bc6cc9f 100644 --- a/include/linux/cacheinfo.h +++ b/include/linux/cacheinfo.h @@ -98,7 +98,7 @@ struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); int init_cache_level(unsigned int cpu); int populate_cache_leaves(unsigned int cpu); int cache_setup_acpi(unsigned int cpu); -#ifndef CONFIG_ACPI +#ifndef CONFIG_ACPI_PPTT /* * acpi_find_last_cache_level is only called on ACPI enabled * platforms using the PPTT for topology. This means that if