From patchwork Mon May 11 11:17:28 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: 48248 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8110D21550 for ; Mon, 11 May 2015 11:17:45 +0000 (UTC) Received: by wizk4 with SMTP id k4sf24920973wiz.2 for ; Mon, 11 May 2015 04:17:44 -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=B5NRIbKyzgt/VOZPg3nqAFmwoZ3I37rTbUT64XJS1SQ=; b=YmWWO9c0XyQXVdLZrf9BoHKfAxQjyQ81Uhbuw00WE34IUixqn1qWxuS0eP/Clljd5O ygrvLGlIKJbdWMf+TPUwIIdlt4Rv/vx3OpW4WG5gMh3XlHXFTWKYUug06NpNLBefL+4V Lm8BRUzv4pwxo4iZVaur/67TzK6qv/MeTxjRK8gDhKSe8aUWNqY72G8QkEaJm+s93fLz qGTklhmsFcFKB62n8xn2bR3S0ceieUb5++J4zEACtFZ992wnwCdbC1+m1LOZFuAbnss4 j9QI1yrmGMYsnH3B5etThmthkHiCudUAgszjjwY5btO3xGSLdx1nqAHfjmZCM1ERDuvM qvXQ== X-Gm-Message-State: ALoCoQlpFtk+vWsnjy3bEXR6OEjoZqvt4ZxMYUw3JQN1D4I+OosuN+9UL7/xJTq3ZU7tf8JeTLlh X-Received: by 10.194.189.110 with SMTP id gh14mr734544wjc.3.1431343064841; Mon, 11 May 2015 04:17:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.227 with SMTP id t3ls627416laj.72.gmail; Mon, 11 May 2015 04:17:44 -0700 (PDT) X-Received: by 10.152.1.4 with SMTP id 4mr7669033lai.25.1431343064653; Mon, 11 May 2015 04:17:44 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id ei7si8162415lad.156.2015.05.11.04.17.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2015 04:17:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by labbd9 with SMTP id bd9so90749489lab.2 for ; Mon, 11 May 2015 04:17:44 -0700 (PDT) X-Received: by 10.152.4.72 with SMTP id i8mr7939348lai.32.1431343064506; Mon, 11 May 2015 04:17:44 -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 hn6csp1443700lbb; Mon, 11 May 2015 04:17:43 -0700 (PDT) X-Received: by 10.70.33.67 with SMTP id p3mr18236277pdi.126.1431343062806; Mon, 11 May 2015 04:17:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si10889646pdo.21.2015.05.11.04.17.41; Mon, 11 May 2015 04:17:42 -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 S1753925AbbEKLRh (ORCPT + 28 others); Mon, 11 May 2015 07:17:37 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:34559 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753649AbbEKLRe (ORCPT ); Mon, 11 May 2015 07:17:34 -0400 Received: by pdbqa5 with SMTP id qa5so141945927pdb.1 for ; Mon, 11 May 2015 04:17:34 -0700 (PDT) X-Received: by 10.66.249.101 with SMTP id yt5mr18425580pac.116.1431343054602; Mon, 11 May 2015 04:17:34 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by mx.google.com with ESMTPSA id u8sm12812900pdi.90.2015.05.11.04.17.32 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 May 2015 04:17:34 -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 v3 12/22] posix-timers:Split out the guts of the syscall and change the implementation for clock_getres Date: Mon, 11 May 2015 19:17:28 +0800 Message-Id: <1431343048-29839-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.47 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 ccc84d3..456c588 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -1182,17 +1182,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;