Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2015606pxb; Sun, 24 Apr 2022 01:59:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaBA4BkkIY3TPBh+wfkJtAkuMldcA8Kt2OnynN+TRNrS1POWcg0d009jqLnee5EClck/5r X-Received: by 2002:a17:907:3e90:b0:6f2:605f:3e89 with SMTP id hs16-20020a1709073e9000b006f2605f3e89mr9719908ejc.7.1650790793359; Sun, 24 Apr 2022 01:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650790793; cv=none; d=google.com; s=arc-20160816; b=p+pOTJZlSFih5FK9odrjDrwgDdF5aR+ZlkgDp3J74oTnLL7r7A23BKT0eeJvFpc6Ok R9fLX0dXoddstZsNBOHIZOu1Xp5SmT+KTOqgB5aILdNQWnB20QV5uUNlWImAlVS6nLmY yxv2lbR7h8jl0ZYEUy4NsLbUcLRh+oqLitKCUHQIz+xPuma5NzqZ4cCyEPIm/SPDr2Se IwbULBwklz9yVgYy2R7LvfQFrg4a1nfeM7fGraZHSe6Bprz+Q1a9uqn262GjdDJHTSfb QXIMI82mIXNMm7ECEbIjVYA3bh0Thm6s00v+W+iL6x7D0Rq2Jc8snnAjirbmXw5w4D8i uJ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=eyiXLamuTFYamjUE/XF99kiA89e/EgUsyuQ4tW5MrjI=; b=q5XvlhGjO/YDdoEMJ5am5mVSbeXFFm+io5OpG3niNr8rkUq2gcJo6NlYBsuhipY0z7 F5YS3GWN6K9fO+/UdvDXy/pjXYbBuk0jWzgxGetLpEiKm6aHHLERM86z/Us651VJcyRI bcxAvq96IYvmX/pZ4ZkQRPxzvJxIpDIE/1q2lLkKOWweltGpsSWW92vHhxrCa9lgZMbG dh31j/EQZuq4VVrE7v/NnIJuovXKsXIoix3nnOEuW+zc7bj+r5oBD3pzP9/tOC17E9rl j8R5KR5p+dMKcOsOcIB0afHQcFLpbgfoTGiT2d/9uQa6rlM/W5lNXdg8idbPT/gsvL73 vW+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t21-20020a056402525500b0041d78a39a7asi11442869edd.443.2022.04.24.01.59.27; Sun, 24 Apr 2022 01:59:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234407AbiDWXgr (ORCPT + 99 others); Sat, 23 Apr 2022 19:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbiDWXgq (ORCPT ); Sat, 23 Apr 2022 19:36:46 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AF34A16FAFE; Sat, 23 Apr 2022 16:33:46 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id AD45492009C; Sun, 24 Apr 2022 01:33:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 9D31992009B; Sun, 24 Apr 2022 00:33:44 +0100 (BST) Date: Sun, 24 Apr 2022 00:33:44 +0100 (BST) From: "Maciej W. Rozycki" To: Thomas Bogendoerfer cc: "Jason A. Donenfeld" , LKML , Linux Crypto Mailing List , Thomas Gleixner , Arnd Bergmann , Theodore Ts'o , Dominik Brodowski , Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , "David S . Miller" , Richard Weinberger , Anton Ivanov , Johannes Berg , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Chris Zankel , Max Filippov , John Stultz , Stephen Boyd , Dinh Nguyen , linux-arm-kernel , linux-m68k , "open list:BROADCOM NVRAM DRIVER" , linux-riscv , sparclinux@vger.kernel.org, linux-um@lists.infradead.org, X86 ML , linux-xtensa@linux-xtensa.org Subject: Re: [PATCH v4 04/11] mips: use fallback for random_get_entropy() instead of zero In-Reply-To: <20220418071005.GA4075@alpha.franken.de> Message-ID: References: <20220413115411.21489-1-Jason@zx2c4.com> <20220413115411.21489-5-Jason@zx2c4.com> <20220413122546.GA11860@alpha.franken.de> <20220418071005.GA4075@alpha.franken.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, 18 Apr 2022, Thomas Bogendoerfer wrote: > > Also the systems I have in mind and that lack a counter in the chipset > > actually can make use of the buggy CP0 timer, because it's only when CP0 > > timer interrupts are used that the erratum matters, but they use a DS1287 > > RTC interrupt instead unconditionally as the clock event (see the comment > > at the bottom of arch/mips/dec/time.c). But this has not been factored in > > with `can_use_mips_counter' (should it just check for `mips_hpt_frequency' > > being zero perhaps, meaning the timer interrupt not being used?). > > > > Thomas, do you happen to know if any of the SGI systems that we support > > had buggy early R4k chips? > > IP22 has probably seen all buggy MIPS chips produced, so yes I even own > Indy/Indigo2 CPU boards with early R4k chips. Do they actually use the CP0 timer as a clock event device? Do they have an alternative high-precision timer available? In the course of verifying this change I have noticed my DECstation 5000/260, which has a high-precision timer in the chipset available as a clock source device, does register the CP0 timer as a clock source device regardless. Upon a closer inspection I have noticed that the CP0 timer interrupt is non-functional in this machine, which I have then confirmed as a valid CPU hardware configuration via the TimIntDis/TimerIntDis (the R4k CPU manual is inconsistent in naming here) boot-mode bit. It allows IP7 to be used as an external interrupt source instead. I used not to be aware of the presence of this boot-mode bit. I find this arrangement odd, because IP7 used to be wired internally as the FPU interrupt with the 5000/240's CPU module, so it's not usable as an external interrupt anyway with this system's mainboard. That means however that this machine (and possibly the 5000/150 as well, but I'll have to verify that once I get at the KN04 CPU module I have in a drawer at my other place) can use the CP0 timer as a clock source device unconditionally. I think this discovery asks for code optimisation, which I'll try to cook up sometime. I don't expect the IP22 to have a similar arrangement with the CP0 timer interrupt given that the CPU was an in-house design at SGI, but who knows? Do you? Maciej