From patchwork Mon Apr 20 05:57:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 47313 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BBC0020553 for ; Mon, 20 Apr 2015 05:58:35 +0000 (UTC) Received: by wiun10 with SMTP id n10sf15348212wiu.1 for ; Sun, 19 Apr 2015 22:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=YhbPcabWGvdkSArVxVJqxDJEzf+G4GrhdV1xR7EcR2I=; b=MJjBQXGeh7CwuNJOD99QK8BkweRVQ9KcQra8VaHLxvwZ0+585QzlmdXkVUNl2/E44j GhmFFZCjgQ9sug8EEkY+RNBcPetdhehJNuv9+xnsxb+qoLBlhGArSRHx8nTwJiaFBHP0 121RHw9hc7xbie4HPkj3mrRNqrAST0VTyyDmkKWUHPNHiARYmb8j0LhvY6gopuVmBYhw P2flvizpyiU0sc9772j/r+tUDESxnfd+ZaLb93bE85Y/APyBc+4uCndOkDyhDrPkOo/e k5XRPFp4Wpn+MUg2hJvS+Wj6K13kJi/46H6UrGwlKZL2bxwGP+U6JV19+YyDE+1hrMJa PTpw== X-Gm-Message-State: ALoCoQkLuI5Tx9izqTlk8oDJYyIoB/L+qDCmfJ8+GtRqDykX5LGZwKWkIZlQkEEiFg54CMRWc5+8 X-Received: by 10.180.74.197 with SMTP id w5mr5368395wiv.5.1429509515025; Sun, 19 Apr 2015 22:58:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.163.65 with SMTP id yg1ls72616lab.26.gmail; Sun, 19 Apr 2015 22:58:34 -0700 (PDT) X-Received: by 10.152.22.104 with SMTP id c8mr13994705laf.87.1429509514692; Sun, 19 Apr 2015 22:58:34 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id si10si14215256lac.134.2015.04.19.22.58.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Apr 2015 22:58:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbqq2 with SMTP id qq2so122160616lbb.3 for ; Sun, 19 Apr 2015 22:58:34 -0700 (PDT) X-Received: by 10.152.178.197 with SMTP id da5mr14514276lac.56.1429509514524; Sun, 19 Apr 2015 22:58:34 -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.112.67.65 with SMTP id l1csp1242315lbt; Sun, 19 Apr 2015 22:58:33 -0700 (PDT) X-Received: by 10.68.227.195 with SMTP id sc3mr25397532pbc.64.1429509513211; Sun, 19 Apr 2015 22:58:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si26751156pds.196.2015.04.19.22.58.31; Sun, 19 Apr 2015 22:58:33 -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 S1754302AbbDTF61 (ORCPT + 26 others); Mon, 20 Apr 2015 01:58:27 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:33506 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754244AbbDTF6V (ORCPT ); Mon, 20 Apr 2015 01:58:21 -0400 Received: by pdbnk13 with SMTP id nk13so197390001pdb.0 for ; Sun, 19 Apr 2015 22:58:21 -0700 (PDT) X-Received: by 10.70.37.144 with SMTP id y16mr25154843pdj.86.1429509500930; Sun, 19 Apr 2015 22:58:20 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([114.30.40.58]) by mx.google.com with ESMTPSA id cp10sm16888496pdb.44.2015.04.19.22.58.11 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 19 Apr 2015 22:58:19 -0700 (PDT) From: Baolin Wang To: tglx@linutronix.de Cc: arnd@arndb.de, john.stultz@linaro.org, heenasirwani@gmail.com, pang.xunlei@linaro.org, peterz@infradead.org, rafael.j.wysocki@intel.com, gregkh@linuxfoundation.org, richardcochran@gmail.com, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, linux390@de.ibm.com, rth@twiddle.net, riel@redhat.com, cl@linux.com, tj@kernel.org, fweisbec@gmail.com, ahh@google.com, pjt@google.com, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, baolin.wang@linaro.org, y2038@lists.linaro.org Subject: [PATCH 01/11] linux/time64.h:Introduce the 'struct itimerspec64' for 64bit Date: Mon, 20 Apr 2015 13:57:29 +0800 Message-Id: <1429509459-17068-2-git-send-email-baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1429509459-17068-1-git-send-email-baolin.wang@linaro.org> References: <1429509459-17068-1-git-send-email-baolin.wang@linaro.org> 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: baolin.wang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 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: , This patch introduces the 'struct itimerspec64' for 64bit to replace itimerspec, and also introduces the conversion methods: itimerspec64_to_itimerspec() and itimerspec_to_itimerspec64(), that makes itimerspec to ready for 2038 year. Signed-off-by: Baolin Wang --- include/linux/time64.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/time64.h b/include/linux/time64.h index a383147..3647bdd 100644 --- a/include/linux/time64.h +++ b/include/linux/time64.h @@ -18,6 +18,11 @@ struct timespec64 { }; #endif +struct itimerspec64 { + struct timespec64 it_interval; /* timer period */ + struct timespec64 it_value; /* timer expiration */ +}; + /* Parameters used to convert the timespec values: */ #define MSEC_PER_SEC 1000L #define USEC_PER_MSEC 1000L @@ -187,4 +192,12 @@ static __always_inline void timespec64_add_ns(struct timespec64 *a, u64 ns) #endif +#define itimerspec64_to_itimerspec(its64) \ + ({ (struct itimerspec){ .it_interval = timespec64_to_timespec((its64).it_interval), \ + .it_value = timespec64_to_timespec((its64).it_value) }; }) + +#define itimerspec_to_itimerspec64(its) \ + ({ (struct itimerspec64){ .it_interval = timespec_to_timespec64((its).it_interval), \ + .it_value = timespec_to_timespec64((its).it_value) }; }) + #endif /* _LINUX_TIME64_H */