From: Andreas Schwab <schwab@suse.de>
To: Song Shuai <songshuaishuai@tinylab.org>
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, mick@ics.forth.gr, alex@ghiti.fr,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: kexec: Cleanup riscv_kexec_relocate
Date: Thu, 31 Aug 2023 09:38:38 +0200 [thread overview]
Message-ID: <mvmy1hr4q69.fsf@suse.de> (raw)
In-Reply-To: <FBD24A55B409E4DF+71a45adc-2e20-ea3c-a8ea-7341862991c6@tinylab.org> (Song Shuai's message of "Thu, 31 Aug 2023 14:55:54 +0800")
On Aug 31 2023, Song Shuai wrote:
> Hi, Andreas:
>
> 在 2023/8/30 15:24, Andreas Schwab 写道:
>> On Aug 30 2023, Song Shuai wrote:
>>
>>> @@ -52,21 +42,27 @@ SYM_CODE_START(riscv_kexec_relocate)
>>> * the start of the loop below so that we jump there in
>>> * any case.
>>> */
>>> - la s8, 1f
>>> - sub s8, s8, s7
>>> - csrw CSR_STVEC, s8
>>> + la s6, 1f
>>> + sub s6, s6, s4
>>> + csrw CSR_STVEC, s6
>>> +
>>> + /*
>>> + * With C-extension, here we get 42 Bytes and the next
>>> + * .align directive would pad zeros here up to 44 Bytes.
>>> + * So manually put a nop here to avoid zeros padding.
>>> + */
>>> + nop
>>> /* Process entries in a loop */
>>> .align 2
>> While you are at it, I'd suggest being explicit about .palign
>> vs. .balign.
>>
> How about this commemt:
My suggestion is to change .align 2 in the last line to .palign 2 as
part of the cleanup. The meaning of .align is target dependent, and
someone not familiar with RISC-V may misinterpret it.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2023-08-31 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 6:34 [PATCH] riscv: kexec: Cleanup riscv_kexec_relocate Song Shuai
2023-08-30 7:24 ` Andreas Schwab
2023-08-31 6:55 ` Song Shuai
2023-08-31 7:38 ` Andreas Schwab [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=mvmy1hr4q69.fsf@suse.de \
--to=schwab@suse.de \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mick@ics.forth.gr \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=songshuaishuai@tinylab.org \
/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;
as well as URLs for NNTP newsgroup(s).