Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1530987pxb; Fri, 1 Apr 2022 16:44:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnUoasqn1NCrdYKgn1PBunBLEidAhiDUBOx4dFZ0kX2zkQ3yr2T4uGRotPkLY/7+0HkNzc X-Received: by 2002:a17:903:2341:b0:156:196a:3ef with SMTP id c1-20020a170903234100b00156196a03efmr12588738plh.81.1648856695037; Fri, 01 Apr 2022 16:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648856695; cv=none; d=google.com; s=arc-20160816; b=pi+TwBGzDl39JuzePQpCUyc4K54b6zV33fjrMLE4Bg2dtwMXArP+GJx1prKeugBv9B 8wp3fax2aWWa9ntZ34uTqS2dRSJDvMWp51XJpC4iBVKqYdz/LiplaJQRb4Tt+HWQcE94 Ec9yLPXb2L2WA7BRoZLOAOJgKvE57yRc/j0uaMPfQ2d7vR8isCPkvtBqHlLWMOI/qBjI 4dy1e/hytMa1bUciLOnZn1qi7FOop1f2JHqXj99JsjFVW2PN3fq0WgZHWaf5jIaPWcKB uyMd2w4bx/35e/t8PCmi14QSKbwzw0Lf2dMy8LRcEAcGYW6U0GR6izTQaQrAHgNTjlc9 i79A== 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; bh=Te2EY0NDN1WBplxAB3rpWVdsNSmoVcm3VtgUSKaHmnU=; b=gWgth6AMIZFM4GGuueHeY5WJ5aN8MIS2bp9f8KqkGhmEpR/kN7jRk+SuvlbTMu/t76 KTwzRWS5Pw3CurHMDVikMpiZXCwjqlS5uhMnyyp1XNgsy49hdewJlAAvbfrSWJnKMi+F Qek3OcPPxmgyyisvnHaQNln6sR6wEKwXW7GcR4JjWzBSN6668JtJfftM3RR5IQqdQdGO 2mnaNYnsAvNc4md0y99L7fpjp3WW+hN6g9n+GAN4Ebu1MEKVJ3ErBSCVfK5h+lFYVmp9 DOyJ7XJjfIZdEh3NS6xUnLbgItiiQn4eQTa8baTbO5tgyK+iLoTdxWx7xzu2imLCvbyf 1C9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21-20020a170902869500b00156052ea978si3205955plo.488.2022.04.01.16.44.40; Fri, 01 Apr 2022 16:44:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236150AbiCaMbe (ORCPT + 99 others); Thu, 31 Mar 2022 08:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233075AbiCaMbd (ORCPT ); Thu, 31 Mar 2022 08:31:33 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28B2E5580 for ; Thu, 31 Mar 2022 05:29:46 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 53F8668AFE; Thu, 31 Mar 2022 14:29:39 +0200 (CEST) Date: Thu, 31 Mar 2022 14:29:38 +0200 From: Christoph Hellwig To: Heiko Stuebner Cc: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, wefu@redhat.com, liush@allwinnertech.com, guoren@kernel.org, atishp@atishpatra.org, anup@brainfault.org, drew@beagleboard.org, hch@lst.de, arnd@arndb.de, wens@csie.org, maxime@cerno.tech, gfavor@ventanamicro.com, andrea.mondelli@huawei.com, behrensj@mit.edu, xinhaoqu@huawei.com, mick@ics.forth.gr, allen.baum@esperantotech.com, jscheid@ventanamicro.com, rtrauben@gmail.com, samuel@sholland.org, cmuellner@linux.com, philipp.tomsich@vrull.eu, Wei Wu , Daniel Lustig , Bill Huffman Subject: Re: [PATCH v8 11/14] riscv: add RISC-V Svpbmt extension support Message-ID: <20220331122938.GB26108@lst.de> References: <20220324000710.575331-1-heiko@sntech.de> <20220324000710.575331-12-heiko@sntech.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324000710.575331-12-heiko@sntech.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On Thu, Mar 24, 2022 at 01:07:07AM +0100, Heiko Stuebner wrote: > +asm(ALTERNATIVE("li %0, 0\t\nnop", "li %0, %1\t\nslli %0,%0,%2", 0, \ > + CPUFEATURE_SVPBMT, CONFIG_64BIT) \ > + : "=r"(_val) : "I"(prot##_SVPBMT >> ALT_SVPBMT_SHIFT), "I"(ALT_SVPBMT_SHIFT)) This would be much more readable as; asm(ALTERNATIVE("li %0, 0\t\nnop", "li %0, %1\t\nslli %0,%0,%2", 0, \ CPUFEATURE_SVPBMT, CONFIG_64BIT) \ : "=r"(_val) \ : "I"(prot##_SVPBMT >> ALT_SVPBMT_SHIFT), \ "I"(ALT_SVPBMT_SHIFT)) Otherwise this looks good to me: Reviewed-by: Christoph Hellwig