Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp771364ybl; Fri, 30 Aug 2019 07:00:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcUufuDasrSFNmuscKV1xecGi3rfmDoTkOHIe0OsTZI8IlH60ASgKjtnQwxkSoH1m7XXIR X-Received: by 2002:a17:902:bc4c:: with SMTP id t12mr15520600plz.90.1567173645157; Fri, 30 Aug 2019 07:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567173645; cv=none; d=google.com; s=arc-20160816; b=hq+YmZaI0V73eKwU/Fc+U/cM9+gBK+hjUOR7BUlr/DSg+ZtjiAX255FkM5dcNu6Q7k 2iehtkspbHXuFxjxBhpaLocKuf8Rq3vj8K84OSC5/41QEvZ9jz8JKJoBVD0Eg2OrLgQN l9zBFBFGfq+7CHmHGKGJ7UfWPE36DfXH9G1tycnUyiliWX2Yb/LLEehtNfZGLB1s6DT2 lSnWoAjdzoCjjjsfQD3IJMbAMsNyHTC9g+EqgmCqdo3aAV2/ksW2MvGFRynP5fbkqgPa avw6RqxqVeCHuKPEztVRidmRPYNisSDyGWbrIUvtpH8ZJ3ZYQW1zWNFJIX3GS0eCKJiu CROw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=cfZxSeQlk4YR1TDSQe29DTnvkD1si6mQWMypwvuVQfk=; b=Ni/5K9WSd+WChiZXRqya1yOq6y2rjqZ0Ji8PSwKukRXDG1HQW1SVMafPVollmc0Izu VwNFQLrhfjodj1c4dQK0dhex/LspiCRxZ+hRapxswC3H6cIPYmPofjPNhpaIPOawPE5D rl/rs1J2xOl5+4oXgyuRKEFD0ZNx7AJOE6zcHQky2Col4ToenGZsmc9mhS/FaHMxxE8e /2STJu8HsAE/ivSAhjCf8yxt0EQ2+HOz8bLGLaFuNBXlPnmCYcE61C/5WFwUhyA9ed/c iBlAAzo56Bw0f6vT5I2ICqZyepwGouwmH5VGd4KSV+N+tQIudCPGkD66u8tyHcFgAO9S 5ZCg== 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 u9si1888090plr.51.2019.08.30.07.00.28; Fri, 30 Aug 2019 07:00:45 -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 S1728517AbfH3N7U (ORCPT + 99 others); Fri, 30 Aug 2019 09:59:20 -0400 Received: from foss.arm.com ([217.140.110.172]:60794 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727751AbfH3N7T (ORCPT ); Fri, 30 Aug 2019 09:59:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0AD131576; Fri, 30 Aug 2019 06:59:18 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7569F3F703; Fri, 30 Aug 2019 06:59:16 -0700 (PDT) From: Vincenzo Frascino To: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: catalin.marinas@arm.com, will@kernel.org, paul.burton@mips.com, tglx@linutronix.de, salyzyn@android.com, 0x7f454c46@gmail.com, luto@kernel.org Subject: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context Date: Fri, 30 Aug 2019 14:58:56 +0100 Message-Id: <20190830135902.20861-3-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190830135902.20861-1-vincenzo.frascino@arm.com> References: <20190830135902.20861-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clock_gettime32 and clock_getres_time32 should be compiled only with a 32 bit vdso library. Exclude these symbols when BUILD_VDSO32 is not defined. Cc: Thomas Gleixner Cc: Andy Lutomirski Signed-off-by: Vincenzo Frascino Reviewed-by: Andy Lutomirski --- lib/vdso/gettimeofday.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c index e630e7ff57f1..a86e89e6dedc 100644 --- a/lib/vdso/gettimeofday.c +++ b/lib/vdso/gettimeofday.c @@ -117,6 +117,7 @@ __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts) return 0; } +#ifdef BUILD_VDSO32 static __maybe_unused int __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res) { @@ -139,6 +140,7 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res) } return ret; } +#endif /* BUILD_VDSO32 */ static __maybe_unused int __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) @@ -229,6 +231,7 @@ int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res) return 0; } +#ifdef BUILD_VDSO32 static __maybe_unused int __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res) { @@ -251,4 +254,5 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res) } return ret; } +#endif /* BUILD_VDSO32 */ #endif /* VDSO_HAS_CLOCK_GETRES */ -- 2.23.0