Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp163382imm; Fri, 5 Oct 2018 01:29:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV61JZ1TiCFZ09S/3/SxYZwgfKVErqYoAEqJNbnxEEB8BClaFfsDA1W7Nu0qFZZDUCYlkHDz8 X-Received: by 2002:a63:9507:: with SMTP id p7-v6mr9232817pgd.449.1538728148445; Fri, 05 Oct 2018 01:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538728148; cv=none; d=google.com; s=arc-20160816; b=NdjS2VMypLn97UNBD1/ZXVaOwrIxzVWSbLs+R1fsdYAnNPbJR/YRgquHCiC9bNFRIY 0XR47wJeDEwt9e3ZRlSYw4aNHHdQaET/ODlPthTkn/lbhcMn9bY/lTtaW3W/16huJQeN cbjq1XUqMzAIGCm/NHJVqgoGduF05l5nr4H3MTdIR9x5Mu7WhsO2U1UpckFLZOetUkrX FPGllAT4ckto9b/HXYRdPMTzhFAcdWWLt0XHZ/HNftC8jQQB03HiZkZMcN0PyxzD0Glb dJw9P9ZvUJuKK4ruuuOcqWsDmS/WUhKxM8uhv7XlfNaNWnfXHRcQYspMes+Fsyrpsc4I aKeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=igG7dmS2NUr5dLb9vDs4q2TBGcahkcWjhFhlwso3CQI=; b=A7155m6ctBmkEKkEmNDZ+SpfUEatY+Wti3T2KIpdsSJL21llCoEUiJtJzDacPDKPnw xi27d9rVrtEfaVWeFwK2VyoEBWDy0msi80zysHTsY5PaY+qCKEQS2XvYxiWJi/psrKk+ WSDcpTQoOv4vev0r+td5IbyqoZjLToFAcTvUyp6bTbuJFROUV3tAl2mRad0paW63BghC QaV6doE8auVZzv7lV7HRXeoDdFuERpDrdppNRssXNU0qa/cyQxwNz2QVnAvpsm4fKqu3 TGkkgsxLkb2dFArSRnjieg9zxW1TIL2gPNtJI2BguXfWItD/68I8W84RXiVL6XUgA/mN ZDVw== 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 d13-v6si7004191pgv.84.2018.10.05.01.28.51; Fri, 05 Oct 2018 01:29:08 -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 S1728298AbeJEP0B (ORCPT + 99 others); Fri, 5 Oct 2018 11:26:01 -0400 Received: from terminus.zytor.com ([198.137.202.136]:42203 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727236AbeJEP0B (ORCPT ); Fri, 5 Oct 2018 11:26:01 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w958RvEa3071662 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Oct 2018 01:27:57 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w958Rvhj3071659; Fri, 5 Oct 2018 01:27:57 -0700 Date: Fri, 5 Oct 2018 01:27:57 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Andy Lutomirski Message-ID: Cc: mingo@kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, luto@kernel.org, peterz@infradead.org Reply-To: peterz@infradead.org, luto@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org In-Reply-To: <3a7438f5fb2422ed881683d2ccffd7f987b2dc44.1538689401.git.luto@kernel.org> References: <3a7438f5fb2422ed881683d2ccffd7f987b2dc44.1538689401.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/vdso] x86/vdso: Remove "memory" clobbers in the vDSO syscall fallbacks Git-Commit-ID: 89fe0a1f1c694a3b0b3cfa8c0952d603753f36df X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 89fe0a1f1c694a3b0b3cfa8c0952d603753f36df Gitweb: https://git.kernel.org/tip/89fe0a1f1c694a3b0b3cfa8c0952d603753f36df Author: Andy Lutomirski AuthorDate: Thu, 4 Oct 2018 14:44:43 -0700 Committer: Ingo Molnar CommitDate: Fri, 5 Oct 2018 10:12:18 +0200 x86/vdso: Remove "memory" clobbers in the vDSO syscall fallbacks When a vDSO clock function falls back to the syscall, no special barriers or ordering is needed, and the syscall fallbacks don't clobber any memory that is not explicitly listed in the asm constraints. Remove the "memory" clobber. This causes minor changes to the generated code, but otherwise has no obvious performance impact. I think it's nice to have, though, since it may help the optimizer in the future. Signed-off-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3a7438f5fb2422ed881683d2ccffd7f987b2dc44.1538689401.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/entry/vdso/vclock_gettime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index b7ccbff26a3f..18c8a78d1ec9 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -45,7 +45,7 @@ notrace static long vdso_fallback_gettime(long clock, struct timespec *ts) long ret; asm ("syscall" : "=a" (ret), "=m" (*ts) : "0" (__NR_clock_gettime), "D" (clock), "S" (ts) : - "memory", "rcx", "r11"); + "rcx", "r11"); return ret; } @@ -62,7 +62,7 @@ notrace static long vdso_fallback_gettime(long clock, struct timespec *ts) "mov %%edx, %%ebx \n" : "=a" (ret), "=m" (*ts) : "0" (__NR_clock_gettime), [clock] "g" (clock), "c" (ts) - : "memory", "edx"); + : "edx"); return ret; }