Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2767828lqo; Tue, 14 May 2024 08:34:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIa5IY0vXVX7BqY4gaK+Z+ohha3lc+WrCs/UmcyQ8QqPwKsn2PPYfPD0IM6WWgkbJ0DM1dxbjTbOtghQcyzQCxpI/SaFkBUxUGMnBFFA== X-Google-Smtp-Source: AGHT+IFO3angqKpI3KGmmJUlE+BVv+LOkjRPKBXnv4g8xjIyogoI1F0qmsYns7r4kkrbtGXN5lwn X-Received: by 2002:a05:6a20:6f0e:b0:1b0:66d:1596 with SMTP id adf61e73a8af0-1b0066d17b0mr3451076637.57.1715700842317; Tue, 14 May 2024 08:34:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715700842; cv=pass; d=google.com; s=arc-20160816; b=YjACVv8SZgeCVd4rT/SirQr8g5fz8GNGE40gqju75gx+ZhuJnvJmMfPp7rFrNnebs4 abb/Jg6n/1bd24wUhgSRXYzd0sCEe6IaLb23iSj7ipTw66vneR1blDN3V/FSI9X2Q9Aq 4gG4M7xjYnNlak/c5syAJKHdK+IGiUyGfPSB0jswBFJ4GH+VmuvboQSHnFe3QBNvfeGL X5mN0jpbNmPZGzB0jTf2M51+fAT1M7JHzIUQyg3GMZYXhFnFsQurYXUg9zCwF2J8xz2C 47L666WwjBXtgEKadJ/aTDkAZHgGatcO9mBChlsykr/t/VAtVEyGX/Km4AHCFqIUokzA I6tQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=eaQhgXWHbWMqf6I8rAKPNOuRRYsSQhfgPu8SXwLtL80=; fh=sj/XGO0KrP8bjM6okLag312LJGscRiHYb7yjo14ECiA=; b=WDiRcWmZWKeyyso1QYt8wNB0Kvh9SPFO9+e0p9BWhlhEyI1FexKkaaKBkEoPdK4Txu /c4NAHPy/LUI5B4cCtZwV1Va6dfxB/ZjyMwYlYkeMycqH1R/2MXbKZB5tC6aI5XLs+h5 JbdJ7YEmPJsbFKQQvzJuwVTtQ+x7kTF4FVbGd5ZUqCpmAShIvGARFhOS1KOiNW49smBc GewmbBkeL/F3fJhOp3UuCTIh8Q4azWQ5ZrS6VgmT09UfHZCj9txLtuZP5snAg/hJqur+ /E1lhD+7Snn/djBJ6H0HIZIikqZkL5gUkwGDSc7xKAINKLElJLRELN9fkjXAsIDAJmVp xEUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=Ik0uf6Gt; arc=pass (i=1 spf=pass spfdomain=denx.de dkim=pass dkdomain=denx.de dmarc=pass fromdomain=denx.de); spf=pass (google.com: domain of linux-crypto+bounces-4167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6341171932bsi11510988a12.531.2024.05.14.08.34.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 08:34:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=Ik0uf6Gt; arc=pass (i=1 spf=pass spfdomain=denx.de dkim=pass dkdomain=denx.de dmarc=pass fromdomain=denx.de); spf=pass (google.com: domain of linux-crypto+bounces-4167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 87D76B215C1 for ; Tue, 14 May 2024 15:33:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7479817EBA1; Tue, 14 May 2024 15:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b="Ik0uf6Gt" X-Original-To: linux-crypto@vger.kernel.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7523A1E480; Tue, 14 May 2024 15:33:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.62.61 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715700834; cv=none; b=Tqx37+c8wxUugZHuLC8ZVGAC6HEnk4JrW293H6TQuSV3c6WE+r8SAjp81JgA+G5JumYWj7dQwfrpTmL2QqY1H9r6e1DGlwiTvxmPmSrBzwXSgQ4SWqvSLllSypEl4YUPDW2Hcv0Ye3jCb4ONBcoj6X5IbATN9f2iXmvYSMFssP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715700834; c=relaxed/simple; bh=I2afeUXRrRNWruaJZyuIueLvNDdutw2hjXnXM6yRGIE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Frvx4s5ppkJMHNb4TEXTnSGLTox+i73G4IIsyBvPBCtVRznRvSODnCdn6tc5wnJMW2P5izGjH50oX01VODV75zkGL5dP5v54zuuSOnrZc6L4yAebB/7meO7GPrlFtjwGkh8wGwhQI73ZOPWoGVgf9PtfWjngMy2XVopqc/34M7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de; spf=pass smtp.mailfrom=denx.de; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b=Ik0uf6Gt; arc=none smtp.client-ip=85.214.62.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=denx.de Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B2F0088280; Tue, 14 May 2024 17:33:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1715700830; bh=eaQhgXWHbWMqf6I8rAKPNOuRRYsSQhfgPu8SXwLtL80=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ik0uf6Gte814yE7g5bKytAreIqV9wvHq7HCCxR7M6yyMhQ6NYTTxzn0YAF+lvNYsW kPixg5xsaLs3uWHxWscWLbQ607cOgzG022nrShmYegVXZ9It1xXeuslG9SbR0MyDbe Xcy964qLCku+tpgg8qMZMW36IOqsUjt5SsJgAR63uPqW3ieIbKvHh26mflRKZqZ6mR fgmlw5v61zHSOTYjE0hMrfJBFiooNFYx1ErSOfq/mwTdF6LVyqNiXHnRCkxQSVI5GJ xVC+TbCRAvoaqH7fYyjTrQfBKh6Ng8KSeOIKCTtxOgdJ/Y/cUSuN5RsohKqtu6JrIR f/OQTkVU22kVg== Message-ID: Date: Tue, 14 May 2024 16:37:14 +0200 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [RFC] clk: stm32mp1: Keep RNG1 clock always running To: Gatien CHEVALLIER , linux-crypto@vger.kernel.org Cc: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Alexandre Torgue , Gabriel Fernandez , Herbert Xu , Maxime Coquelin , Michael Turquette , Olivia Mackall , Rob Herring , Stephen Boyd , Yang Yingliang , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com References: <20240513220349.183568-1-marex@denx.de> Content-Language: en-US From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 5/14/24 10:10 AM, Gatien CHEVALLIER wrote: > Hi Marek, Hi, > Strange indeed. Yes. > A potential reason that comes to my mind would be that something tries > to get a random number after the driver suspended and fails to do so. Possibly. > Else it might just be a bad clock balance. I don't think so, this would be reported by the kernel and it would show up in /sys/kernel/debug/clk/clk_summary as incrementing use count. It would also not happen in a non-deterministic manner like this happens here, the hang doesn't always happen after well defined suspend/resume cycle count. > Can you describe the software ecosystem that you're running please? > (SCMI/no SCMI)? STM32MP157C DHCOM PDK2 with mainline U-Boot 2024.07-rc2 , no SCMI. > Do you have the 3 fixes of stm32_rng.c that you've sent recently in your > software when testing? Yes, but this happens even without them. > What if you add a trace in a random generation function in random.c? Do you have a function name or line number for me ? > After this, I'll try to reproduce the issue. If you have a minute to test it on some ST MP15 board, that would be real nice. Thanks !