Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp786323imm; Wed, 20 Jun 2018 06:38:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJdPmZKM7EniwZo6YVCD/f047/D2f/iWom7QqzhiIcndIDMm2UerNLcceabPd7VDL+tyJVD X-Received: by 2002:a17:902:760d:: with SMTP id k13-v6mr23459880pll.56.1529501914524; Wed, 20 Jun 2018 06:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529501914; cv=none; d=google.com; s=arc-20160816; b=OK6RbGRFKNZprqhxRPu6rgpm9YXyvOc78v24wzjdK1Vfk/uTiYbwltCbNFZLTBRIJs 7ViSwbQKnIlKt5ef7FVqYJzcHrK1u078EZAFQJvfZseuj0ghJBHfbXQ8lJUZysX/oZnx llSoMhZAnWaTJhGm2BSAvCzePtwavGevmPgSJXxiqFmy0SHXuKw9V8khzWLEjlA5PGvB uVvi8JIwmsWGiLAdUtiw6Zv6zU96oGrLn9v9Ezf2Kjsjqd78S+Q/TS+njoskbw4qVlyu Pz84cjGjB9QnHb9zevnRXVEKmtKb46+eKBFVbV/lLzqDk6ndeFqEYlcRqWwhfgnn60UI wduw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=xnN64uAIhZd4D8gTUdwa/i1hmxxOuGu05V7ShXjCElQ=; b=HL7gG/42gehPKqGGEHGGwQn6pC/vrdOO5Zsdth9eIryHoT+jRFD71JFQHuoNc3+UiK quATAoO+S0Lo3n+Crrq1qyZY5BHeq7rNcUYFvU3I27A8uZqggVA3Xsqp02siitthxPzn 4nf+d6DN3DqwGg2a+C51Lq9jNvLEcmk+TDfS+NwKZi4VrQDr5iqognUAgV2oDt3n1Jyy eAMzR0mYUYrIt+JcRbxFVa5pvs/tcfBvBmvub2b7ongA/cORMRzh8v6PuNc2GzWlMrNR xLP+PO7u12aSez8xbx6PxP4RX+SbU1PM03XKCQWlbfOFqYJCDF4/SI9CJznSJDuSWxqY N/rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pn3aPXV6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9-v6si2352819pfm.136.2018.06.20.06.38.20; Wed, 20 Jun 2018 06:38:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pn3aPXV6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932173AbeFTNhf (ORCPT + 99 others); Wed, 20 Jun 2018 09:37:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:35636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754101AbeFTNhd (ORCPT ); Wed, 20 Jun 2018 09:37:33 -0400 Received: from localhost (unknown [106.200.222.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B33F120846; Wed, 20 Jun 2018 13:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529501853; bh=KbDOPDM66ETxBSlPC8Xp7mV5cqmnvxTXsAsXbvkL+sI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pn3aPXV6Un9rEuOjMgdgaUKljQXJrNssi3W8PIR1coHjTxNLwCToS+JsVe7cHhm02 hH0pBkbtQU7+KwjuO0vlV7gpuoR1f5Z5qgG5yHy8uRxtHtutzdfCGrjweGXIoE2v7E w6YCxO6/Uu9bKa76bChIMu/RMEkM4+bMJIiRDq38= Date: Wed, 20 Jun 2018 19:07:25 +0530 From: Vinod To: Stephen Boyd Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Mackall , Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v2 2/2] hwrng: msm - Add support for prng v2 Message-ID: <20180620133725.GB27187@vkoul-mobl> References: <20180619095430.26358-1-vkoul@kernel.org> <20180619095430.26358-3-vkoul@kernel.org> <152947431955.16708.15247307054260887941@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152947431955.16708.15247307054260887941@swboyd.mtv.corp.google.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-06-18, 22:58, Stephen Boyd wrote: > Quoting Vinod Koul (2018-06-19 02:54:30) > > Qcom 8996 and later chips support prng v2 which requires to > > implement only .read callback for hwrng. > > > > This version of chip has multiple Execution Environments (EE) and > > secure world is typically responsible for configuring the prng. > > Sometimes secure world is not configuring the rng though. I prefer we > have a DT flag for this to indicate if secure world has configured it or > not and then skip the init logic when the bool property is present in > DT. Then the DT property can be set on firmwares that are making things > blow up when we try to read the 'configured' register. I'd also file a > bug to qcom to tell them to unlock that config register for reads so > that things can work simpler, but who knows how that will work out. I dont feel that would be required. See below.. > It really sounds like the hardware isn't actually different, just the > firmware has decided to be more strict about making reads fail now. So in this case base hw block seems similar but consists of multiple Execution Environment (EEs) and all of these contain only data registers. Only secure environment has configuration. Each one has its own register space. In a case where we dont have secure world, we can point to secure environment with v1 ops, so driver shall configure and run. Thanks -- ~Vinod