mbox series

[0/2] riscv: Add macro for multiple nop instructions

Message ID 20220607143059.1054074-1-heiko@sntech.de (mailing list archive)
Headers show
Series riscv: Add macro for multiple nop instructions | expand

Message

Heiko Stuebner June 7, 2022, 2:30 p.m. UTC
Some cases need multiple nop instructions and arm64 already has a
nice helper for not needing to write all of them out but instead
use a helper to add n nops.

So add a similar thing to riscv and convert the T-Head PMA
alternative to use it.


Heiko Stuebner (2):
  riscv: introduce nops and __nops macros for NOP sequences
  riscv: convert the t-head pbmt errata to use the __nops macro

 arch/riscv/include/asm/asm.h         | 15 +++++++++++++++
 arch/riscv/include/asm/barrier.h     |  2 ++
 arch/riscv/include/asm/errata_list.h |  8 +-------
 3 files changed, 18 insertions(+), 7 deletions(-)

Comments

Guo Ren June 8, 2022, 2:28 a.m. UTC | #1
Just a safe good coding convention point.

Reviewed-by: Guo Ren <guoren@kernel.org>

On Tue, Jun 7, 2022 at 10:31 PM Heiko Stuebner <heiko@sntech.de> wrote:
>
> Some cases need multiple nop instructions and arm64 already has a
> nice helper for not needing to write all of them out but instead
> use a helper to add n nops.
>
> So add a similar thing to riscv and convert the T-Head PMA
> alternative to use it.
>
>
> Heiko Stuebner (2):
>   riscv: introduce nops and __nops macros for NOP sequences
>   riscv: convert the t-head pbmt errata to use the __nops macro
>
>  arch/riscv/include/asm/asm.h         | 15 +++++++++++++++
>  arch/riscv/include/asm/barrier.h     |  2 ++
>  arch/riscv/include/asm/errata_list.h |  8 +-------
>  3 files changed, 18 insertions(+), 7 deletions(-)
>
> --
> 2.35.1
>
Palmer Dabbelt July 22, 2022, 2:16 a.m. UTC | #2
On Tue, 07 Jun 2022 07:30:57 PDT (-0700), heiko@sntech.de wrote:
> Some cases need multiple nop instructions and arm64 already has a
> nice helper for not needing to write all of them out but instead
> use a helper to add n nops.
>
> So add a similar thing to riscv and convert the T-Head PMA
> alternative to use it.
>
>
> Heiko Stuebner (2):
>   riscv: introduce nops and __nops macros for NOP sequences
>   riscv: convert the t-head pbmt errata to use the __nops macro
>
>  arch/riscv/include/asm/asm.h         | 15 +++++++++++++++
>  arch/riscv/include/asm/barrier.h     |  2 ++
>  arch/riscv/include/asm/errata_list.h |  8 +-------
>  3 files changed, 18 insertions(+), 7 deletions(-)

Thanks, these are on for-next.  I had to fix up some minor conflicts, but
hopefuly nothing went wrong.
Samuel Holland July 24, 2022, 5:24 p.m. UTC | #3
Hi Palmer,

On 7/21/22 9:16 PM, Palmer Dabbelt wrote:
> On Tue, 07 Jun 2022 07:30:57 PDT (-0700), heiko@sntech.de wrote:
>> Some cases need multiple nop instructions and arm64 already has a
>> nice helper for not needing to write all of them out but instead
>> use a helper to add n nops.
>>
>> So add a similar thing to riscv and convert the T-Head PMA
>> alternative to use it.
>>
>>
>> Heiko Stuebner (2):
>>   riscv: introduce nops and __nops macros for NOP sequences
>>   riscv: convert the t-head pbmt errata to use the __nops macro
>>
>>  arch/riscv/include/asm/asm.h         | 15 +++++++++++++++
>>  arch/riscv/include/asm/barrier.h     |  2 ++
>>  arch/riscv/include/asm/errata_list.h |  8 +-------
>>  3 files changed, 18 insertions(+), 7 deletions(-)
> 
> Thanks, these are on for-next.  I had to fix up some minor conflicts, but
> hopefuly nothing went wrong.

The conflicts are because the patch was sent on top of fixes, specifically
e83031564137 ("riscv: Fix ALT_THEAD_PMA's asm parameters"). Since you applied
this patch without pulling fixes in to for-next, now for-next conflicts with master.

Regards,
Samuel