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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9640EC433EF for ; Wed, 6 Jul 2022 01:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbiGFBnj (ORCPT ); Tue, 5 Jul 2022 21:43:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbiGFBnh (ORCPT ); Tue, 5 Jul 2022 21:43:37 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2DA718B06; Tue, 5 Jul 2022 18:43:36 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ld2Lr5gnxzhYyF; Wed, 6 Jul 2022 09:41:08 +0800 (CST) Received: from [10.67.111.192] (10.67.111.192) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Jul 2022 09:43:33 +0800 Message-ID: <2194026a-c958-039e-7b26-b84cfa30a3d0@huawei.com> Date: Wed, 6 Jul 2022 09:43:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH bpf-next v6 2/4] arm64: Add LDR (literal) instruction Content-Language: en-US To: Will Deacon CC: , , , , 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 , , "H . Peter Anvin" , Jakub Kicinski , Jesper Dangaard Brouer , Russell King , James Morse , Hou Tao , Jason Wang References: <20220625161255.547944-1-xukuohai@huawei.com> <20220625161255.547944-3-xukuohai@huawei.com> <20220705163941.GA1339@willie-the-truck> From: Xu Kuohai In-Reply-To: <20220705163941.GA1339@willie-the-truck> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.111.192] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 7/6/2022 12:39 AM, Will Deacon wrote: > 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 > will fix >> >> 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. > will rename > Anyway, I checked the encodings and the code looks good, so: > > Acked-by: Will Deacon > > Will > .