From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 427FA1D8DFE for ; Tue, 28 Jan 2025 15:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.17.235.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738079414; cv=none; b=Hrja+7N6dccwfkPeVTk3ZcsEo4lMzQoLftnIDigQCD92Y+iUCkbEJ6vAsQryUyf3711WenvjjGbxeG+F45vvgliOzfonZZnen0KtkdsyXb7o2aI3BOrjwQ8TKEaSn2h/KlpPjA5hFIP7HOx+9lMsH0awKCHd4s5mE7VExhKqFNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738079414; c=relaxed/simple; bh=n3I6xpHNEZAjjPxWU2D1BF4QfWFOjafNjWSQagW7d78=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=LPBumKha+pqWplEqJxNCiD43t1k0ZLIWSNb0spnBEYYuPOJKazdLwelFTocRt+o8ujiG6ktKBpGC+CEXDFfHk66esc7GnW8w0QM4+xejPAM1jh9k9awQ7UE66TqTs5QMr2Yf1qeeWrqFIrv3lxt88qICkTCq+TX1ck67/lv+tDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu; spf=pass smtp.mailfrom=csgroup.eu; arc=none smtp.client-ip=93.17.235.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=csgroup.eu Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4Yj8Tw0lR4z9sRr; Tue, 28 Jan 2025 16:34:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kzicH7zXDy_J; Tue, 28 Jan 2025 16:34:28 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4Yj8Tv74pxz9sPd; Tue, 28 Jan 2025 16:34:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E334E8B76C; Tue, 28 Jan 2025 16:34:27 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id h_r1tQnJyA_6; Tue, 28 Jan 2025 16:34:27 +0100 (CET) Received: from [192.168.235.99] (unknown [192.168.235.99]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7F88D8B763; Tue, 28 Jan 2025 16:34:27 +0100 (CET) Message-ID: Date: Tue, 28 Jan 2025 16:34:27 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] powerpc: Remove eieio in _memcpy_fromio From: Christophe Leroy To: Julian Vetter , Arnd Bergmann , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Naveen N Rao Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20250128135711.1625747-1-julian@outer-limits.org> <81ee3098-1e43-4b88-975a-d223bc2338e8@csgroup.eu> Content-Language: fr-FR In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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@outer-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 ?