All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [PATCH 2/2] cobalt/arm: document the syscall convention
Date: Tue, 25 May 2021 09:41:26 +0200	[thread overview]
Message-ID: <6b75920d-aef5-485c-6931-3b3e02f591df@siemens.com> (raw)
In-Reply-To: <87r1hvclst.fsf@xenomai.org>

On 25.05.21 09:30, Philippe Gerum wrote:
> 
> Jan Kiszka <jan.kiszka@siemens.com> writes:
> 
>> On 24.05.21 09:32, Philippe Gerum wrote:
>>> From: Philippe Gerum <rpm@xenomai.org>
>>>
>>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>>> ---
>>>  .../arm/include/asm/xenomai/uapi/syscall.h    | 31 ++++++++++++++++++-
>>>  1 file changed, 30 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/syscall.h b/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/syscall.h
>>> index c079a358c..9146b732a 100644
>>> --- a/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/syscall.h
>>> +++ b/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/syscall.h
>>> @@ -21,9 +21,38 @@
>>>  #ifndef _COBALT_ARM_ASM_UAPI_SYSCALL_H
>>>  #define _COBALT_ARM_ASM_UAPI_SYSCALL_H
>>>  
>>> +/*
>>> + * Argument marshalling for Cobalt syscalls:
>>> + *
>>> + * r7 := XENO_ARM_SYSCALL
>>> + * r0 := Cobalt syscall code (sc_cobalt_xx | __COBALT_SYSCALL_BIT)
>>> + * r1 := first argument
>>> + * r2 := second argument
>>> + * ...
>>> + * r5 := fifth argument
>>> + *
>>> + * r0 := <return value>
>>> + *
>>> + * This marshalling is common to the I-pipe and Dovetail-based
>>> + * configurations so that we have a single ABI convention for both,
>>> + * enabling us to have a single user build which does not depend on
>>> + * the pipeline type.  With Dovetail, CONFIG_IPIPE_COMPAT is enabled
>>> + * to allow this.
>>> + *
>>> + * __COBALT_SYSCALL_BIT is a generic marker for Cobalt system calls we
>>> + * use with all CPU architectures in common code, to distinguish them
>>> + * from native Linux syscalls. For this reason, it must be present in
>>> + * the Cobalt syscall code register (r0) as well.
>>
>> Could we please add the reason for why we have this deviation from the
>> kernel's ABI on ARM? One sentence is likely enough ("it makes things
>> much faster" or "needed because of limited free bits" or whatever), and
>> it would be a perfect place to drop it here.
>>
> 
> There is no reason. Just a fact of history.

That's good to hear: Time to clean up for 3.2. We are fine break ABIs on
major updates.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


  reply	other threads:[~2021-05-25  7:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  7:32 [PATCH 1/2] cobalt/vfile: seq_file seek index must progress Philippe Gerum
2021-05-24  7:32 ` [PATCH 2/2] cobalt/arm: document the syscall convention Philippe Gerum
2021-05-25  5:58   ` Jan Kiszka
2021-05-25  7:30     ` Philippe Gerum
2021-05-25  7:41       ` Jan Kiszka [this message]
2021-05-25  6:00 ` [PATCH 1/2] cobalt/vfile: seq_file seek index must progress Jan Kiszka

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=6b75920d-aef5-485c-6931-3b3e02f591df@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.