Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp1317394rdb; Mon, 21 Aug 2023 04:24:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGh1wVaKzax6FWECJjCf5wcGgHi9As0MXGHoTqt46p+DgKuUStYoeNW8DAJ4AaWMxTwFDvO X-Received: by 2002:a05:6a20:1008:b0:133:cf5c:4d2e with SMTP id gs8-20020a056a20100800b00133cf5c4d2emr4147339pzc.20.1692617089906; Mon, 21 Aug 2023 04:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692617089; cv=none; d=google.com; s=arc-20160816; b=kq1GQ5jAGFfPL8Aocb3exOpll1S7nnBJGY9i7Al/387Dty7EgkSaOFrdoBY7p9aakZ 7SnQLBAMCkah8H6IRlr7oiSExvvVX24z2e0FzEjsc59LYSI6+r3HCyhD+uMvMgst17Pe uZiqnXdmXSiKOW+9n2I3ydjpHxMFmSNQPFvHXzwlcfF/CD0AzfRoZ3WlkGuNOr6AdU6C 6Ex12Q3+I2JRstAaeHkPL+bB3mZphBwTMtMmZCL8d4NRkEiPCa8thp3uxJ6jsyS7MwbD TSoAWHOFk1XdwHzU6DvnEcmSsQjYAbo3747lEQP/6Y8kT+UVOUhX81gCfoGb9InOR8zh ZtKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=54yLla1TIIfoEeUDFmVXj48PJ+uBOX/4apvKQ4SBMvU=; fh=ycL00UPOdvrzkheLSg9+3RAd6GkZpWzmGT/sAyQX3TI=; b=lhgN/4K+goeucpyPYxMX3RYmQeSI8VUYUhKT/hG5WG8FqoeITJ8SKFUYgsigu9zyDj dR6F0+Q8SqQWPTmLO9pMI4R6AYYY6+aR71ZEcWWj5BZw4PbtCqChIwLtq8JrXC9FSAdT ohsU14ttLOSsAg5JgSbri4kb0FHTF/0Gb12v6oH6h9ZxnWFxLV3BTNfe2VSX3sQIsFws hZf5HRdkdvqXN6zieO3JpPve0H8j4mJKCfs847RyyCz3QDa7YtKDn4cY4OVz+IDjdolH 81Gt0TFu38f/a+yCfffwx9HCY5PQtcaCGDuqtCI+ZxqsZEK7XD8JID2pHu9BkPkBKUt/ ElAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=om98UPqQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be13-20020a056a001f0d00b00686bef2c7c5si6878004pfb.322.2023.08.21.04.24.30; Mon, 21 Aug 2023 04:24:49 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=om98UPqQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234680AbjHUK0k (ORCPT + 99 others); Mon, 21 Aug 2023 06:26:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbjHUK0k (ORCPT ); Mon, 21 Aug 2023 06:26:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E175D8F for ; Mon, 21 Aug 2023 03:26:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7747E615B6 for ; Mon, 21 Aug 2023 10:26:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43D61C433C7; Mon, 21 Aug 2023 10:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692613597; bh=uOeWcgmBXNJ1zsagH2XKY9cjPF1OwXjOc/LzhgltRCw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=om98UPqQt8+7VwNOi6EHSsz4DgxTepm65hAEQpraA2/9EbVGsZYL6/Q2hFvDdupZ0 v0tueCcDPTI6YHDHHuo/5HseWtqB7E51KZUwW5kwUGD4oZVz8VXKDFVyp6PXMPtJfp tD6L5WCTTiUqi3LacbAOGpbCJo0zKjoose8Uye03+NjYbggYMhNUWBYm5TXesSmgFw qpV/1YZJDMCUSp9LJN9mrLrFpbG2gohAabrCr/67NPeGqfFhWz8EO9/O2g9VacT52t 48gR2dAADHiUsXpVtcm3lPzqYt2HWQSWseaQ8sM3GWV87S0vUBQFnkTJQBMm6lbMC/ N9pQbXotryN1Q== Date: Mon, 21 Aug 2023 11:26:32 +0100 From: Will Deacon To: Herbert Xu Cc: Ard Biesheuvel , Weili Qian , Arnd Bergmann , linux-crypto@vger.kernel.org, shenyang39@huawei.com, liulongfang@huawei.com Subject: Re: [PATCH v2 1/7] crypto: hisilicon/qm - obtain the mailbox configuration at one time Message-ID: <20230821102632.GA19294@willie-the-truck> References: <20230811140749.5202-1-qianweili@huawei.com> <20230811140749.5202-2-qianweili@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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, Aug 21, 2023 at 04:19:54PM +0800, Herbert Xu wrote: > On Sat, Aug 19, 2023 at 09:33:18AM +0200, Ard Biesheuvel wrote: > > > > No, that otx2_write128() routine looks buggy, actually, The ! at the > > end means writeback, and so the register holding addr will be > > modified, which is not reflect in the asm constraints. It also lacks a > > barrier. > > OK. But at least having a helper called write128 looks a lot > cleaner than just having unexplained assembly in the code. I guess we want something similar to how writeq() is handled on 32-bit architectures (see include/linux/io-64-nonatomic-{hi-lo,lo-hi}.h. It's then CPU-dependent on whether you get atomicity. Will