From patchwork Mon Jun 1 11:57:53 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: 49312 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 20A02218FC for ; Mon, 1 Jun 2015 11:58:41 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf33930700lbc.2 for ; Mon, 01 Jun 2015 04:58:39 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=A6yaKqh9IlZVBqN3mortzCOYZT4cUY59Vp3AjFQmuhQ=; b=JAc6FOp7AyPBB+Lim4t38euEUrSMh24qUxcA2iWx+j/QAPoIyBQ6Y9MQSbz+b2H4TE VMMOgGTm81h1sEhRIXqQWqp3Hw8bh+SUlR7wirnOj+0mlWOzB0esMHDf5oFlMtDcDYw0 4b/1ylXPHbY9LLBrYd7YU5rBLrs0QBzSfbdenC2p84p+IQGvmlfiChkr8v+7H6N0DGJj uOm3e2E0jcZA4qjV1FzYhSMF/xnkGMmOxja85oj8y9lZimYKts5+bQ8uJEhMEnGDnqKH +MOaL7OvtpYZRH8543nlB8fBsT7ImwcTckDVl6zaX4v8NcBC4dllXg/0WdHzKLVhCKY8 Wopg== X-Gm-Message-State: ALoCoQmhD6Edt6G5QQMUeWjH+7MtzL4wW/i1XmbzdrE1boxt3SFQlFcrDriXxIyUiBTKT0bWXWYS X-Received: by 10.180.35.164 with SMTP id i4mr1809393wij.0.1433159919734; Mon, 01 Jun 2015 04:58:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.36 with SMTP id g4ls649482lah.33.gmail; Mon, 01 Jun 2015 04:58:39 -0700 (PDT) X-Received: by 10.153.6.36 with SMTP id cr4mr21094023lad.56.1433159919524; Mon, 01 Jun 2015 04:58:39 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id bc7si12111492lbc.144.2015.06.01.04.58.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2015 04:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by laei3 with SMTP id i3so11699971lae.3 for ; Mon, 01 Jun 2015 04:58:39 -0700 (PDT) X-Received: by 10.152.27.1 with SMTP id p1mr20287382lag.112.1433159919103; Mon, 01 Jun 2015 04:58:39 -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.108.230 with SMTP id hn6csp2259248lbb; Mon, 1 Jun 2015 04:58:38 -0700 (PDT) X-Received: by 10.70.6.161 with SMTP id c1mr39759636pda.76.1433159917429; Mon, 01 Jun 2015 04:58:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qn15si21246726pab.149.2015.06.01.04.58.34; Mon, 01 Jun 2015 04:58:37 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753204AbbFAL6V (ORCPT + 28 others); Mon, 1 Jun 2015 07:58:21 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:33400 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753003AbbFAL6I (ORCPT ); Mon, 1 Jun 2015 07:58:08 -0400 Received: by pdbqa5 with SMTP id qa5so106169577pdb.0 for ; Mon, 01 Jun 2015 04:58:07 -0700 (PDT) X-Received: by 10.70.37.69 with SMTP id w5mr39634123pdj.123.1433159887422; Mon, 01 Jun 2015 04:58:07 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by mx.google.com with ESMTPSA id mv8sm12471194pdb.58.2015.06.01.04.58.04 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Jun 2015 04:58:06 -0700 (PDT) From: Baolin Wang To: tglx@linutronix.de Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, baolin.wang@linaro.org, y2038@lists.linaro.org Subject: [PATCH v4 15/25] posix-timers:Change the implementation for clock_getres syscall function Date: Mon, 1 Jun 2015 19:57:53 +0800 Message-Id: <1433159873-5106-1-git-send-email-baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 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.215.49 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 splits out the guts of the clock_getres syscall and changes the clock_getres syscall implementation to prepare the converting to 64bit methods for the clock_getres syscall function in posix-timers.c file. Signed-off-by: Baolin Wang --- kernel/time/posix-timers.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 9b5352a..3bb5bee 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -1180,17 +1180,23 @@ SYSCALL_DEFINE2(clock_adjtime, const clockid_t, which_clock, return err; } -SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, - struct timespec __user *, tp) +static int __clock_getres(clockid_t which_clock, struct timespec *ts) { struct k_clock *kc = clockid_to_kclock(which_clock); - struct timespec rtn_tp; - int error; if (!kc) return -EINVAL; - error = kc->clock_getres(which_clock, &rtn_tp); + return kc->clock_getres(which_clock, ts); +} + +SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, + struct timespec __user *, tp) +{ + struct timespec rtn_tp; + int error; + + error = __clock_getres(which_clock, &rtn_tp); if (!error && tp && copy_to_user(tp, &rtn_tp, sizeof (rtn_tp))) error = -EFAULT;