mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jinyang He <hejinyang@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>
Cc: Youling Tang <tangyouling@loongson.cn>,
	loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] LoongArch: Clean up la_abs macro
Date: Fri, 24 Feb 2023 21:04:03 +0800	[thread overview]
Message-ID: <d5e96b4f-ac51-9d56-fcf3-b4f18779b76e@loongson.cn> (raw)
In-Reply-To: <cc9fe98d7e157c3e4bdf82d92e9ea368b894ce00.camel@xry111.site>

在 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


      reply	other threads:[~2023-02-24 13:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 10:10 [PATCH 0/6] Drop the per-node-mode exception handlers Jinyang He
2023-02-24 10:10 ` [PATCH 1/6] LoongArch: Rename handle_syscall to handle_sys Jinyang He
2023-02-24 10:10 ` [PATCH 2/6] LoongArch: Move the content defined by SYM_DATA to data or rodata section Jinyang He
2023-02-24 10:10 ` [PATCH 3/6] LoongArch: Create a exception handlers section Jinyang He
2023-02-24 10:10 ` [PATCH 4/6] LoongArch: Drop pernode exception handlers Jinyang He
2023-02-24 10:10 ` [PATCH 5/6] LoongArch: Fix up the prologue unwinder unwind exception frame Jinyang He
2023-02-24 10:10 ` [PATCH 6/6] LoongArch: Clean up la_abs macro Jinyang He
2023-02-24 10:43   ` Xi Ruoyao
2023-02-24 13:04     ` Jinyang He [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5e96b4f-ac51-9d56-fcf3-b4f18779b76e@loongson.cn \
    --to=hejinyang@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=tangyouling@loongson.cn \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®