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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C785FA0C39 for ; Wed, 15 Apr 2026 06:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yCfDM/MK3nfeMalsuUCejEYgbVuWPS8f+Bt6LFEQrWw=; b=INGYak6+9VGXY5XEIML3872N45 4Cbw1WLoGknjt84hFcC+D092xaFQyklzfxHgd8olrZNUYKx9FB6ynz/7W37DX9IAa3Qkexr6qnFVw i+tX2tN6XvuOn30qa5USb5pWdyhG/JAPEoqAgrTto5xTg2JjS+SoUgpLVJeFZ6ZXAUzXaAjJbdmfm +MpXP9aqdY3Ifk+tXJFg+nYFkKiowRON2OModwh3cyESSSmKS2J+BaT3EojkedA3+XwGQsylWbepK rh+COzclgvWeJRgwkqzHbtekUR+q63afLP4vkwaJLS2E40otXLpiNd47ZNGj/nCrOmwFvUANdzJ1m WFvKFIzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1wCu2l-00000000g4L-1tOj; Wed, 15 Apr 2026 06:48:11 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1wCu2i-00000000g3T-3JOX; Wed, 15 Apr 2026 06:48:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id C884D41A70; Wed, 15 Apr 2026 06:48:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E1D1C19424; Wed, 15 Apr 2026 06:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776235687; bh=uO1fFgRaYkEaX03uIGSllbIp0KmN4e8uhrxbiL7j6JA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Wn6Hr/rv7RQ0mjmBpBGnHzSLGoawtRWrJKf8Yulby+TTpp7z1W2m+/e3q+cBeZYn8 9EULstKmB1P1aIGBA/hM7NfdL90zPADnWSMrSZUOJgfBI2Y0gYKo15ZH/8SN+3BCpi LFdpD3kIOkfmc5kLWHOPn/7qJv2G9rdoWFZcqmWwEJGa7DK0r7DBeorJlYNCKX5hcM Q22Qw/tg/rR1esDPVyaYxqkxnFQnTVF5/bVWUROMriQiIMAWyo9xVZRAIqfM9NCvMV JvPvhMbjPkTiWVz5ZUzK2DMWWd8bbim3aFcilo4uxvNCEcTYhNnaiu0tF2t4jRv/Q5 DezCa9n7clYBA== Message-ID: <9c33afea-7a64-456e-aa2f-bdcf7459b567@kernel.org> Date: Wed, 15 Apr 2026 08:47:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch 33/38] powerpc: Select ARCH_HAS_RANDOM_ENTROPY To: Thomas Gleixner , LKML Cc: Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Arnd Bergmann , x86@kernel.org, Lu Baolu , iommu@lists.linux.dev, Michael Grzeschik , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Herbert Xu , linux-crypto@vger.kernel.org, Vlastimil Babka , linux-mm@kvack.org, David Woodhouse , Bernie Thompson , linux-fbdev@vger.kernel.org, Theodore Tso , linux-ext4@vger.kernel.org, Andrew Morton , Uladzislau Rezki , Marco Elver , Dmitry Vyukov , kasan-dev@googlegroups.com, Andrey Ryabinin , Thomas Sailer , linux-hams@vger.kernel.org, "Jason A. Donenfeld" , Richard Henderson , linux-alpha@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Huacai Chen , loongarch@lists.linux.dev, Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Dinh Nguyen , Jonas Bonn , linux-openrisc@vger.kernel.org, Helge Deller , linux-parisc@vger.kernel.org, Paul Walmsley , linux-riscv@lists.infradead.org, Heiko Carstens , linux-s390@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org References: <20260410120044.031381086@kernel.org> <20260410120319.789114053@kernel.org> Content-Language: fr-FR From: "Christophe Leroy (CS GROUP)" In-Reply-To: <20260410120319.789114053@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260414_234808_866234_17AEAA5A X-CRM114-Status: GOOD ( 14.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le 10/04/2026 à 14:21, Thomas Gleixner a écrit : > The only remaining usage of get_cycles() is to provide random_get_entropy(). > > Switch powerpc over to the new scheme of selecting ARCH_HAS_RANDOM_ENTROPY > and providing random_get_entropy() in asm/random.h. > > Remove asm/timex.h as it has no functionality anymore. > > Signed-off-by: Thomas Gleixner > Cc: Michael Ellerman > Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Christophe Leroy (CS GROUP) > --- > arch/powerpc/Kconfig | 1 + > arch/powerpc/include/asm/random.h | 13 +++++++++++++ > arch/powerpc/include/asm/timex.h | 21 --------------------- > 3 files changed, 14 insertions(+), 21 deletions(-) > > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -150,6 +150,7 @@ config PPC > select ARCH_HAS_PREEMPT_LAZY > select ARCH_HAS_PTDUMP > select ARCH_HAS_PTE_SPECIAL > + select ARCH_HAS_RANDOM_ENTROPY > select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64 > select ARCH_HAS_SET_MEMORY > select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx) && !HIBERNATION > --- /dev/null > +++ b/arch/powerpc/include/asm/random.h > @@ -0,0 +1,13 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_POWERPC_RANDOM_H > +#define _ASM_POWERPC_RANDOM_H > + > +#include > +#include > + > +static inline unsigned long random_get_entropy(void) > +{ > + return mftb(); > +} > + > +#endif /* _ASM_POWERPC_RANDOM_H */ > --- a/arch/powerpc/include/asm/timex.h > +++ b/arch/powerpc/include/asm/timex.h > @@ -1,21 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0 */ > -#ifndef _ASM_POWERPC_TIMEX_H > -#define _ASM_POWERPC_TIMEX_H > - > -#ifdef __KERNEL__ > - > -/* > - * PowerPC architecture timex specifications > - */ > - > -#include > -#include > - > -ostatic inline cycles_t get_cycles(void) > -{ > - return mftb(); > -} > -#define get_cycles get_cycles > - > -#endif /* __KERNEL__ */ > -#endif /* _ASM_POWERPC_TIMEX_H */ > >