2024-02-29 12:12:24

by Alexandre Ghiti

[permalink] [raw]
Subject: [PATCH v3 1/2] riscv: Remove superfluous smp_mb()

This memory barrier is not needed and not documented so simply remove
it.

Suggested-by: Andrea Parri <[email protected]>
Signed-off-by: Alexandre Ghiti <[email protected]>
Reviewed-by: Andrea Parri <[email protected]>
---
arch/riscv/kernel/patch.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/riscv/kernel/patch.c b/arch/riscv/kernel/patch.c
index 37e87fdcf6a0..0b5c16dfe3f4 100644
--- a/arch/riscv/kernel/patch.c
+++ b/arch/riscv/kernel/patch.c
@@ -239,7 +239,6 @@ static int patch_text_cb(void *data)
} else {
while (atomic_read(&patch->cpu_count) <= num_online_cpus())
cpu_relax();
- smp_mb();
}

return ret;
--
2.39.2



2024-03-04 19:55:21

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] riscv: Remove superfluous smp_mb()

On Thu, Feb 29, 2024 at 01:10:55PM +0100, Alexandre Ghiti wrote:
> This memory barrier is not needed and not documented so simply remove
> it.

This looks like it should be patch 2 in the series, not patch 1, as it
is cleanup rather than a fix that needs backporting.

>
> Suggested-by: Andrea Parri <[email protected]>
> Signed-off-by: Alexandre Ghiti <[email protected]>
> Reviewed-by: Andrea Parri <[email protected]>
> ---
> arch/riscv/kernel/patch.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/patch.c b/arch/riscv/kernel/patch.c
> index 37e87fdcf6a0..0b5c16dfe3f4 100644
> --- a/arch/riscv/kernel/patch.c
> +++ b/arch/riscv/kernel/patch.c
> @@ -239,7 +239,6 @@ static int patch_text_cb(void *data)
> } else {
> while (atomic_read(&patch->cpu_count) <= num_online_cpus())
> cpu_relax();
> - smp_mb();
> }
>
> return ret;
> --
> 2.39.2
>
>
> _______________________________________________
> linux-riscv mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-riscv


Attachments:
(No filename) (1.09 kB)
signature.asc (235.00 B)
Download all attachments

2024-04-17 01:29:36

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] riscv: Remove superfluous smp_mb()

On Mon, 04 Mar 2024 11:25:33 PST (-0800), Conor Dooley wrote:
> On Thu, Feb 29, 2024 at 01:10:55PM +0100, Alexandre Ghiti wrote:
>> This memory barrier is not needed and not documented so simply remove
>> it.
>
> This looks like it should be patch 2 in the series, not patch 1, as it
> is cleanup rather than a fix that needs backporting.

IIUC neither is actually a fix, as the other is only exposed by the
IOMMU driver and that's not upstream yet. So I'm just going to pick
these up on for-next.

>
>>
>> Suggested-by: Andrea Parri <[email protected]>
>> Signed-off-by: Alexandre Ghiti <[email protected]>
>> Reviewed-by: Andrea Parri <[email protected]>
>> ---
>> arch/riscv/kernel/patch.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/riscv/kernel/patch.c b/arch/riscv/kernel/patch.c
>> index 37e87fdcf6a0..0b5c16dfe3f4 100644
>> --- a/arch/riscv/kernel/patch.c
>> +++ b/arch/riscv/kernel/patch.c
>> @@ -239,7 +239,6 @@ static int patch_text_cb(void *data)
>> } else {
>> while (atomic_read(&patch->cpu_count) <= num_online_cpus())
>> cpu_relax();
>> - smp_mb();
>> }
>>
>> return ret;
>> --
>> 2.39.2
>>
>>
>> _______________________________________________
>> linux-riscv mailing list
>> [email protected]
>> http://lists.infradead.org/mailman/listinfo/linux-riscv