From patchwork Wed May 6 16:30:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 469027 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 98B1A1401DA for ; Thu, 7 May 2015 02:32:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sourceware.org header.i=@sourceware.org header.b=e2nUu1QL; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=CUTYTcN2e7SOPgg8q7L4CXGEqR9qjPE RYCU7xVb4USQVLL4zkMffP28BnZ2o2CatfhFzk1dB9NRMkd1dbT70e28BVCbqB3H wi1xSc4q1TJikUUvFzSJYEcCZh1h6naX2dz8NJnLZ5kP1rRiKdtNlfW+0NbeCIhX exxr6Vc/jvxQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=QAM508gOjGAQA+JB4FgsMMW+NSY=; b=e2nUu 1QLNjmK6czriDKCnbuXW92aIe+gnusYuf0JKw/gOQCdC39PvQv+KBXGLjXN56O6g TdyNHv9yzkkHMHvKBLf8KF3wibmGjSj/eA6tMn5CKjlV3lY+wKPDgq7k6H+wF0Cs TDKL2tlaVdGLEJN/9/VeV2PznTQzQVPZRXoHZA= Received: (qmail 71374 invoked by alias); 6 May 2015 16:30:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 71259 invoked by uid 89); 6 May 2015 16:30:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: mout.kundenserver.de From: Arnd Bergmann To: y2038@lists.linaro.org Cc: baolin.wang@linaro.org, tglx@linutronix.de, albert.aribaud@3adev.fr, john.stultz@linaro.org, bamvor.zhangjian@linaro.org, ruchandani.tina@gmail.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, libc-alpha@sourceware.org, Arnd Bergmann Subject: [PATCH 18/19] y2038: introduce jiffies_to_timespec64 Date: Wed, 6 May 2015 18:30:25 +0200 Message-Id: <1430929826-318934-19-git-send-email-arnd@arndb.de> In-Reply-To: <1430929826-318934-1-git-send-email-arnd@arndb.de> References: <1430929826-318934-1-git-send-email-arnd@arndb.de> X-UI-Out-Filterresults: notjunk:1; Needed for converting sys_sched_rr_get_interval Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Gleixner --- include/linux/jiffies.h | 12 +++++++++--- kernel/time/time.c | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 2aeb872f5547..6647257fa3da 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -301,9 +301,15 @@ static inline unsigned long timespec64_to_jiffies(const struct timespec64 *value return __timespec_to_jiffies(value->tv_sec, value->tv_nsec); } - -extern void jiffies_to_timespec(const unsigned long jiffies, - struct timespec *value); +extern void jiffies_to_timespec64(const unsigned long jiffies, + struct timespec64 *value); +static inline void jiffies_to_timespec(const unsigned long jiffies, + struct timespec *value) +{ + struct timespec64 ts64; + jiffies_to_timespec64(jiffies, &ts64); + *value = timespec64_to_timespec(ts64); +} extern unsigned long timeval_to_jiffies(const struct timeval *value); extern void jiffies_to_timeval(const unsigned long jiffies, struct timeval *value); diff --git a/kernel/time/time.c b/kernel/time/time.c index 4d96236c07b0..5e71dbd36fff 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c @@ -588,7 +588,7 @@ __timespec_to_jiffies(unsigned long sec, long nsec) EXPORT_SYMBOL(__timespec_to_jiffies); void -jiffies_to_timespec(const unsigned long jiffies, struct timespec *value) +jiffies_to_timespec64(const unsigned long jiffies, struct timespec64 *value) { /* * Convert jiffies to nanoseconds and separate with