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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F37A9C43217 for ; Fri, 27 May 2022 12:11:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353169AbiE0MKd (ORCPT ); Fri, 27 May 2022 08:10:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353433AbiE0L4e (ORCPT ); Fri, 27 May 2022 07:56:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C99DA3889; Fri, 27 May 2022 04:51:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6C57CB824CA; Fri, 27 May 2022 11:51:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC40BC385A9; Fri, 27 May 2022 11:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653652309; bh=N4I2vRnlz5HhcFVb3tpYEZeesn0q49B0+WAvsvwec5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iYb1SSuW8s8o5r4sbk3v4hAxZuN2lE38M/sd/2ukD1v0dgkf2ep7PBC1q4XpJXM2S I3Ce9LcyAEQzOXB3tDS9NuJXFc+HyzeE9Belc+Nvig+t/E4pHKOVRpmkBuQ3jRcMUo xJZAtnrsfOh0Ubbt1gjcgFaGFbg4cDvfB/Pe6xY8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Gleixner , Arnd Bergmann , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , "Jason A. Donenfeld" Subject: [PATCH 5.15 108/145] powerpc: define get_cycles macro for arch-override Date: Fri, 27 May 2022 10:50:09 +0200 Message-Id: <20220527084903.663694172@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220527084850.364560116@linuxfoundation.org> References: <20220527084850.364560116@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Jason A. Donenfeld" commit 408835832158df0357e18e96da7f2d1ed6b80e7f upstream. PowerPC defines a get_cycles() function, but it does not do the usual `#define get_cycles get_cycles` dance, making it impossible for generic code to see if an arch-specific function was defined. While the get_cycles() ifdef is not currently used, the following timekeeping patch in this series will depend on the macro existing (or not existing) when defining random_get_entropy(). Cc: Thomas Gleixner Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Acked-by: Michael Ellerman Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include/asm/timex.h | 1 + 1 file changed, 1 insertion(+) --- a/arch/powerpc/include/asm/timex.h +++ b/arch/powerpc/include/asm/timex.h @@ -19,6 +19,7 @@ static inline cycles_t get_cycles(void) { return mftb(); } +#define get_cycles get_cycles #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_TIMEX_H */