[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8496571-6c44-40ff-b03b-799fb1764447@csgroup.eu>
Date: Tue, 28 Jan 2025 16:34:27 +0100
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Julian Vetter <julian@...er-limits.org>, Arnd Bergmann <arnd@...db.de>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Naveen N Rao <naveen@...nel.org>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc: Remove eieio in _memcpy_fromio
Le 28/01/2025 à 16:24, Christophe Leroy a écrit :
>
>
> Le 28/01/2025 à 16:07, Julian Vetter a écrit :
>> [Vous ne recevez pas souvent de courriers de julian@...er-limits.org.
>> Découvrez pourquoi ceci est important à https://aka.ms/
>> LearnAboutSenderIdentification ]
>>
>> On 1/28/25 15:16, Christophe Leroy wrote:
>>>
>>>
>>> Le 28/01/2025 à 14:57, Julian Vetter a écrit :
>>>> Remove the eieio() calls in _memcpy_fromio, to bring its implementation
>>>> closer to the one from lib/iomem_copy.c. These eieio() calls don't seem
>>>> to be necessary, because the _memcpy_toio completely omits them. Also
>>>> the legacy code from ppc was not doing them.
>>>
>>> What do you mean exactly by "legacy code" ?
>>>
>>> As far as I can see they were already there before commit 68a64357d15a
>>> ("[POWERPC] Merge 32 and 64 bits asm-powerpc/io.h"):
>>>
>>
>> With 'ppc' I was refering to 'include/asm-ppc/io.h'. But you're right,
>> when going back a bit, in the 'include/asm-powerpc/io.h' there are two
>> cases, one (eeh_memcpy_fromio) which does the the 'eieio', and a second,
>> i.e., 'iSeries_memcpy_fromio' which does a byte-wise copy. But in the
>> ppc code ('include/asm-ppc/io.h') there is a simple memcpy. I was
>> referring to this one. But my description is not very clear. Sorry for
>> that.
>
> But then is your change still valid ? Isn't there some corner case that
> still need it ? Is it a valid argument that because memcpy_toio()
> doesn't need it memcpy_fromio() doesn't need it either ?
I see that _insb(), _insw_ns() and _insl_ns() also have eieio() while
_outsb(), _outsw_ns() and _outsl_ns() don't. Why not change those as
well if you think eieio() is not needed ?
Powered by blists - more mailing lists