mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Julian Vetter" <julian@outer-limits.org>,
	"Andrew Morton" <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add io_sync stubs to generic IO memcpy/memset
Date: Mon, 27 Jan 2025 11:27:02 +0100	[thread overview]
Message-ID: <1db6ef22-453e-4d31-a643-8e6f84a025e4@app.fastmail.com> (raw)
In-Reply-To: <20250127100407.866238-1-julian@outer-limits.org>

On Mon, Jan 27, 2025, at 11:04, Julian Vetter wrote:
> The recently added IO memcpy and memset functions lack support for
> barriers or other sync functions before and/or after the transaction. To
> convert more architectures to use the generic IO memcpy and memset
> functions, add empty __pre_io_sync and __post_io_sync defines that can
> be overwritten by individual architectures if needed.
>
> Signed-off-by: Julian Vetter <julian@outer-limits.org>
> ---
>  lib/iomem_copy.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/lib/iomem_copy.c b/lib/iomem_copy.c
> index dec7eaea60e0..2e81182dd4d3 100644
> --- a/lib/iomem_copy.c
> +++ b/lib/iomem_copy.c
> @@ -9,6 +9,14 @@
>  #include <linux/types.h>
>  #include <linux/unaligned.h>
> 
> +#ifndef __pre_io_sync
> +#define __pre_io_sync
> +#endif
> +
> +#ifndef __post_io_sync
> +#define __post_io_sync
> +#endif

I think we should define what these barriers are supposed to
do exactly, and how they relate to the __io_br/__io_ar/__io_bw/__io_aw
ones include/asm-generic/io.h.

Depending on what the barriers are meant to do, we probably
want to either use the existing ones directly or use a similar
naming scheme.

     Arnd

  reply	other threads:[~2025-01-27 10:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 10:04 Julian Vetter
2025-01-27 10:27 ` Arnd Bergmann [this message]
2025-01-27 14:11   ` Julian Vetter
2025-01-27 15:48     ` Arnd Bergmann
2025-01-28  8:32       ` Julian Vetter
2025-01-28  9:14         ` Arnd Bergmann

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=1db6ef22-453e-4d31-a643-8e6f84a025e4@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=julian@outer-limits.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®