From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 191A2C433EF for ; Tue, 5 Jul 2022 16:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LMP6Cv67dJJkGK7UStuKk+YEpMQVf2Rwvxl0csZvLH0=; b=J06wv/u+pePQH7 AUwpv8uajmV0WFBzgU2BHJei9qz5MF2hdT0qDftc20z2mQcHgo8qt7+kTiaNgrg7P8vxyUatvqQVa 4oFZRR0rtQMtDe++yUhaf/ybzyts4uz755M6AkGy44vMKbQOWdNGWYIfnjQuN05FZX8tMnZRLncu7 QcW6hqdKmm3CRFK3ccPfmjgc4Im3pd6zaKuBw024Y9Wg1AcbSWoRdagm0nB67wKX7LOp5/4VchDV+ 7cn7esOwJx26GzfZl/C054inIN6Jt00LKHO5AEMKdZ537YU9mB18OaZl5BdaC2KqOtzGA0CKxhn2p 9PnJ9zzE+sJLj2X8xw/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8lac-001WW1-Ug; Tue, 05 Jul 2022 16:39:55 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8laZ-001WUb-Ta for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2022 16:39:53 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5D16161C3F; Tue, 5 Jul 2022 16:39:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BBC8C341C7; Tue, 5 Jul 2022 16:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657039190; bh=yh6ho/I9Easg45efAjcjXhmjoEVVloWhd5h1kDc+BuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J6oB/6FmOqrzEPGosLm/BuEXHlJ1fH5J0iuxnnd04Zz2XgSNHKXlmpUagdkqu2PZ9 oNIbKkEAAiH26bCLCkBt9OaU3jdkXjuTIzm2k/p6JI7quVtlyvSXfnDbtXAbpZH26j TYKDNGzUBu1kB/hN8eNv9qnIdPYn7GVrwKphsUVF1hyagmMRyBj4y0dBmtqcO9DlEI 9rLHTwwahd6WsWj+SZgxux8kWhT5BXvgAnKZJyeQ+jJqazQsA/4OeMy6sxovhOP1/h +brVdBiChvLBM00b9dNXfSUA/TukQ0ULR93hOnGsYQ2xd/WZtNJFIHWYlcN/K3vjYS yfnl+xoDZ/NFQ== Date: Tue, 5 Jul 2022 17:39:41 +0100 From: Will Deacon To: Xu Kuohai Cc: bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Mark Rutland , Catalin Marinas , Daniel Borkmann , Alexei Starovoitov , Zi Shen Lim , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Jakub Kicinski , Jesper Dangaard Brouer , Russell King , James Morse , Hou Tao , Jason Wang Subject: Re: [PATCH bpf-next v6 2/4] arm64: Add LDR (literal) instruction Message-ID: <20220705163941.GA1339@willie-the-truck> References: <20220625161255.547944-1-xukuohai@huawei.com> <20220625161255.547944-3-xukuohai@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220625161255.547944-3-xukuohai@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_093952_011437_7EC07F4C X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Jun 25, 2022 at 12:12:53PM -0400, Xu Kuohai wrote: > Add LDR (literal) instruction to load data from address relative to PC. > This instruction will be used to implement long jump from bpf prog to > bpf rampoline in the follow-up patch. typo: trampoline > > The instruction encoding: > > 3 2 2 2 0 0 > 0 7 6 4 5 0 > +-----+-------+---+-----+-------------------------------------+--------+ > | 0 x | 0 1 1 | 0 | 0 0 | imm19 | Rt | > +-----+-------+---+-----+-------------------------------------+--------+ > > for 32-bit, variant x == 0; for 64-bit, x == 1. > > branch_imm_common() is used to check the distance between pc and target > address, since it's reused by this patch and LDR (literal) is not a branch > instruction, rename it to aarch64_imm_common(). nit, but I think "label_imm_common()" would be a better name. Anyway, I checked the encodings and the code looks good, so: Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel