From patchwork Mon May 11 11:16:45 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: 48246 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 A2FCF21550 for ; Mon, 11 May 2015 11:17:04 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf37753084lbb.0 for ; Mon, 11 May 2015 04:17:03 -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=70iPDI+rXgpGL8t4iYRxEbSOt+C5HJ/jfJvWgOwcd1I=; b=COfDyPHFEi64HoGuqRuQn7MzV10NGjumwjgCcUqbwIyVnsX5G8y+VIcdJO6W163qxo M2+HqGo8Vihx8nvxU0EaVzGtrA0c/wDyZfAN+kedzpD3/TjRb+SlOryFp2as7j9DQM+b lq27Lo9fmUnpKvUJ0ezxrkLsSAr8kTOM5zKUI/nWUVOy+1QU2HJrncS49Q7mmGpYioPP 8f0nm6YchlnajpVvd/lUGNiLXnnRL375qicSNkMU0IKCm6cOe/HHOB2FAiYoqCeU+D0u nNzCFqF+CBTib3EvL9yMINqnmhL+fjbJhRv+gZKJ34uiE/L/zTQ/1qarAsEahYWym336 fC2A== X-Gm-Message-State: ALoCoQmxIXuV+ZdnDflnrOYjIhM3O4h1ubfCgNmmh9dVl5uhpbJXwIpxSMIfSVesyZOU60CLyug7 X-Received: by 10.112.189.131 with SMTP id gi3mr7163403lbc.6.1431343023593; Mon, 11 May 2015 04:17:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.137 with SMTP id o9ls558875lal.16.gmail; Mon, 11 May 2015 04:17:03 -0700 (PDT) X-Received: by 10.152.5.39 with SMTP id p7mr7649966lap.18.1431343023419; Mon, 11 May 2015 04:17:03 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id sj5si8187175lbb.44.2015.05.11.04.17.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2015 04:17:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbcga7 with SMTP id ga7so91424635lbc.1 for ; Mon, 11 May 2015 04:17:03 -0700 (PDT) X-Received: by 10.112.161.226 with SMTP id xv2mr7749888lbb.106.1431343023328; Mon, 11 May 2015 04:17:03 -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 hn6csp1443366lbb; Mon, 11 May 2015 04:17:02 -0700 (PDT) X-Received: by 10.70.56.98 with SMTP id z2mr18075605pdp.120.1431343021646; Mon, 11 May 2015 04:17:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cn10si17539251pac.193.2015.05.11.04.17.00; Mon, 11 May 2015 04:17:01 -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 S1753905AbbEKLQ4 (ORCPT + 28 others); Mon, 11 May 2015 07:16:56 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:32980 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753771AbbEKLQw (ORCPT ); Mon, 11 May 2015 07:16:52 -0400 Received: by pacwv17 with SMTP id wv17so107692669pac.0 for ; Mon, 11 May 2015 04:16:52 -0700 (PDT) X-Received: by 10.70.38.138 with SMTP id g10mr18173158pdk.98.1431343012191; Mon, 11 May 2015 04:16:52 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by mx.google.com with ESMTPSA id yv6sm12862646pac.29.2015.05.11.04.16.49 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 May 2015 04:16:51 -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 10/22] posix-timers:Split out the guts of the syscall and change the implementation for clock_gettime Date: Mon, 11 May 2015 19:16:45 +0800 Message-Id: <1431343005-29759-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.217.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: , This patch splits out the guts of the clock_gettime syscall and changes the clock_gettime syscall implementation to prepare the converting to 64bit methods for the clock_gettime 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 0fe8a65..8aac06d 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -1115,17 +1115,23 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock, #endif } -SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock, - struct timespec __user *,tp) +static int __clock_gettime(clockid_t which_clock, struct timespec *ts) { struct k_clock *kc = clockid_to_kclock(which_clock); - struct timespec kernel_tp; - int error; if (!kc) return -EINVAL; - error = kc->clock_get(which_clock, &kernel_tp); + return kc->clock_get(which_clock, ts); +} + +SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock, + struct timespec __user *,tp) +{ + struct timespec kernel_tp; + int error; + + error = __clock_gettime(which_clock, &kernel_tp); if (!error && copy_to_user(tp, &kernel_tp, sizeof (kernel_tp))) error = -EFAULT;