Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1200112imm; Sat, 11 Aug 2018 08:10:17 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy18lxOzKF8ozATXDFWjYSvzBKqsjnxFuicM+i5yJwnqdTCogW+8b6dLWLdXQyE4GdXgjh8 X-Received: by 2002:a63:7a43:: with SMTP id j3-v6mr10473409pgn.363.1534000217080; Sat, 11 Aug 2018 08:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534000217; cv=none; d=google.com; s=arc-20160816; b=yen3jDrjl4JQdJhHh7Yi75kiCuZt4LKr+fVra8lcbL93T0hJQS7LqvBJYzpTUlV5xZ E8PCzQF5IMt9vI+1MH5YrjffSsFVrui0cW9Cld2MXZDHZDkKRIvMgKRKITtcTcXQotHN pm7A73A4o2ALCBwOjgOBR1pvbFqfbC0+0U9467RdmedbgKIG7fOAD5NzzSfWoE6NAIfh LMeCQ2KIHqmIRjZSfkBreNbkdUnsvMrHuyJVGmuAgLUCFKrPG4mXnWtoiqolkL+t057m C2XiYgCGxZuQEmGhAFEYWOaUJpB36O65WsdGXo+OUQEb73w1pnsUzrQLmLchc9F/i9vm UHmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=rjV8cbYEvxVgq5j0Hwmz0ILIPk2aWYVb3/zxv/aZvEo=; b=Gl445QTWbIQSL7IapPZ8DFopO8svFwpOa0r+B5qnYONW8zN+QAnhIpVFsn/NpGL6L+ aQM4yMdgxEJ5MpRk8rsPRXNsr79U4X5/X6J+qvRWgA9xJIeEKIc2z291Mitu5iL7Lziv bdfI3Ewnv+ec85CsqCSAG5g9JDeejAWBOdFV4hKjUYbHd9fzxQxvZPBdvwrOn0RvcP1e IDwepbNDeAESj5waCUdpVtaH8x/7eKSYKvhyVNBc+J6j+rh9PNLCVQVErUrMVvVWn7xp O3+8tGGFuoIbJ6C8DGLPwHAbLdv1kGt4ly3Ig688ltcr5ehOArdExEDMyrULcBPE3dfn 4pwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62-v6si14537704pfb.218.2018.08.11.08.09.38; Sat, 11 Aug 2018 08:10:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbeHKRmG (ORCPT + 99 others); Sat, 11 Aug 2018 13:42:06 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:41426 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727348AbeHKRmG (ORCPT ); Sat, 11 Aug 2018 13:42:06 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1foVUJ-0005VS-Bf; Sat, 11 Aug 2018 15:07:31 +0000 Date: Sat, 11 Aug 2018 16:07:31 +0100 From: Al Viro To: Richard Henderson Cc: Firoz Khan , 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 Message-ID: <20180811150731.GG6515@ZenIV.linux.org.uk> References: <1531736638-15294-1-git-send-email-firoz.khan@linaro.org> <1531736638-15294-4-git-send-email-firoz.khan@linaro.org> <20180811000455.GC6515@ZenIV.linux.org.uk> <98937991-cefa-b7f3-11c3-12727b3159b1@twiddle.net> <20180811024553.GF6515@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: /* * 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