linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cacheflush.2: Document Architecture-specific variants
@ 2020-12-14 14:38 Alejandro Colomar
  2020-12-20 15:36 ` Ping: " Alejandro Colomar (man-pages)
  2020-12-20 20:54 ` Michael Kerrisk (man-pages)
  0 siblings, 2 replies; 4+ messages in thread
From: Alejandro Colomar @ 2020-12-14 14:38 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, libc-alpha

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---

Hi Michael,

Please apply this patch after
'[PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more
 portable alternative'.

Thanks,

Alex

 man2/cacheflush.2 | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
index fc35f1a0b..0761b429a 100644
--- a/man2/cacheflush.2
+++ b/man2/cacheflush.2
@@ -31,6 +31,10 @@ cacheflush \- flush contents of instruction and/or data cache
 .PP
 .BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
 .fi
+.PP
+.IR Note :
+On some architectures,
+there is no glibc wrapper for this system call; see NOTES.
 .SH DESCRIPTION
 .BR cacheflush ()
 flushes the contents of the indicated cache(s) for the
@@ -87,6 +91,44 @@ but nowadays, Linux provides a
 .BR cacheflush ()
 system call on some other architectures, but with different arguments.
 .SH NOTES
+.SS Architecture-specific variants
+Glibc provides a wrapper for this system call,
+with the prototype shown in SYNOPSIS,
+for the following architectures:
+ARC, CSKY, MIPS, and NIOS2.
+.PP
+On some other architectures,
+Linux provides this system call, with different arguments:
+.TP
+M68K:
+.PP
+.in +4n
+.EX
+.BI "int cacheflush(unsigned long " addr ", int " scope ", int " cache ,
+.BI "               unsigned long " len );
+.EE
+.in
+.TP
+SH:
+.PP
+.in +4n
+.EX
+.BI "int cacheflush(unsigned long " addr ", unsigned long " len ", int " op );
+.EE
+.in
+.TP
+NDS32:
+.PP
+.in +4n
+.EX
+.BI "int cacheflush(unsigned int " start ", unsigned int " end ", int " cache );
+.EE
+.in
+.PP
+On the above architectures,
+glibc does not provide a wrapper for this system call; call it using
+.BR syscall (2).
+.SS GCC alternative
 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 (),
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Ping: [PATCH] cacheflush.2: Document Architecture-specific variants
  2020-12-14 14:38 [PATCH] cacheflush.2: Document Architecture-specific variants Alejandro Colomar
@ 2020-12-20 15:36 ` Alejandro Colomar (man-pages)
  2020-12-20 20:54 ` Michael Kerrisk (man-pages)
  1 sibling, 0 replies; 4+ messages in thread
From: Alejandro Colomar (man-pages) @ 2020-12-20 15:36 UTC (permalink / raw)
  To: Michael Kerrisk, linux-man
  Cc: Vineet Gupta, linux-snps-arc, Heinrich Schuchardt, Guo Ren,
	linux-csky, Thomas Bogendoerfer, linux-mips, Nick Hu,
	Greentime Hu, Vincent Chen, libc-alpha, Dave Martin

Ping

On 12/14/20 3:38 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
> 
> Hi Michael,
> 
> Please apply this patch after
> '[PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more
>  portable alternative'.
> 
> Thanks,
> 
> Alex
> 
>  man2/cacheflush.2 | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
> index fc35f1a0b..0761b429a 100644
> --- a/man2/cacheflush.2
> +++ b/man2/cacheflush.2
> @@ -31,6 +31,10 @@ cacheflush \- flush contents of instruction and/or data cache
>  .PP
>  .BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
>  .fi
> +.PP
> +.IR Note :
> +On some architectures,
> +there is no glibc wrapper for this system call; see NOTES.
>  .SH DESCRIPTION
>  .BR cacheflush ()
>  flushes the contents of the indicated cache(s) for the
> @@ -87,6 +91,44 @@ but nowadays, Linux provides a
>  .BR cacheflush ()
>  system call on some other architectures, but with different arguments.
>  .SH NOTES
> +.SS Architecture-specific variants
> +Glibc provides a wrapper for this system call,
> +with the prototype shown in SYNOPSIS,
> +for the following architectures:
> +ARC, CSKY, MIPS, and NIOS2.
> +.PP
> +On some other architectures,
> +Linux provides this system call, with different arguments:
> +.TP
> +M68K:
> +.PP
> +.in +4n
> +.EX
> +.BI "int cacheflush(unsigned long " addr ", int " scope ", int " cache ,
> +.BI "               unsigned long " len );
> +.EE
> +.in
> +.TP
> +SH:
> +.PP
> +.in +4n
> +.EX
> +.BI "int cacheflush(unsigned long " addr ", unsigned long " len ", int " op );
> +.EE
> +.in
> +.TP
> +NDS32:
> +.PP
> +.in +4n
> +.EX
> +.BI "int cacheflush(unsigned int " start ", unsigned int " end ", int " cache );
> +.EE
> +.in
> +.PP
> +On the above architectures,
> +glibc does not provide a wrapper for this system call; call it using
> +.BR syscall (2).
> +.SS GCC alternative
>  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 (),
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cacheflush.2: Document Architecture-specific variants
  2020-12-14 14:38 [PATCH] cacheflush.2: Document Architecture-specific variants Alejandro Colomar
  2020-12-20 15:36 ` Ping: " Alejandro Colomar (man-pages)
@ 2020-12-20 20:54 ` Michael Kerrisk (man-pages)
  2020-12-21  8:32   ` Alejandro Colomar (man-pages)
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-12-20 20:54 UTC (permalink / raw)
  To: Alejandro Colomar, Dave Martin, Heinrich Schuchardt, linux-man
  Cc: mtk.manpages, Vineet Gupta, linux-snps-arc, Guo Ren, linux-csky,
	Thomas Bogendoerfer, linux-mips, Nick Hu, Greentime Hu,
	Vincent Chen, libc-alpha

Hi Alex

On 12/14/20 3:38 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
> 
> Hi Michael,
> 
> Please apply this patch after
> '[PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more
>  portable alternative'.

Thanks. Applied.

>  man2/cacheflush.2 | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
> index fc35f1a0b..0761b429a 100644
> --- a/man2/cacheflush.2
> +++ b/man2/cacheflush.2
> @@ -31,6 +31,10 @@ cacheflush \- flush contents of instruction and/or data cache
>  .PP
>  .BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
>  .fi
> +.PP
> +.IR Note :
> +On some architectures,
> +there is no glibc wrapper for this system call; see NOTES.
>  .SH DESCRIPTION
>  .BR cacheflush ()
>  flushes the contents of the indicated cache(s) for the
> @@ -87,6 +91,44 @@ but nowadays, Linux provides a
>  .BR cacheflush ()
>  system call on some other architectures, but with different arguments.
>  .SH NOTES
> +.SS Architecture-specific variants
> +Glibc provides a wrapper for this system call,
> +with the prototype shown in SYNOPSIS,
> +for the following architectures:
> +ARC, CSKY, MIPS, and NIOS2.
> +.PP
> +On some other architectures,
> +Linux provides this system call, with different arguments:
> +.TP
> +M68K:
> +.PP
> +.in +4n
> +.EX
> +.BI "int cacheflush(unsigned long " addr ", int " scope ", int " cache ,
> +.BI "               unsigned long " len );
> +.EE
> +.in

I made the formatting rather:

[[
.TP
M68K:
.nf
.BI "int cacheflush(unsigned long " addr ", int " scope ", int " cache ,
.BI "               unsigned long " len );
.fi
]]

That's for consistency wqith the SYNOPSIS sections, where .EX/.EE 
isn't used.

> +.TP
> +SH:
> +.PP
> +.in +4n
> +.EX
> +.BI "int cacheflush(unsigned long " addr ", unsigned long " len ", int " op );
> +.EE
> +.in
> +.TP
> +NDS32:
> +.PP
> +.in +4n
> +.EX
> +.BI "int cacheflush(unsigned int " start ", unsigned int " end ", int " cache );
> +.EE
> +.in
> +.PP
> +On the above architectures,
> +glibc does not provide a wrapper for this system call; call it using
> +.BR syscall (2).
> +.SS GCC alternative
>  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 (),


Cheers,

Michael



-- 
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] 4+ messages in thread

* Re: [PATCH] cacheflush.2: Document Architecture-specific variants
  2020-12-20 20:54 ` Michael Kerrisk (man-pages)
@ 2020-12-21  8:32   ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar (man-pages) @ 2020-12-21  8:32 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages), Dave Martin, Heinrich Schuchardt, linux-man
  Cc: Vineet Gupta, linux-snps-arc, Guo Ren, linux-csky,
	Thomas Bogendoerfer, linux-mips, Nick Hu, Greentime Hu,
	Vincent Chen, libc-alpha



On 12/20/20 9:54 PM, Michael Kerrisk (man-pages) wrote:
> Hi Alex
> 
> On 12/14/20 3:38 PM, Alejandro Colomar wrote:
>> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
>> ---
>>
>> Hi Michael,
>>
>> Please apply this patch after
>> '[PATCH v5] cacheflush.2: Document __builtin___clear_cache() as a more
>>  portable alternative'.
> 
> Thanks. Applied.
> 
>>  man2/cacheflush.2 | 42 ++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 42 insertions(+)
>>
>> diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
>> index fc35f1a0b..0761b429a 100644
>> --- a/man2/cacheflush.2
>> +++ b/man2/cacheflush.2
>> @@ -31,6 +31,10 @@ cacheflush \- flush contents of instruction and/or data cache
>>  .PP
>>  .BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
>>  .fi
>> +.PP
>> +.IR Note :
>> +On some architectures,
>> +there is no glibc wrapper for this system call; see NOTES.
>>  .SH DESCRIPTION
>>  .BR cacheflush ()
>>  flushes the contents of the indicated cache(s) for the
>> @@ -87,6 +91,44 @@ but nowadays, Linux provides a
>>  .BR cacheflush ()
>>  system call on some other architectures, but with different arguments.
>>  .SH NOTES
>> +.SS Architecture-specific variants
>> +Glibc provides a wrapper for this system call,
>> +with the prototype shown in SYNOPSIS,
>> +for the following architectures:
>> +ARC, CSKY, MIPS, and NIOS2.
>> +.PP
>> +On some other architectures,
>> +Linux provides this system call, with different arguments:
>> +.TP
>> +M68K:
>> +.PP
>> +.in +4n
>> +.EX
>> +.BI "int cacheflush(unsigned long " addr ", int " scope ", int " cache ,
>> +.BI "               unsigned long " len );
>> +.EE
>> +.in
> 
> I made the formatting rather:
> 
> [[
> .TP
> M68K:
> .nf
> .BI "int cacheflush(unsigned long " addr ", int " scope ", int " cache ,
> .BI "               unsigned long " len );
> .fi
> ]]
> 
> That's for consistency wqith the SYNOPSIS sections, where .EX/.EE 
> isn't used.

Ahh. Right!

Thanks,

Alex

> 
>> +.TP
>> +SH:
>> +.PP
>> +.in +4n
>> +.EX
>> +.BI "int cacheflush(unsigned long " addr ", unsigned long " len ", int " op );
>> +.EE
>> +.in
>> +.TP
>> +NDS32:
>> +.PP
>> +.in +4n
>> +.EX
>> +.BI "int cacheflush(unsigned int " start ", unsigned int " end ", int " cache );
>> +.EE
>> +.in
>> +.PP
>> +On the above architectures,
>> +glibc does not provide a wrapper for this system call; call it using
>> +.BR syscall (2).
>> +.SS GCC alternative
>>  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 (),
> 
> 
> Cheers,
> 
> Michael
> 
> 
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-21  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 14:38 [PATCH] cacheflush.2: Document Architecture-specific variants Alejandro Colomar
2020-12-20 15:36 ` Ping: " Alejandro Colomar (man-pages)
2020-12-20 20:54 ` Michael Kerrisk (man-pages)
2020-12-21  8:32   ` Alejandro Colomar (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).