Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5188378ybl; Tue, 14 Jan 2020 05:06:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwPINLu4SY0E/nniKMipuWjP4fotkE56U+0OtBB0ZXAuA20/I3hI3IkzLXbOQyGlYC4zFBi X-Received: by 2002:a9d:774e:: with SMTP id t14mr16377346otl.358.1579007165314; Tue, 14 Jan 2020 05:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579007165; cv=none; d=google.com; s=arc-20160816; b=SQiaK730B9SqSntkLIZNndpHpzGLQHE0p26bSUHKD9fnFa1gh4JWOLCAYuWWczfk0v FtgeqsR0+LQ9bQcIoW5TTG41DlzsEixcxvTiXMU5Ukzb2rmg+iKLpzPiiSDEHOPA7QZ9 2Nnum/XWy6xB6XokBY3hV72+2MkBQ4NpdpKUGIURq83nT6P+gJAH+74yG0y3QoTQR6Fl ZSiUwhz884+3W0B1wi+GkHDRQOk2AMM0GYDXNImH7rO/LkKJzxy/GQEfR5AoRd1o1PU7 +ni2fNrRRnj5TKXcd1rOGBdb8obSwG/HI6eXJEwUemscK02k18HwGZh8YFO0Yin+4PJ0 oK3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=soiV6df4WiKhDTjPojxRsGsd6hoJ4dfU+1gluDxuE5s=; b=T3KjIcChfWG4uvBt4LJvgWlrxwpzKPMX42DutoLM+kehfYe9UIFi+nHXn0JFlEoO8X 2fHmJ1+3xdfSRDqI1SUloAPWvqWjcUzlc8/BrMfbp2AXxhqN28KPXvUcIww5paJ703TQ IFnPMq+Wp43sWPeswcCHnyy2uhlSRxKD0hAEBDTeM9I77ElamQhKBvExtt4wpVN/FEiD k1uSD3t4LqNzEQ2/xV1ylc6prU5UolkKTYVpIjXNtBShTocdqr1FNttL/EKqwqv1Z06P zZVZFjLo8MFTbVia7d4atJLujxEEDCD2NGIGZlGmuh5J7S408r93emTb+mkIMzi2IC3f 9a4g== 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 u21si7511321oic.263.2020.01.14.05.05.50; Tue, 14 Jan 2020 05:06:05 -0800 (PST) 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 S1729247AbgANNDJ (ORCPT + 99 others); Tue, 14 Jan 2020 08:03:09 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:43278 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729064AbgANNCq (ORCPT ); Tue, 14 Jan 2020 08:02:46 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1irLqC-0004rS-57; Tue, 14 Jan 2020 14:02:40 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 4105D1C085B; Tue, 14 Jan 2020 14:02:24 +0100 (CET) Date: Tue, 14 Jan 2020 13:02:24 -0000 From: "tip-bot2 for Thomas Gleixner" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] ARM: vdso: Set BUILD_VDSO32 and provide 32bit fallbacks Cc: Thomas Gleixner , Vincenzo Frascino , linux-arm-kernel@lists.infradead.org, x86 , LKML In-Reply-To: <87tv4zq9dc.fsf@nanos.tec.linutronix.de> References: <87tv4zq9dc.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Message-ID: <157900694409.396.3651284834298683513.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: 715f23b6104aa297feea20d4f200ca81941e23de Gitweb: https://git.kernel.org/tip/715f23b6104aa297feea20d4f200ca81941e23de Author: Thomas Gleixner AuthorDate: Tue, 14 Jan 2020 09:41:09 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 14 Jan 2020 12:20:43 +01:00 ARM: vdso: Set BUILD_VDSO32 and provide 32bit fallbacks Setting BUILD_VDSO32 is required to expose the legacy 32bit interfaces in the generic VDSO code which are going to be hidden behind an #ifdef BUILD_VDSO32. The 32bit fallbacks are necessary to remove the existing VDSO_HAS_32BIT_FALLBACK hackery. Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/87tv4zq9dc.fsf@nanos.tec.linutronix.de --- arch/arm/include/asm/vdso/gettimeofday.h | 36 +++++++++++++++++++++++- arch/arm/vdso/Makefile | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/vdso/gettimeofday.h b/arch/arm/include/asm/vdso/gettimeofday.h index 0ad2429..fe6e1f6 100644 --- a/arch/arm/include/asm/vdso/gettimeofday.h +++ b/arch/arm/include/asm/vdso/gettimeofday.h @@ -52,6 +52,24 @@ static __always_inline long clock_gettime_fallback( return ret; } +static __always_inline long clock_gettime32_fallback( + clockid_t _clkid, + struct old_timespec32 *_ts) +{ + register struct old_timespec32 *ts asm("r1") = _ts; + register clockid_t clkid asm("r0") = _clkid; + register long ret asm ("r0"); + register long nr asm("r7") = __NR_clock_gettime; + + asm volatile( + " swi #0\n" + : "=r" (ret) + : "r" (clkid), "r" (ts), "r" (nr) + : "memory"); + + return ret; +} + static __always_inline int clock_getres_fallback( clockid_t _clkid, struct __kernel_timespec *_ts) @@ -70,6 +88,24 @@ static __always_inline int clock_getres_fallback( return ret; } +static __always_inline int clock_getres32_fallback( + clockid_t _clkid, + struct old_timespec32 *_ts) +{ + register struct old_timespec32 *ts asm("r1") = _ts; + register clockid_t clkid asm("r0") = _clkid; + register long ret asm ("r0"); + register long nr asm("r7") = __NR_clock_getres; + + asm volatile( + " swi #0\n" + : "=r" (ret) + : "r" (clkid), "r" (ts), "r" (nr) + : "memory"); + + return ret; +} + static __always_inline u64 __arch_get_hw_counter(int clock_mode) { #ifdef CONFIG_ARM_ARCH_TIMER diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile index 0fda344..1babb39 100644 --- a/arch/arm/vdso/Makefile +++ b/arch/arm/vdso/Makefile @@ -14,7 +14,7 @@ targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.so.raw vdso.lds obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector -ccflags-y += -DDISABLE_BRANCH_PROFILING +ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO32 ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \