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 5FD3DC61DA4 for ; Fri, 24 Feb 2023 13:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbjBXNEQ (ORCPT ); Fri, 24 Feb 2023 08:04:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbjBXNEJ (ORCPT ); Fri, 24 Feb 2023 08:04:09 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E876AF979 for ; Fri, 24 Feb 2023 05:04:03 -0800 (PST) Received: from loongson.cn (unknown [118.116.19.77]) by gateway (Coremail) with SMTP id _____8Axkk7CtfhjrLoEAA--.3803S3; Fri, 24 Feb 2023 21:04:02 +0800 (CST) Received: from [127.0.0.1] (unknown [118.116.19.77]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bxb+TBtfhjn6o6AA--.5563S3; Fri, 24 Feb 2023 21:04:02 +0800 (CST) Message-ID: Date: Fri, 24 Feb 2023 21:04:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH 6/6] LoongArch: Clean up la_abs macro To: Xi Ruoyao , Huacai Chen , WANG Xuerui Cc: Youling Tang , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org References: <20230224101013.26971-1-hejinyang@loongson.cn> <20230224101013.26971-7-hejinyang@loongson.cn> From: Jinyang He In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Bxb+TBtfhjn6o6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8E87Iv67AKxVW8JVWxJwCI42IY6I 8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU70PfDUUUU Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/2/24 18:43, Xi Ruoyao 写道: > On Fri, 2023-02-24 at 18:10 +0800, Jinyang He wrote: > > /* snip */ > >> diff --git a/arch/loongarch/kernel/entry.S >> b/arch/loongarch/kernel/entry.S >> index ca4651f91e73..4de6b31dc3bf 100644 >> --- a/arch/loongarch/kernel/entry.S >> +++ b/arch/loongarch/kernel/entry.S > /* snip */ > >> @@ -65,7 +65,7 @@ SYM_FUNC_START(handle_sys) >>         and             tp, tp, sp >> >>         move    a0, sp >> -       la_abs  ra, do_syscall >> +       la.pcrel        ra, do_syscall >>         jirl    ra, ra, 0 > bl do_syscall > >> >>         RESTORE_ALL_AND_RET >> diff --git a/arch/loongarch/kernel/genex.S >> b/arch/loongarch/kernel/genex.S >> index 8705a7661ce9..b6a74246d1c4 100644 >> --- a/arch/loongarch/kernel/genex.S >> +++ b/arch/loongarch/kernel/genex.S > /* snip */ > >> @@ -45,7 +45,7 @@ SYM_FUNC_START(handle_vint\idx) >>         LONG_S  t0, sp, PT_ERA >>  1:     move    a0, sp >>         move    a1, sp >> -       la_abs  t0, do_vint >> +       la.pcrel        t0, do_vint >>         jirl    ra, t0, 0 > bl do_vint > >>         RESTORE_ALL_AND_RET >>  SYM_FUNC_END(handle_vint\idx) >> @@ -76,7 +76,7 @@ SYM_FUNC_START(handle_\exception) >>         SAVE_ALL >>         build_prep_\prep >>         move    a0, sp >> -       la_abs  t0, do_\handler >> +       la.pcrel        t0, do_\handler >>         jirl    ra, t0, 0 > bl do_\handler > > /* snip */ > >> diff --git a/arch/loongarch/mm/tlbex.S b/arch/loongarch/mm/tlbex.S >> index 53321d3447a2..196d9bc870c5 100644 >> --- a/arch/loongarch/mm/tlbex.S >> +++ b/arch/loongarch/mm/tlbex.S >> @@ -41,7 +41,7 @@ SYM_FUNC_START(handle_tlb_protect\idx) >>         move            a1, zero >>         csrrd           a2, LOONGARCH_CSR_BADV >>         REG_S           a2, sp, PT_BVADDR >> -       la_abs          t0, do_page_fault >> +       la.pcrel        t0, do_page_fault >>         jirl            ra, t0, 0 > bl do_page_fault > > /* snip */ > >> @@ -190,7 +190,7 @@ SYM_FUNC_START(handle_tlb_load\idx) >>  5: /* nopage_tlb_load: */ >>         dbar            0 >>         csrrd           ra, EXCEPTION_KS2 >> -       la_abs          t0, tlb_do_page_fault_0 >> +       la.pcrel        t0, tlb_do_page_fault_0 >>         jr              t0 > b tlb_do_page_fault_0 > > /* snip */ > >> @@ -341,7 +341,7 @@ tlb_huge_update_store: >>  nopage_tlb_store: >>         dbar            0 >>         csrrd           ra, EXCEPTION_KS2 >> -       la_abs          t0, tlb_do_page_fault_1 >> +       la.pcrel        t0, tlb_do_page_fault_1 >>         jr              t0 > b tlb_do_page_fault_1 > > /* snip */ > >> @@ -490,7 +490,7 @@ tlb_huge_update_modify: >>  nopage_tlb_modify: >>         dbar            0 >>         csrrd           ra, EXCEPTION_KS2 >> -       la_abs          t0, tlb_do_page_fault_1 >> +       la.pcrel        t0, tlb_do_page_fault_1 >>         jr              t0 > b tlb_do_page_fault_1 > >>  SYM_FUNC_END(handle_tlb_modify) >>         .endm Thanks, I'll check other places, too. Jinyang