linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>,
	Dave Martin <Dave.Martin@arm.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	linux-man@vger.kernel.org
Cc: Alejandro Colomar <alx.manpages@gmail.com>,
	Vineet Gupta <vgupta@synopsys.com>,
	linux-snps-arc@lists.infradead.org, Guo Ren <guoren@kernel.org>,
	linux-csky@vger.kernel.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-mips@vger.kernel.org, Nick Hu <nickhu@andestech.com>,
	Greentime Hu <green.hu@gmail.com>,
	Vincent Chen <deanbo422@gmail.com>,
	libc-alpha@sourceware.org
Subject: [PATCH] cacheflush.2: Document Architecture-specific variants
Date: Mon, 14 Dec 2020 15:38:53 +0100	[thread overview]
Message-ID: <20201214143852.16565-1-alx.manpages@gmail.com> (raw)

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


             reply	other threads:[~2020-12-14 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 14:38 Alejandro Colomar [this message]
2020-12-20 15:36 ` Ping: [PATCH] cacheflush.2: Document Architecture-specific variants Alejandro Colomar (man-pages)
2020-12-20 20:54 ` Michael Kerrisk (man-pages)
2020-12-21  8:32   ` Alejandro Colomar (man-pages)

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=20201214143852.16565-1-alx.manpages@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=Dave.Martin@arm.com \
    --cc=deanbo422@gmail.com \
    --cc=green.hu@gmail.com \
    --cc=guoren@kernel.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=mtk.manpages@gmail.com \
    --cc=nickhu@andestech.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vgupta@synopsys.com \
    --cc=xypron.glpk@gmx.de \
    /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;
as well as URLs for NNTP newsgroup(s).