[PATCH v2] riscv_flush_icache.2: Create page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



riscv_flush_icache has been present in syscall.2, but had no page for
itself. Add the page for this syscall.

The syscall is named riscv_flush_icache, but the glibc function is
named __riscv_flush_icache. To handle this, name the syscall page
riscv_flush_icache.2 and point to the libc page __riscv_flush_icache.3.

Signed-off-by: Charlie Jenkins <charlie@xxxxxxxxxxxx>
---
Changes in v2:
- Correct text referring to title of page to be __riscv_flush_icache
- Place \- on new linie
- Drop "int" from "unsigned long int"
- Use semantic newlines
- Link to v1: https://lore.kernel.org/r/20240628-flush_icache-v1-1-76a01584f796@xxxxxxxxxxxx
---
 man/man2/riscv_flush_icache.2   |  1 +
 man/man3/__riscv_flush_icache.3 | 46 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/man/man2/riscv_flush_icache.2 b/man/man2/riscv_flush_icache.2
new file mode 100644
index 000000000..a6d807e9d
--- /dev/null
+++ b/man/man2/riscv_flush_icache.2
@@ -0,0 +1 @@
+.so man3/__riscv_flush_icache.3
diff --git a/man/man3/__riscv_flush_icache.3 b/man/man3/__riscv_flush_icache.3
new file mode 100644
index 000000000..7d3aa6e40
--- /dev/null
+++ b/man/man3/__riscv_flush_icache.3
@@ -0,0 +1,46 @@
+.\" Copyright (C) Rivos Inc., 2024
+.\"
+.\" SPDX-License-Identifier: GPL-2.0-or-later
+.\"
+.TH __riscv_flush_icache 3 (date) "Linux man-pages (unreleased)"
+.SH NAME
+__riscv_flush_icache
+\- Flush icaches on RISC-V
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <sys/cachectl.h>
+.P
+.B int __riscv_flush_icache(void *start, void *end, \
+unsigned long flags);
+.fi
+.SH DESCRIPTION
+.BR __riscv_flush_icache ()
+enforces ordering between stores and instruction cache fetches.
+The range of addresses over which ordering is enforced is specified by
+.I start
+and
+.IR end .
+The
+.I flags
+argument controls the extent of this ordering,
+with the default behavior
+(a
+.I flags
+value of 0)
+being to enforce the fence on
+all threads in the current process.
+Setting the
+.B SYS_RISCV_FLUSH_ICACHE_LOCAL
+bit allows users to indicate that enforcing ordering on
+only the current thread is necessary.
+All other flag bits are reserved.
+.SH STANDARDS
+Linux on RISC-V.
+.SH HISTORY
+Linux 4.15.
+glibc 2.27.
+.SH SEE ALSO
+.BR syscall (2)

---
base-commit: d0621648b4b5a356e86cea23e842f2591461f0cf
change-id: 20240628-flush_icache-bf5a1f88032e

Best regards,
-- 
Charlie Jenkins <charlie@xxxxxxxxxxxx>





[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux