Re: [PATCH 1/2] Documentation: LoongArch: Document the syscall ABI

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

 



On Tue, Oct 18, 2022 at 06:04:56PM +0800, WANG Xuerui wrote:
> From: WANG Xuerui <git@xxxxxxxxxx>
> 

What description?

> diff --git a/Documentation/loongarch/syscall-abi.rst b/Documentation/loongarch/syscall-abi.rst
> new file mode 100644
> index 000000000000..6f63aa3cfc64
> --- /dev/null
> +++ b/Documentation/loongarch/syscall-abi.rst
> @@ -0,0 +1,36 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +===============================
> +Linux/LoongArch system call ABI
> +===============================
> +
> +This document describes the system call ABI of Linux/LoongArch.
> +As the kernel is 64-bit only for now, the description below assumes an LP64\*
> +calling convention.
> +
> +Syscall numbers and parameters
> +==============================
> +
> +Like with other recent architecture ports, for the most part Linux/LoongArch
> +reuses the asm-generic syscall numbers and parameters.
> +There are a few points worth mentioning though.
> +
> +* There is no ``renameat``. Use ``renameat2`` instead.
> +* There is no ``getrlimit`` or ``setrlimit``. Use ``prlimit64`` instead.
> +* There is no ``fstat`` or ``newfstatat``. Only ``statx`` is provided, and
> +  low-level components making their own syscalls are expected to be aware of
> +  this (and provide their own shims if necessary).
> +
> +Invocation
> +==========
> +
> +System calls are currently made with the ``syscall 0`` instruction.
> +Although the immediate field in the instruction is not checked at present,
> +it is strongly advised to keep it zeroed in case it is to be made meaningful
> +in the future.
> +
> +The system call number is placed in the register ``a7``.
> +Parameters, if present, are placed from ``a0`` through ``a6`` as needed,
> +as if calling a function with the respective arguments.
> +Upon return, ``a0`` contains the return value, and ``t0-t8`` should be
> +considered clobbered; all other registers are preserved.

The wording can be improved:

---- >8 ----

diff --git a/Documentation/loongarch/syscall-abi.rst b/Documentation/loongarch/syscall-abi.rst
index 6f63aa3cfc64e5..d05fa2e0211bbf 100644
--- a/Documentation/loongarch/syscall-abi.rst
+++ b/Documentation/loongarch/syscall-abi.rst
@@ -5,32 +5,32 @@ Linux/LoongArch system call ABI
 ===============================
 
 This document describes the system call ABI of Linux/LoongArch.
-As the kernel is 64-bit only for now, the description below assumes an LP64\*
-calling convention.
+As the kernel currently only supports 64-bit LoongArch architecture, the
+description below assumes LP64\* calling convention.
 
 Syscall numbers and parameters
 ==============================
 
-Like with other recent architecture ports, for the most part Linux/LoongArch
+Like ther recent architecture ports, for the most part Linux/LoongArch
 reuses the asm-generic syscall numbers and parameters.
-There are a few points worth mentioning though.
+There are a few limitations worth mentioning though.
 
 * There is no ``renameat``. Use ``renameat2`` instead.
 * There is no ``getrlimit`` or ``setrlimit``. Use ``prlimit64`` instead.
-* There is no ``fstat`` or ``newfstatat``. Only ``statx`` is provided, and
-  low-level components making their own syscalls are expected to be aware of
-  this (and provide their own shims if necessary).
+* There is no ``fstat`` or ``newfstatat``. Only ``statx`` is provided and
+  low-level components invoking their own syscalls are expected to be aware
+  of this (and provide their own shims if necessary).
 
 Invocation
 ==========
 
-System calls are currently made with the ``syscall 0`` instruction.
+System calls are currently invoked with the ``syscall 0`` instruction.
 Although the immediate field in the instruction is not checked at present,
-it is strongly advised to keep it zeroed in case it is to be made meaningful
+it is strongly advised to keep it zeroed in case the field has purposes
 in the future.
 
-The system call number is placed in the register ``a7``.
-Parameters, if present, are placed from ``a0`` through ``a6`` as needed,
-as if calling a function with the respective arguments.
-Upon return, ``a0`` contains the return value, and ``t0-t8`` should be
-considered clobbered; all other registers are preserved.
+The system call number is placed in the register ``a7``. Parameters, if
+present, are placed from ``a0`` through ``a6`` as needed, as if calling
+a function with respective arguments. Upon return, the return value is placed
+in ``a0`` and ``t0-t8`` should be considered clobbered; all other registers
+are preserved.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux