Received: by 10.192.165.156 with SMTP id m28csp2354078imm; Thu, 12 Apr 2018 12:53:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+/oGKp6ScYL/v9zqoC1Wh6H1+buR7xF7TDRE5FSITlhdkRd4uYjPRiOB4W1S8CqmMr/fYI X-Received: by 2002:a17:902:b58e:: with SMTP id a14-v6mr2404703pls.175.1523562812595; Thu, 12 Apr 2018 12:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523562812; cv=none; d=google.com; s=arc-20160816; b=i51/uaEnK/BvOPGNQkLHwXmIegv41MwvNQyqhdWYznZ/MFfx7qlKso4iFA8l8kTyDQ +rpbQ8q8oKtxsAIbZu9861bAwGV4RJoLVR/xFZYSG/4HIQmM8dT8T3aW8hh/WICsraf5 fh8CsKtCLuARBxIn4ShOyChExmX9AQNmmtrYMWk6hO2WQRdKWPGCfVH5oXDLXb0DRqRo Ylvbo4t2PzESGGV/01YSzrbJcsaUTwWfmvjBJ0N1vjZkOGPRREJpHxOwUHSyVZKcSbdX yeDTQVVFH7X6i5qAPi7wraN7xUybWFZ/WptTEDUcDsBxi+HYIaU0JRk7d0Yog/Uc1I4v TXHw== 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=ZmwpW9ZgcNXBv8AUItjK5eZyJFqBK7txqO55+TzkgUw=; b=MmYoc2wq5FLMytYa4zzK1TqLJSq9x/m7XnGOdv8VPgosMKMLe6luhT2wLfWORvm++d axAA1Ge+HK2kWkVaQLHODuCY6tQLPa6b0PHrnDmsRRAT6WmOWCrIbC0r7bKUKuwGJt0j bh1UFGBmX67PPuziqWl2WMkukcJhj1XDZIJJ0FOpi/OhSMlRGpNAHZTVlVYyrvH44RHd BTFfm/tQTaEgjlvxxEcrP5Hw88Jo38+cxr2zdzlsmTkqbk5QcTqW3vrQcBo6Sg21koYE Zs/u5QRSzSGKQYQz67tQLYNJG3LVUy1SDsDYxU7VaEb6VFVx1wzqUn1It++1X5f+U98W 6Zpg== 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 92-v6si3914340pli.455.2018.04.12.12.53.18; Thu, 12 Apr 2018 12:53:32 -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 S1753507AbeDLT21 (ORCPT + 99 others); Thu, 12 Apr 2018 15:28:27 -0400 Received: from mail.efficios.com ([167.114.142.138]:45604 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753116AbeDLT2W (ORCPT ); Thu, 12 Apr 2018 15:28:22 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 0B3DD1B06BB; Thu, 12 Apr 2018 15:28:22 -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 WoSEixJ-wbvb; Thu, 12 Apr 2018 15:28:21 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id ACE621B06B3; Thu, 12 Apr 2018 15:28:21 -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 lWqvo0FVc0ez; Thu, 12 Apr 2018 15:28:21 -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 50B621B06A2; Thu, 12 Apr 2018 15:28:21 -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 , Mathieu Desnoyers Subject: [RFC PATCH for 4.18 06/23] x86: Wire up restartable sequence system call Date: Thu, 12 Apr 2018 15:27:43 -0400 Message-Id: <20180412192800.15708-7-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180412192800.15708-1-mathieu.desnoyers@efficios.com> References: <20180412192800.15708-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 2a5e99cff859..b76cbd25854f 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -391,3 +391,4 @@ 382 i386 pkey_free sys_pkey_free 383 i386 statx sys_statx 384 i386 arch_prctl sys_arch_prctl compat_sys_arch_prctl +385 i386 rseq sys_rseq diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 5aef183e2f85..3ad03495bbb9 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -339,6 +339,7 @@ 330 common pkey_alloc sys_pkey_alloc 331 common pkey_free sys_pkey_free 332 common statx sys_statx +333 common rseq sys_rseq # # x32-specific system call numbers start at 512 to avoid cache impact -- 2.11.0