Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1454572ybp; Fri, 11 Oct 2019 14:41:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTqHG5MHTc57y9KcJYjybwBIg2cPKXR6Y4qWDpwhy6oyJU35b5BgWXbSTQzk+0P9qdb0ic X-Received: by 2002:a50:f748:: with SMTP id j8mr15651541edn.267.1570830089719; Fri, 11 Oct 2019 14:41:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570830089; cv=none; d=google.com; s=arc-20160816; b=UNrS8K6J8kN1b/yaOCZUL7mWzTXzl2EbDOiR+r42YOTqmLNspkSjBx6RPfuyr4U+ln 9ueE0ftvC5Aj7TttYWzpqlb4uETU2VS/n5lVOG0AhAJxYrjJoyu4IkekhMXlmGZwKCfT LnFS8T1w8bA65kc1LfHWRWfZUjHBOhwIKV/gh0TA/RqKwBc47d1BOAq7r/rk2BJ8+VUU EYospQPRSSvXtbdO3VnQAB2pDl9MFrmozRaUfd3mRTJqJn/FuRiMOlNeMbXf7fhzhjOo u05usF4UBLqioJmSXswfc7VqSjSJHJqErg8kRFoqe629XMl7cAgwn+tDZb3mo++N1bbg Jjyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=39Qgql5J14WTSocuW594OjHHOaaN/MzK0wc9shwim60=; b=rKu5MObU/62gqjwzYnYW+bo3pW1/72Bc9tJTJvLMZr3sTCA1WJqoqqHIPX9PeD8UHW MGcNO9z4IwOnyx2T6nVyJfwxIi1RoryuImxa1F0Tr9m01F5lHW9WI8q9DeeKoK0hA9So sKVLaTvfny6yHzw9Nk9JrmpO7CJOyc1JcCCCC0CNPWFL25posDZkXdtSfcNNcr7N8Tm5 tgIUgFtQVuQFJ8VIWH0mSwHWbkKj7YgFR3YveNj2DRcbRbB4sgysEJZPx+47V5vIQDU0 fUDfFMbt+aTW8MgpM287yBfl07JfAFPFs07+OUjBhge8MObKzJwlwzMBQ1mf0WehojfH BWhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a54si6107324edc.333.2019.10.11.14.40.54; Fri, 11 Oct 2019 14:41:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728808AbfJKVjQ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 11 Oct 2019 17:39:16 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:37147 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728719AbfJKVjQ (ORCPT ); Fri, 11 Oct 2019 17:39:16 -0400 Received: by mail-qt1-f195.google.com with SMTP id l49so1967563qtc.4 for ; Fri, 11 Oct 2019 14:39:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Emaejysl5mBHMeLX8UojNwQG/pC4GtfE2Q5wUE+vjxs=; b=Uo3CtT60Qdym/9pjaDJ7wx2vN+KhjKcTw2oqzCVzr9u6xnCCbgryWYLYmQC97OiNqv BqpaWDbaspH5U7aaCP2U7UWYrv1OZEBPYjFYQdJN5HT0nMcyRhJc3r6h9GBd7pzNbBAJ ui/DaBZrJ10O7yovUk2VA3XDxwZGeh/EUOI3XcYwgexC+zIOgZUO/oipwGC16D6ztcFw jNnhMGKI/Ld+6Ng5lXilJEQpCX0JX9mfZTy+6s6AJWEENTtst8dLBarmbrGgfLdOYCyQ 9Eq74fQUCf/A9pSqumqBFUBs8ebuAA2a2j1t5LatV0QI6JuWFLG0LMFtkKyZUsMiZNIR UhPw== X-Gm-Message-State: APjAAAU1LYfqrZh3nBHsmW6CnRElY6TTprvXos5ho/2dKPXDt/8ur+de oDXh/5xehcwHrPZfBJrthxI2i89WCt2QmjLyKBg= X-Received: by 2002:aed:3c67:: with SMTP id u36mr19227623qte.142.1570829954952; Fri, 11 Oct 2019 14:39:14 -0700 (PDT) MIME-Version: 1.0 References: <20191007164610.6881-1-ard.biesheuvel@linaro.org> <20191007164610.6881-20-ard.biesheuvel@linaro.org> <20191007210242.Horde.FiSEhRSAuhKHgFx9ROLFIco@www.vdorst.com> <20191011172133.Horde.sxiyClHzSJAUvHtYJdMQEbN@www.vdorst.com> In-Reply-To: <20191011172133.Horde.sxiyClHzSJAUvHtYJdMQEbN@www.vdorst.com> From: Arnd Bergmann Date: Fri, 11 Oct 2019 23:38:58 +0200 Message-ID: Subject: Re: [PATCH v3 19/29] crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation To: =?UTF-8?Q?Ren=C3=A9_van_Dorst?= Cc: Andy Polyakov , Ard Biesheuvel , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Herbert Xu , David Miller , "Jason A . Donenfeld" , Samuel Neves , Eric Biggers , Andy Lutomirski , Martin Willi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Oct 11, 2019 at 7:21 PM René van Dorst wrote: > Quoting Andy Polyakov : > > On 10/8/19 1:38 PM, Andy Polyakov wrote: > > As an example, MIPS 1004K manual discusses that that there are two > > options for multiplier for this core, proper and poor-man's. Proper > > multiplier unit can issue multiplication or multiplication-n-add each > > cycle, with multiplication latency apparently being 4. Poor-man's unit > > on the other hand can issue multiplication each 32nd[!] cycle with > > corresponding latency. This means that core with poor-man's unit would > > perform ~13% worse than it could have been. Updated module does use > > multiply-by-1-n-add, so this note is effectively for reference in case > > "poor man" wonders. > > Thanks for this information. > I wonder how many devices do exist with the "poor man" version. I'm fairly sure the MT7621 is the only 1004k supported by the mainline Linux kernel today, and likely the only one that will ever run this code. Ralink/Mediatek, Lantiq/Intel and Ikanos/Qualcomm had some other SoCs based on the related 34k core with an optional iterative multiplier, out of those only Lantiq ARX100/VRX200 has support in Linux or OpenWRT. Everyone else (in the wireless and router space at least) seems to have skipped the 34k/1004k and only used 24k or 74k/1074k based chips that are the most common and have a fast multiplier, or some custom mips core. Arnd