From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0209FC33C9E for ; Tue, 14 Jan 2020 19:49:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5D6824670 for ; Tue, 14 Jan 2020 19:49:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729093AbgANTto (ORCPT ); Tue, 14 Jan 2020 14:49:44 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:44720 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728913AbgANTtF (ORCPT ); Tue, 14 Jan 2020 14:49:05 -0500 Received: from localhost ([127.0.0.1] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1irSBT-0005Zo-Ps; Tue, 14 Jan 2020 20:49:03 +0100 Message-Id: <20200114185947.203089624@linutronix.de> User-Agent: quilt/0.65 Date: Tue, 14 Jan 2020 19:52:43 +0100 From: Thomas Gleixner To: LKML Cc: x86@kernel.org, John Stultz , Vincenzo Frascino , Andy Lutomirski , Christophe Leroy , Paolo Bonzini , Boris Ostrovsky , Juergen Gross , Haiyang Zhang , Sasha Levin , Ralf Baechle , Paul Burton , James Hogan , Russell King , Catalin Marinas , Will Deacon , Mark Rutland , Marc Zyngier Subject: [patch 06/15] MIPS: vdso: Compile high resolution parts conditionally References: <20200114185237.273005683@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If neither the R4K nor the GIC timer is enabled in the kernel configuration then let the core VDSO code drop the high resolution parts at compile time. Signed-off-by: Thomas Gleixner --- arch/mips/include/asm/vdso/gettimeofday.h | 7 +++++++ 1 file changed, 7 insertions(+) --- a/arch/mips/include/asm/vdso/gettimeofday.h +++ b/arch/mips/include/asm/vdso/gettimeofday.h @@ -199,6 +199,13 @@ static __always_inline u64 __arch_get_hw return cycle_now; } +static inline bool mips_vdso_hres_capable(void) +{ + return IS_ENABLED(CONFIG_CSRC_R4K) || + IS_ENABLED(CONFIG_CLKSRC_MIPS_GIC); +} +#define __arch_vdso_hres_capable mips_vdso_hres_capable + static __always_inline const struct vdso_data *__arch_get_vdso_data(void) { return get_vdso_data();