Received: by 10.192.165.148 with SMTP id m20csp4296027imm; Mon, 30 Apr 2018 15:49:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpOTRw/kqO2tZ70CIhgI6QP+qdxKs+CYmpBedo+oAaflviPJE/crqqsCI6SRnKDDqFbJsnI X-Received: by 2002:a63:b70b:: with SMTP id t11-v6mr11013613pgf.193.1525128566106; Mon, 30 Apr 2018 15:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525128566; cv=none; d=google.com; s=arc-20160816; b=k9CNWgOEsnU4bhAaG6YZOtuBpJRHBroKzXSg2+X5zX2/59lg0QUvWQXDnVGGfsJX6B zyPSyZdxvZN4HrJ5Ii/c3fvwXsRITDcSXqADGThN1egTXnrKcmrsVS5jEYqXUAIxGkaA J9Zfg8sOSclkIwB2/LhVzXfuQMSN6yDW9cmJ5/le2W5nVEthNX4PFFlewOdjNpWci+Ab HN6pVbVPdSZyYGr5ewP7/yvPxqX6yOoA7VW9MNTMRCDjPUmNmNTZ7mjTHoAdckEi8y7x EGhNd54WOOmAq8B24N9Q21onYmY5VNapARriniYTV7r8DTK7PEcQAzk6DliVA0W9DrqF uJBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=M35xV+DUFkd8FnXltDtxr5TSF4C9An0ZWLu5CIuqCUU=; b=EQu8pNVqBq8F0iYRNzYK3pPLJOM8p5mL6m5rALInbK2iPUyB/Y5id3mljSWh5IWLW+ FUIxA1w21QEGFHf3WHIFoVHiaCnwzBg8FkBDq8kqFrO7WcmLTl1y9WtIwuo3jjSyCzjq aksL3iGdBrXWvgJZSJHVTPRmNptr/jT4mHesxnEHr9nJC02GVaEpUqaqQ/YsytR+i734 ZoBkQCwo6OKIKahIW5YZUsCPDgs6/pflDuZhzlt8M687Id9nLDtH3/xzSqmRttUumFC9 VC3Y/TPlDWFDvTIcQ5+K0S3KG3jhmVqfRrehX1LMYxQVrzgoRi2VGsdso8cXV2MobGnE l2gQ== 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 p73si5432262pfk.275.2018.04.30.15.49.12; Mon, 30 Apr 2018 15:49:26 -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 S1755711AbeD3WrX (ORCPT + 99 others); Mon, 30 Apr 2018 18:47:23 -0400 Received: from mail.efficios.com ([167.114.142.138]:53032 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755416AbeD3Wop (ORCPT ); Mon, 30 Apr 2018 18:44:45 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 33B301A62E6; Mon, 30 Apr 2018 18:44:45 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id MIe48mU3cs0w; Mon, 30 Apr 2018 18:44:44 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id BEDF51A62CA; Mon, 30 Apr 2018 18:44:44 -0400 (EDT) X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id N-_eA9yXO638; Mon, 30 Apr 2018 18:44:44 -0400 (EDT) Received: from thinkos.internal.efficios.com (192-222-157-41.qc.cable.ebox.net [192.222.157.41]) by mail.efficios.com (Postfix) with ESMTPSA id 5E34B1A62AD; Mon, 30 Apr 2018 18:44:44 -0400 (EDT) From: Mathieu Desnoyers To: Peter Zijlstra , "Paul E . McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Paul Turner , Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , Steven Rostedt , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Joel Fernandes , Mathieu Desnoyers Subject: [PATCH 06/14] x86: Wire up restartable sequence system call Date: Mon, 30 Apr 2018 18:44:25 -0400 Message-Id: <20180430224433.17407-7-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180430224433.17407-1-mathieu.desnoyers@efficios.com> References: <20180430224433.17407-1-mathieu.desnoyers@efficios.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wire up the rseq system call on x86 32/64. This provides an ABI improving the speed of a user-space getcpu operation on x86 by removing the need to perform a function call, "lsl" instruction, or system call on the fast path, as well as improving the speed of user-space operations on per-cpu data. Signed-off-by: Mathieu Desnoyers Reviewed-by: Thomas Gleixner CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Molnar CC: "H. Peter Anvin" CC: Ben Maurer CC: Steven Rostedt CC: "Paul E. McKenney" CC: Josh Triplett CC: Linus Torvalds CC: Andrew Morton CC: Boqun Feng CC: linux-api@vger.kernel.org --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index d6b27dab1b30..db346da64947 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -396,3 +396,4 @@ 382 i386 pkey_free sys_pkey_free __ia32_sys_pkey_free 383 i386 statx sys_statx __ia32_sys_statx 384 i386 arch_prctl sys_arch_prctl __ia32_compat_sys_arch_prctl +385 i386 rseq sys_rseq __ia32_sys_rseq diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 4dfe42666d0c..41b082b125c3 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -341,6 +341,7 @@ 330 common pkey_alloc __x64_sys_pkey_alloc 331 common pkey_free __x64_sys_pkey_free 332 common statx __x64_sys_statx +333 common rseq __x64_sys_rseq # # x32-specific system call numbers start at 512 to avoid cache impact -- 2.11.0