* [PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative
[not found] <e2424619-2a5a-a44a-2dc0-a16310725250@gmail.com>
@ 2020-12-14 11:43 ` Alejandro Colomar
2020-12-14 12:00 ` Heinrich Schuchardt
2020-12-15 13:30 ` [PATCH v6] " Alejandro Colomar
1 sibling, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2020-12-14 11:43 UTC (permalink / raw)
To: Michael Kerrisk, Dave Martin, Heinrich Schuchardt, linux-man
Cc: Alejandro Colomar, Vineet Gupta, linux-snps-arc, Guo Ren,
linux-csky, Thomas Bogendoerfer, linux-mips, Nick Hu,
Greentime Hu, Vincent Chen, gcc-patches, cfe-users, cfe-dev
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/cacheflush.2 | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
index aba625721..7a2eed506 100644
--- a/man2/cacheflush.2
+++ b/man2/cacheflush.2
@@ -86,6 +86,30 @@ On Linux, this call first appeared on the MIPS architecture,
but nowadays, Linux provides a
.BR cacheflush ()
system call on some other architectures, but with different arguments.
+.SH NOTES
+Unless you need the finer grained control that this system call provides,
+you probably want to use the GCC built-in function
+.BR __builtin___clear_cache (),
+which provides a portable interface
+across platforms supported by GCC and compatible compilers:
+.PP
+.in +4n
+.EX
+.BI "void __builtin___clear_cache(void *" begin ", void *" end );
+.EE
+.in
+.PP
+On platforms that don't require instruction cache flushes,
+.BR __builtin___clear_cache ()
+has no effect.
+.PP
+.IR Note :
+Until GCC 9.1.0,
+the prototype for this built-in function used
+.I char *
+instead of
+.I void *
+for the parameters.
.SH BUGS
Linux kernels older than version 2.6.11 ignore the
.I addr
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative
2020-12-14 11:43 ` [PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative Alejandro Colomar
@ 2020-12-14 12:00 ` Heinrich Schuchardt
0 siblings, 0 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2020-12-14 12:00 UTC (permalink / raw)
To: Alejandro Colomar, Michael Kerrisk, Dave Martin, linux-man
Cc: Vineet Gupta, linux-snps-arc, Guo Ren, linux-csky,
Thomas Bogendoerfer, linux-mips, Nick Hu, Greentime Hu,
Vincent Chen, gcc-patches, cfe-users, cfe-dev
On 12/14/20 12:43 PM, Alejandro Colomar wrote:
> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> man2/cacheflush.2 | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
> index aba625721..7a2eed506 100644
> --- a/man2/cacheflush.2
> +++ b/man2/cacheflush.2
> @@ -86,6 +86,30 @@ On Linux, this call first appeared on the MIPS architecture,
> but nowadays, Linux provides a
> .BR cacheflush ()
> system call on some other architectures, but with different arguments.
> +.SH NOTES
> +Unless you need the finer grained control that this system call provides,
> +you probably want to use the GCC built-in function
> +.BR __builtin___clear_cache (),
> +which provides a portable interface
> +across platforms supported by GCC and compatible compilers:
> +.PP
> +.in +4n
> +.EX
> +.BI "void __builtin___clear_cache(void *" begin ", void *" end );
> +.EE
> +.in
> +.PP
> +On platforms that don't require instruction cache flushes,
> +.BR __builtin___clear_cache ()
> +has no effect.
> +.PP
> +.IR Note :
> +Until GCC 9.1.0,
> +the prototype for this built-in function used
> +.I char *
> +instead of
> +.I void *
> +for the parameters.
> .SH BUGS
> Linux kernels older than version 2.6.11 ignore the
> .I addr
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v6] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative
[not found] <e2424619-2a5a-a44a-2dc0-a16310725250@gmail.com>
2020-12-14 11:43 ` [PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative Alejandro Colomar
@ 2020-12-15 13:30 ` Alejandro Colomar
2020-12-20 15:35 ` Ping: " Alejandro Colomar (man-pages)
2020-12-20 20:48 ` Michael Kerrisk (man-pages)
1 sibling, 2 replies; 5+ messages in thread
From: Alejandro Colomar @ 2020-12-15 13:30 UTC (permalink / raw)
To: Michael Kerrisk, Dave Martin, Heinrich Schuchardt, linux-man,
Martin Sebor
Cc: Alejandro Colomar, Vineet Gupta, linux-snps-arc, Guo Ren,
linux-csky, Thomas Bogendoerfer, linux-mips, Nick Hu,
Greentime Hu, Vincent Chen, gcc-patches, cfe-users, cfe-dev
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Martin Sebor <msebor@redhat.com>
Cc: Dave Martin <Dave.Martin@arm.com>
---
v6:
- GCC has always exposed 'void *', as Martin Sebor noted.
It's Clang (and maybe others) that (following GCC's docs)
exposed 'char *'.
man2/cacheflush.2 | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
index aba625721..7a2eed506 100644
--- a/man2/cacheflush.2
+++ b/man2/cacheflush.2
@@ -86,6 +86,30 @@ On Linux, this call first appeared on the MIPS architecture,
but nowadays, Linux provides a
.BR cacheflush ()
system call on some other architectures, but with different arguments.
+.SH NOTES
+Unless you need the finer grained control that this system call provides,
+you probably want to use the GCC built-in function
+.BR __builtin___clear_cache (),
+which provides a portable interface
+across platforms supported by GCC and compatible compilers:
+.PP
+.in +4n
+.EX
+.BI "void __builtin___clear_cache(void *" begin ", void *" end );
+.EE
+.in
+.PP
+On platforms that don't require instruction cache flushes,
+.BR __builtin___clear_cache ()
+has no effect.
+.PP
+.IR Note :
+On some GCC-compatible compilers,
+the prototype for this built-in function uses
+.I char *
+instead of
+.I void *
+for the parameters.
.SH BUGS
Linux kernels older than version 2.6.11 ignore the
.I addr
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Ping: [PATCH v6] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative
2020-12-15 13:30 ` [PATCH v6] " Alejandro Colomar
@ 2020-12-20 15:35 ` Alejandro Colomar (man-pages)
2020-12-20 20:48 ` Michael Kerrisk (man-pages)
1 sibling, 0 replies; 5+ messages in thread
From: Alejandro Colomar (man-pages) @ 2020-12-20 15:35 UTC (permalink / raw)
To: Michael Kerrisk, linux-man
Cc: Vineet Gupta, Dave Martin, linux-snps-arc, Martin Sebor, Guo Ren,
linux-csky, Thomas Bogendoerfer, Heinrich Schuchardt, linux-mips,
Nick Hu, Greentime Hu, Vincent Chen, gcc-patches, cfe-users,
cfe-dev
Ping
On 12/15/20 2:30 PM, Alejandro Colomar wrote:
> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> Cc: Martin Sebor <msebor@redhat.com>
> Cc: Dave Martin <Dave.Martin@arm.com>
> ---
>
> v6:
> - GCC has always exposed 'void *', as Martin Sebor noted.
> It's Clang (and maybe others) that (following GCC's docs)
> exposed 'char *'.
>
> man2/cacheflush.2 | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
> index aba625721..7a2eed506 100644
> --- a/man2/cacheflush.2
> +++ b/man2/cacheflush.2
> @@ -86,6 +86,30 @@ On Linux, this call first appeared on the MIPS architecture,
> but nowadays, Linux provides a
> .BR cacheflush ()
> system call on some other architectures, but with different arguments.
> +.SH NOTES
> +Unless you need the finer grained control that this system call provides,
> +you probably want to use the GCC built-in function
> +.BR __builtin___clear_cache (),
> +which provides a portable interface
> +across platforms supported by GCC and compatible compilers:
> +.PP
> +.in +4n
> +.EX
> +.BI "void __builtin___clear_cache(void *" begin ", void *" end );
> +.EE
> +.in
> +.PP
> +On platforms that don't require instruction cache flushes,
> +.BR __builtin___clear_cache ()
> +has no effect.
> +.PP
> +.IR Note :
> +On some GCC-compatible compilers,
> +the prototype for this built-in function uses
> +.I char *
> +instead of
> +.I void *
> +for the parameters.
> .SH BUGS
> Linux kernels older than version 2.6.11 ignore the
> .I addr
>
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative
2020-12-15 13:30 ` [PATCH v6] " Alejandro Colomar
2020-12-20 15:35 ` Ping: " Alejandro Colomar (man-pages)
@ 2020-12-20 20:48 ` Michael Kerrisk (man-pages)
1 sibling, 0 replies; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-12-20 20:48 UTC (permalink / raw)
To: Alejandro Colomar, Dave Martin, Heinrich Schuchardt, linux-man,
Martin Sebor
Cc: mtk.manpages, Vineet Gupta, linux-snps-arc, Guo Ren, linux-csky,
Thomas Bogendoerfer, linux-mips, Nick Hu, Greentime Hu,
Vincent Chen, gcc-patches, cfe-users, cfe-dev
On 12/15/20 2:30 PM, Alejandro Colomar wrote:
> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> Cc: Martin Sebor <msebor@redhat.com>
> Cc: Dave Martin <Dave.Martin@arm.com>
> ---
>
> v6:
> - GCC has always exposed 'void *', as Martin Sebor noted.
> It's Clang (and maybe others) that (following GCC's docs)
> exposed 'char *'.
Thanks, Alex. Patch applied.
Cheers,
Michael
> man2/cacheflush.2 | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
> index aba625721..7a2eed506 100644
> --- a/man2/cacheflush.2
> +++ b/man2/cacheflush.2
> @@ -86,6 +86,30 @@ On Linux, this call first appeared on the MIPS architecture,
> but nowadays, Linux provides a
> .BR cacheflush ()
> system call on some other architectures, but with different arguments.
> +.SH NOTES
> +Unless you need the finer grained control that this system call provides,
> +you probably want to use the GCC built-in function
> +.BR __builtin___clear_cache (),
> +which provides a portable interface
> +across platforms supported by GCC and compatible compilers:
> +.PP
> +.in +4n
> +.EX
> +.BI "void __builtin___clear_cache(void *" begin ", void *" end );
> +.EE
> +.in
> +.PP
> +On platforms that don't require instruction cache flushes,
> +.BR __builtin___clear_cache ()
> +has no effect.
> +.PP
> +.IR Note :
> +On some GCC-compatible compilers,
> +the prototype for this built-in function uses
> +.I char *
> +instead of
> +.I void *
> +for the parameters.
> .SH BUGS
> Linux kernels older than version 2.6.11 ignore the
> .I addr
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-21 5:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <e2424619-2a5a-a44a-2dc0-a16310725250@gmail.com>
2020-12-14 11:43 ` [PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more portable alternative Alejandro Colomar
2020-12-14 12:00 ` Heinrich Schuchardt
2020-12-15 13:30 ` [PATCH v6] " Alejandro Colomar
2020-12-20 15:35 ` Ping: " Alejandro Colomar (man-pages)
2020-12-20 20:48 ` Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).