Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752634AbdGHADV (ORCPT ); Fri, 7 Jul 2017 20:03:21 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:35934 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbdGHADT (ORCPT ); Fri, 7 Jul 2017 20:03:19 -0400 From: Derek Basehore To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , Rajneesh Bhardwaj , x86@kernel.org, platform-driver-x86@vger.kernel.org, "Rafael J . Wysocki" , Len Brown , linux-pm@vger.kernel.org, Derek Basehore Subject: [PATCH v5 1/5] x86: stub out pmc function Date: Fri, 7 Jul 2017 17:02:59 -0700 Message-Id: <20170708000303.21863-1-dbasehore@chromium.org> X-Mailer: git-send-email 2.13.2.725.g09c95d1e9-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 819 Lines: 26 This creates an inline function of intel_pmc_slp_s0_counter_read for !CONFIG_INTEL_PMC_CORE. Signed-off-by: Derek Basehore --- arch/x86/include/asm/pmc_core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/pmc_core.h b/arch/x86/include/asm/pmc_core.h index d4855f11136d..5d142d915f30 100644 --- a/arch/x86/include/asm/pmc_core.h +++ b/arch/x86/include/asm/pmc_core.h @@ -22,6 +22,10 @@ #define _ASM_PMC_CORE_H /* API to read SLP_S0_RESIDENCY counter */ -int intel_pmc_slp_s0_counter_read(u32 *data); +#ifdef CONFIG_INTEL_PMC_CORE +extern int intel_pmc_slp_s0_counter_read(u32 *data); +#else +static inline int intel_pmc_slp_s0_counter_read(u32 *data) { return -EPERM; } +#endif #endif /* _ASM_PMC_CORE_H */ -- 2.13.2.725.g09c95d1e9-goog