From patchwork Fri Jul 11 13:44:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 33497 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F1E9C203C0 for ; Fri, 11 Jul 2014 14:01:33 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf895687pab.8 for ; Fri, 11 Jul 2014 07:01:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:user-agent:date:from:to :cc:subject:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-disposition; bh=DSnYBeeCchXGlp+wERbZozA0JtcMof2Olva18s9Hdvg=; b=CVJ867CR/d1kN/tv6lZUKYPXDRrAoZfrgaQR+AxcsGB5mXYCnz5UvUwLXGlFzlXM6W efAxYLt4spAQwgfTQacOG4Mt5MZK6wxVYG1Rs3TJNTNtoN5UclZ1bICNiJe5E2zxLhmw AFWgMrDyAje2VIrIi+uSlKJPwk/ZBhKQFvMhvWKrFcOffxjdsr23cuujhxtbTwIqDs8/ xGtqHnIJPvNtRcmhVXMLE/EXJ1azhs9HRZSb/Vf9pABDE5XY9PLfxNJwxaFM02ukfO64 uz+HcVt5J38U+RMv9WJPgVce2Sne65I5s80aV5Zh9xaaXoPmyU64SIaH9DoAFwXpVc/P C8yg== X-Gm-Message-State: ALoCoQmQuRiT4+chKxzS1ifWdrnim3uXBkKa1hys+vBFsGWdSavYKtZ9pOJ3DmpwTnDJo4LQJCg+ X-Received: by 10.67.4.202 with SMTP id cg10mr26997333pad.42.1405087293233; Fri, 11 Jul 2014 07:01:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.33.202 with SMTP id j68ls389249qgj.28.gmail; Fri, 11 Jul 2014 07:01:33 -0700 (PDT) X-Received: by 10.220.179.197 with SMTP id br5mr359114vcb.80.1405087293121; Fri, 11 Jul 2014 07:01:33 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id w6si1551144vek.62.2014.07.11.07.01.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jul 2014 07:01:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id im17so2062054vcb.25 for ; Fri, 11 Jul 2014 07:01:33 -0700 (PDT) X-Received: by 10.58.182.234 with SMTP id eh10mr1044321vec.41.1405087293038; Fri, 11 Jul 2014 07:01:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp37710vcb; Fri, 11 Jul 2014 07:01:32 -0700 (PDT) X-Received: by 10.70.49.228 with SMTP id x4mr24362740pdn.80.1405087292052; Fri, 11 Jul 2014 07:01:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si1282413pdj.176.2014.07.11.07.01.31; Fri, 11 Jul 2014 07:01:31 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754683AbaGKOBV (ORCPT + 28 others); Fri, 11 Jul 2014 10:01:21 -0400 Received: from www.linutronix.de ([62.245.132.108]:56052 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753722AbaGKNoI (ORCPT ); Fri, 11 Jul 2014 09:44:08 -0400 Received: from localhost ([127.0.0.1] helo=[127.0.1.1]) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1X5b7P-0004Bh-BZ; Fri, 11 Jul 2014 15:44:07 +0200 Message-Id: <20140711133705.740823080@linutronix.de> User-Agent: quilt/0.63-1 Date: Fri, 11 Jul 2014 13:44:07 -0000 From: Thomas Gleixner To: LKML Cc: John Stultz , Peter Zijlstra Subject: [patch 06/55] ktime: Change ktime_set() to take 64bit seconds value References: <20140711133623.530368377@linutronix.de> MIME-Version: 1.0 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: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tglx@linutronix.de X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-Disposition: inline; filename=jstultz-tk-696511b.patch From: John Stultz In order to support dates past 2038 on 32bit systems, ktime_set() needs to handle 64bit second values. [ tglx: Removed the BITS_PER_LONG check ] Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner --- include/linux/ktime.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ Index: tip/include/linux/ktime.h =================================================================== --- tip.orig/include/linux/ktime.h +++ tip/include/linux/ktime.h @@ -47,13 +47,12 @@ typedef union ktime ktime_t; /* Kill th * * Return: The ktime_t representation of the value. */ -static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) +static inline ktime_t ktime_set(const s64 secs, const unsigned long nsecs) { -#if (BITS_PER_LONG == 64) if (unlikely(secs >= KTIME_SEC_MAX)) return (ktime_t){ .tv64 = KTIME_MAX }; -#endif - return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; + + return (ktime_t) { .tv64 = secs * NSEC_PER_SEC + (s64)nsecs }; } /* Subtract two ktime_t variables. rem = lhs -rhs: */