Message ID | 20210220195748.3153-1-noltari@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=IJVG=HW=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AFD0C433DB for <linux-arm-kernel@archiver.kernel.org>; Sat, 20 Feb 2021 19:59:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4758264DF0 for <linux-arm-kernel@archiver.kernel.org>; Sat, 20 Feb 2021 19:59:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4758264DF0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zYVzYPSH48MV9uyBJE3CzhSLAK1QPSJ4mIcXe5Gjn9o=; b=iNby6QDSCcDYTy9rBa7px2Y5qm NaY8wEfuvdc2vJLI22wScpP0GuHMXbVkj4Czkz+c1i2VIj5KnpfIggqIWeEzOMpRgLSxLbQaFVWhG u+El6ETW8l+Q/1f4LvhnFI/epWFf1MM6RA3nxXqVgJ2oIyyIetq1YwIH+2vRFKtImopyCfKxahdqJ 6ML2GqXTFGA+dblJrg1bbS5MlrmlNfJeiJTcjJb72tBHLFtSAkgkRp+9fRAaREyHRoz1xq8Ug7owh TDVxeFYivKsQo++5IcnSOVCt+6IIaZQBnL6OpSQZ8mOC6MvCw3EOue7aNHrm+hNvO3xSdqPIPqlx9 WnJ139qg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDYO6-0007BH-BZ; Sat, 20 Feb 2021 19:57:58 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDYO3-0007AZ-A6; Sat, 20 Feb 2021 19:57:56 +0000 Received: by mail-wr1-x430.google.com with SMTP id 7so14656967wrz.0; Sat, 20 Feb 2021 11:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7/YI9giWpjqI5r/4UtRT8Ox2ib3gDsyQ3SVmoldJkv4=; b=LwlVaqGGeEC5xdjBj4ZnRTLmJX4o9I413e0uaXlkXRkVskBWCQfLgsm7c0K2xLhO+G cSx5Kt4ZhtbVY50jXLdvqS6nbk+tuWA8sDhvrILtbDVFn92k0a+bFp/yFpDM4NqeymaX UC5A2vz6CSzngCqFfe2O9RXFAEZqDEYfzH4geNLtg0hKTo9W16ojA6IqDgycZ+5I1vR5 vX0g/XobJ/CyUREE5DghgTiahZyWYAUzcJVyxHcXTi9oKpaEM3g8v44NmcM1S5JchK2c gpCXMwwd9ty+F2dYNOKyHKQwsEy+xR23LDYq2Rhnz704h/4IOt8f4KLtI0k6/cpEHXfr sZPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7/YI9giWpjqI5r/4UtRT8Ox2ib3gDsyQ3SVmoldJkv4=; b=iWS5b2ls84mV+ZE4LwR8knLqufOfcyxtAxXIctk7hR30oRS7A312G9Nu+5y0KPBhF6 qWqJHCHP0Opl9x7dEtfnHmEASvMEYRaY0gRHk8g3UdMIS6cVeyRhgNgIk70lT4/JnMiS sHIOXLzz73dKt3hGz5iuOsxYhUcJ4g6KwshcPRVmURYy5dPR3dw/1nnQuWNiCHX8hO08 4iuiVqvbO7niujuDOlB9P0UH/twFtLSnBk8QGkz9rDwKUpjCehpJeVooX1vafxnD9ler jzaMAkKG3wNiGa0ZYcfbZ1e1w0zctnK+ES1m0Bw7H0oGPq2gFmliS75MaKI//+/ciya6 k1Kg== X-Gm-Message-State: AOAM530/ZZXKrIYFB13rCLxym/TieaGMJmQ+cPhoxbKXlVlLNgmNRKUQ AirY2HozWCrRolrY6f8D+0g= X-Google-Smtp-Source: ABdhPJxcpifGJsT4KUrjGOroCawQkEiz2wm9Q3azOK62Vldn7Cwc1D7k0GVBzgCmGCEYbmH70zQJeg== X-Received: by 2002:a5d:4e10:: with SMTP id p16mr14672801wrt.360.1613851071410; Sat, 20 Feb 2021 11:57:51 -0800 (PST) Received: from skynet.lan (23.red-2-137-25.dynamicip.rima-tde.net. [2.137.25.23]) by smtp.gmail.com with ESMTPSA id w81sm18368158wmb.3.2021.02.20.11.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Feb 2021 11:57:51 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <noltari@gmail.com> To: mpm@selenic.com, herbert@gondor.apana.org.au, nsaenzjulienne@suse.de, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, rikard.falkeborn@gmail.com, noltari@gmail.com, linux-crypto@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stijn@linux-ipv6.be, ynezz@true.cz Subject: [PATCH v2] hwrng: bcm2835: set quality to 1000 Date: Sat, 20 Feb 2021 20:57:48 +0100 Message-Id: <20210220195748.3153-1-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210220174741.23665-1-noltari@gmail.com> References: <20210220174741.23665-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210220_145755_427556_23840727 X-CRM114-Status: GOOD ( 12.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[v2] hwrng: bcm2835: set quality to 1000
|
expand
|
diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index 1a7c43b43c6b..4b48cb7176b0 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -163,6 +163,7 @@ static int bcm2835_rng_probe(struct platform_device *pdev) priv->rng.init = bcm2835_rng_init; priv->rng.read = bcm2835_rng_read; priv->rng.cleanup = bcm2835_rng_cleanup; + priv->rng.quality = 1000; if (dev_of_node(dev)) { rng_id = of_match_node(bcm2835_rng_of_match, dev->of_node);
This allows devices without a high precission timer to speed up boot from more 100 s to lest than 30s. Justification: root@OpenWrt:/# cat /dev/hwrng | rngtest -c 1000 rngtest 6.10 Copyright (c) 2004 by Henrique de Moraes Holschuh This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. rngtest: starting FIPS tests... rngtest: bits received from input: 20000032 rngtest: FIPS 140-2 successes: 996 rngtest: FIPS 140-2 failures: 4 rngtest: FIPS 140-2(2001-10-10) Monobit: 0 rngtest: FIPS 140-2(2001-10-10) Poker: 0 rngtest: FIPS 140-2(2001-10-10) Runs: 1 rngtest: FIPS 140-2(2001-10-10) Long run: 3 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=146.002; avg=349.394; max=1302083.333)Kibits/s rngtest: FIPS tests speed: (min=12.126; avg=22.750; max=23.432)Mibits/s rngtest: Program run time: 56826982 microseconds 996 successes and 4 failures -> 99.6% success rate 1024 * 99.6% = 1019 (rounded down to 1000) Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> --- v2: add jusftification drivers/char/hw_random/bcm2835-rng.c | 1 + 1 file changed, 1 insertion(+)