Received: by 10.213.65.68 with SMTP id h4csp384942imn; Sat, 17 Mar 2018 07:31:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELtpC1BiVwFPwa+cZdmgzOkqBTpqLPcKn8QcoQrOasDo1E8QJyoIKBWM9dIpXjZyC1nQwIzb X-Received: by 2002:a17:902:c24:: with SMTP id 33-v6mr6007468pls.88.1521297094340; Sat, 17 Mar 2018 07:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521297094; cv=none; d=google.com; s=arc-20160816; b=SxOV9go3BWtw9elI3YQJ9XVSIWD+yXkiOitSLtJm0qw8AjK832SE3UUXTjRMtbm671 Yf4Inypqr/fju8CIwC7/TYMb2QiGTc/ddu3FiSSXnpY3fTBNNtDa5OSYSAjDPezdXZP2 1Q9ffFMG7Yzqi9bRJI1aQopz7L+dmvdfozZ0ZHZ/ZaHrxtXNDl2anuVY0+2ait30zWFk 2a6E325X9sid11izApoehYWFPwiLioqQEnD+G8JK/ZrT5A8xFkZ4Vo+apqIQsK7IwjpS fI0EhHvGlvuiQVri/RG4FHRj94O2ejgZWqrz3GxtVmElJ18V+7nEopsU6gTDlbwkRDdL KKCw== 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:dkim-signature:arc-authentication-results; bh=/YyeOt3AKK6t79/P2CKG8qakkroqPTJMqB8fetK8r00=; b=AHY6CiDvoNq9j3JRr5Iszb+Gl/9AV9MFO+g7FwO3ekqqvnJrhCBPTjip4/N3jzRLrl Wp60TvfhOFUERkHGiL7EkAwmK8rZcu4obIW+r8m9UA55nCkMNfXD7N4kXVwNt5l1eS84 4gaE2n0dBcdre1fZnA2Fy2xp+ePtCf31Xv5JaL18BSFfQQb2aj0r9KyDbIfq4TnvyvCw 5QAmcoekRZv/71W8WQtFvGy2aj8zjV3KiEVGMaEjwdeS6X3D/ItdAiGln+N5HbSM9ZaB Ik1u7HmgP2uEaolfpyLgCIvje7W9dWhTvNnDSRPPtM2Bl3ISRt6Kd4P4dp3ZtBfl5wUE +F2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s03WDPIh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u137si2885473pgc.295.2018.03.17.07.31.20; Sat, 17 Mar 2018 07:31:34 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s03WDPIh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753389AbeCQOaI (ORCPT + 99 others); Sat, 17 Mar 2018 10:30:08 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:54308 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbeCQO3x (ORCPT ); Sat, 17 Mar 2018 10:29:53 -0400 Received: by mail-wm0-f68.google.com with SMTP id h76so7994948wme.4 for ; Sat, 17 Mar 2018 07:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/YyeOt3AKK6t79/P2CKG8qakkroqPTJMqB8fetK8r00=; b=s03WDPIh7VsvA7uF4UbHJqlifzerM0veumuY9mkY0brQDJNd2pL1g5H/NO/gAXSb/l S6wGAaWv57xWKY/7ZXQbU9sS5Lp25Vr6QodOGR+lzklWe9z6Y6gF+Wjaay45FtO5o6oY pLXe1nHP5D9br2+l861k/XN9lmGyqDJXAlZL2Esc7tanrrZla3QZgRlVNCyXqHF22TOn cUqDl+XMndfyL/R/TE/kZz16pz+Ra3HyTE/Bnmx0E3fYydwuxb1uRV8S0QnFDIKWecDQ Zhy8Aferr6n9PZdQJUawRWv4bfQUS/C3pl2OnsubCw1jpjG5lt6QaCHNODJ+S5Zg4oHQ Op/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/YyeOt3AKK6t79/P2CKG8qakkroqPTJMqB8fetK8r00=; b=pmAlRHHf269lK5dqoN9fzQk9x3rz6cCoFD0RwfhOIxSXzEP13cNFtSmk+HUtsvQysT SZRB9u0wB/WS+aE0RzuHN69OGeJt/YK9rB8lG2klzfEUGTrBSnsOGD0Pb2xDWLarlZ51 0YxWRPVbdlFoQ6Ga7iB1NV0v65jUadxJ2m7SzCoDSp5yVExgzyNW7+w91PW+UmgrUogG JsgT827h3lr5Gox/OWjehVe2RQmfzjnEWrGF/cV/K0nhCwSm+5a+4wFJCRZlz3NbHkp7 WwUhOr91io7ZP8Xi2Gkv3xRTzGB4xQfndVnpVMAy7WNrO5RrTiBUjIiFIHcdRa4NL2Yg ZE9g== X-Gm-Message-State: AElRT7HWtoQ9rRuhThmzFRW+qeI9vJ3DwAjK+BKyoSTrheTIsY09W4M4 8SrCk2ZOAl6ArHNihf/v6m5f0kC+ X-Received: by 10.80.209.216 with SMTP id i24mr6423240edg.213.1521296992233; Sat, 17 Mar 2018 07:29:52 -0700 (PDT) Received: from localhost.localdomain ([109.125.16.113]) by smtp.gmail.com with ESMTPSA id z4sm6652046edm.44.2018.03.17.07.29.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Mar 2018 07:29:51 -0700 (PDT) From: jason.vas.dias@gmail.com To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, andi@firstfloor.org Subject: [PATCH v4.16-rc5 2/2] x86/vdso: VDSO should handle clock_gettime(CLOCK_MONOTONIC_RAW) without syscall Date: Sat, 17 Mar 2018 14:29:34 +0000 Message-Id: <1521296974-12142-3-git-send-email-jason.vas.dias@gmail.com> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1521296974-12142-1-git-send-email-jason.vas.dias@gmail.com> References: <1521296974-12142-1-git-send-email-jason.vas.dias@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch allows compilation to succeed with compilers that support -DRETPOLINE - it was kindly contributed by H.J. Liu in GCC Bugzilla: 84908 : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84908 Apparently the GCC retpoline implementation has a limitation that it cannot handle switch statements with more than 5 clauses, which vclock_gettime.c's __vdso_clock_gettime function now contains. The automated test builds should now succeed with this patch. diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 1943aeb..cb64e10 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -76,7 +76,7 @@ CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \ -fno-omit-frame-pointer -foptimize-sibling-calls \ -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO -$(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) +$(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS) -DRETPOLINE,$(KBUILD_CFLAGS)) $(CFL) # # vDSO code runs in userspace and -pg doesn't help with profiling anyway. @@ -143,6 +143,7 @@ KBUILD_CFLAGS_32 := $(filter-out -mcmodel=kernel,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32)) +KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS) -DRETPOLINE,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector) KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)