From: Al Viro <viro@ZenIV.linux.org.uk>
To: Richard Henderson <rth@twiddle.net>
Cc: Firoz Khan <firoz.khan@linaro.org>,
linux-alpha@vger.kernel.org, ink@jurassic.park.msu.ru,
mattst88@gmail.com, y2038@lists.linaro.org,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
arnd@arndb.de, deepa.kernel@gmail.com
Subject: Re: [PATCH 3/6] alpha: Unify the not-implemented system call entry name
Date: Sat, 11 Aug 2018 16:07:31 +0100 [thread overview]
Message-ID: <20180811150731.GG6515@ZenIV.linux.org.uk> (raw)
In-Reply-To: <d223ad23-04ae-408f-2a73-d5fa641ad725@twiddle.net>
On Fri, Aug 10, 2018 at 09:10:04PM -0700, Richard Henderson wrote:
> On 08/10/2018 07:45 PM, Al Viro wrote:
> > BTW, seeing that it's your code - why was unop used in
> > alpha_ni_syscall? I don't remember the rules re pipeline
> > stalls; is it that some earlier variants prefer unop to
> > nop in such places? It's not that microoptimizing that
> > one makes any difference, but just out of curiosity -
> > would something like
> > lda $0, -ENOSYS
> > stq $sp, 0($sp) /* sp != 0 */
> > ret
> > do just as well there?
>
> Oh that. Well, unop is a "load" and pairs with everything
> on all cpus, where nop is an integer and doesn't always
> pair. So I got into the habit of using unop for everything.
>
> The extra nop was so that lda + unop // stq + ret paired up
> in in two cycles as opposed to lda /stall/ stq // ret in
> three cycles on ev4+ev5. ev6 didn't care. FWIW.
BTW, looking through old patches around entry.S, are you OK with this
one? Same kind of macro as that for fork/vfork/clone glue...
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index c64806a2daf5..828d641b4410 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -791,7 +791,7 @@ ret_from_kernel_thread:
\f
/*
* Special system calls. Most of these are special in that they either
- * have to play switch_stack games or in some way use the pt_regs struct.
+ * have to play switch_stack games.
*/
.macro fork_like name
@@ -812,35 +812,25 @@ fork_like fork
fork_like vfork
fork_like clone
+.macro sigreturn_like name
.align 4
- .globl sys_sigreturn
- .ent sys_sigreturn
-sys_sigreturn:
+ .globl sys_\name
+ .ent sys_\name
+sys_\name:
.prologue 0
lda $9, ret_from_straced
cmpult $26, $9, $9
lda $sp, -SWITCH_STACK_SIZE($sp)
- jsr $26, do_sigreturn
+ jsr $26, do_\name
bne $9, 1f
jsr $26, syscall_trace_leave
1: br $1, undo_switch_stack
br ret_from_sys_call
-.end sys_sigreturn
+.end sys_\name
+.endm
- .align 4
- .globl sys_rt_sigreturn
- .ent sys_rt_sigreturn
-sys_rt_sigreturn:
- .prologue 0
- lda $9, ret_from_straced
- cmpult $26, $9, $9
- lda $sp, -SWITCH_STACK_SIZE($sp)
- jsr $26, do_rt_sigreturn
- bne $9, 1f
- jsr $26, syscall_trace_leave
-1: br $1, undo_switch_stack
- br ret_from_sys_call
-.end sys_rt_sigreturn
+sigreturn_like sigreturn
+sigreturn_like rt_sigreturn
.align 4
.globl alpha_ni_syscall
next prev parent reply other threads:[~2018-08-11 15:07 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 10:23 [PATCH 0/6] System call table generation support Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-07-16 10:23 ` [PATCH 1/6] alpha: Move __IGNORE* entries to non uapi header Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-08-11 19:28 ` Al Viro
2018-08-11 19:28 ` Al Viro
2018-08-11 20:59 ` Michael Cree
2018-08-11 20:59 ` Michael Cree
2018-08-11 22:27 ` Arnd Bergmann
2018-08-11 22:27 ` Arnd Bergmann
2018-07-16 10:23 ` [PATCH 2/6] alpha: Add CONFIG_OSF4_COMPAT for compat syscall support Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-07-16 10:23 ` [PATCH 3/6] alpha: Unify the not-implemented system call entry name Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-08-11 0:04 ` Al Viro
2018-08-11 0:04 ` Al Viro
2018-08-11 2:31 ` Richard Henderson
2018-08-11 2:31 ` Richard Henderson
2018-08-11 2:45 ` Al Viro
2018-08-11 2:45 ` Al Viro
2018-08-11 4:10 ` Richard Henderson
2018-08-11 4:10 ` Richard Henderson
2018-08-11 15:07 ` Al Viro [this message]
2018-08-11 15:07 ` Al Viro
2018-08-11 15:24 ` Richard Henderson
2018-08-11 15:24 ` Richard Henderson
2018-07-16 10:23 ` [PATCH 4/6] alpha: Replace NR_SYSCALLS macro from asm/unistd.h Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-07-16 10:23 ` [PATCH 5/6] alpha: Add system call table generation support Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-07-16 10:23 ` [PATCH 6/6] alpha: uapi header and system call table file generation Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-07-16 16:23 ` kbuild test robot
2018-07-16 16:23 ` kbuild test robot
2018-07-16 14:09 ` [PATCH 0/6] System call table generation support Arnd Bergmann
2018-07-16 14:09 ` Arnd Bergmann
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=20180811150731.GG6515@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=arnd@arndb.de \
--cc=deepa.kernel@gmail.com \
--cc=firoz.khan@linaro.org \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
--cc=y2038@lists.linaro.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 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).