From patchwork Tue Aug 12 15:52:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 35279 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 444A120540 for ; Tue, 12 Aug 2014 15:52:48 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id r5sf11209759qcx.1 for ; Tue, 12 Aug 2014 08:52:48 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=urzQ1mCELRF16Bn9fXekEcWGanf2njdwANrGTphH+8I=; b=PKQCo2UOD6DXTBlNuJDlPR+HxF+iOMessaYROxlAPIPgurX1e3jObKT0s3xDJ8vVH5 fzTGV0vi2UiIhXrGvT+3amv0ZIKZXdnOrQvVRt2NbWph/1iK8dbe47sSNLJrpxy0Qx9g Knp6dUyh8JJIFxoAX0U4+DZv1sASaHf3xgONKX9xoeF+zBrUeJZTEhJ4dVFx91lnLJLv K+QMyR1oVOr5WBBUpR4qwmzqcA2lYGv3b3TFC/fKimK3HYdlDrPw2Yk0UDiiLJkOsv5H cTWLyKCcQhVL4Eovb++CtVBYEZhk0Q1K7bhhP8spYOXUfiOwzyhDdPSA1bFgnUsVm2hQ orRA== X-Gm-Message-State: ALoCoQkktAOvK95+8TwBItKckquvPeW9Fa62fAOHBrYBgzU96SO+iZttrnQuNnYnFaIuyceQekN+ X-Received: by 10.236.155.132 with SMTP id j4mr553385yhk.56.1407858767925; Tue, 12 Aug 2014 08:52:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.100.242 with SMTP id s105ls178420qge.42.gmail; Tue, 12 Aug 2014 08:52:47 -0700 (PDT) X-Received: by 10.52.238.227 with SMTP id vn3mr6518792vdc.47.1407858767850; Tue, 12 Aug 2014 08:52:47 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id br4si8465264vcb.106.2014.08.12.08.52.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 08:52:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so13299104vcb.5 for ; Tue, 12 Aug 2014 08:52:47 -0700 (PDT) X-Received: by 10.52.120.51 with SMTP id kz19mr1297643vdb.95.1407858767776; Tue, 12 Aug 2014 08:52:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp259948vcb; Tue, 12 Aug 2014 08:52:47 -0700 (PDT) X-Received: by 10.68.57.175 with SMTP id j15mr1726423pbq.164.1407858766700; Tue, 12 Aug 2014 08:52:46 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id xz10si16328829pac.206.2014.08.12.08.52.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 08:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.50 as permitted sender) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id et14so13228270pad.37 for ; Tue, 12 Aug 2014 08:52:46 -0700 (PDT) X-Received: by 10.66.141.134 with SMTP id ro6mr5136076pab.0.1407858766140; Tue, 12 Aug 2014 08:52:46 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id kk1sm14981011pbd.61.2014.08.12.08.52.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Aug 2014 08:52:45 -0700 (PDT) From: John Stultz To: LKML Cc: John Stultz , Thomas Gleixner , Ingo Molnar , Benjamin Herrenschmidt Subject: [PATCH] timekeeping: Another fix to the VSYSCALL_OLD update_vsyscall Date: Tue, 12 Aug 2014 08:52:29 -0700 Message-Id: <1407858749-15422-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@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.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Benjamin Herrenschmidt pointed out that I firuther missed modifying update_vsyscall after the wall_to_mono value was changed to a timespec64. This causes issues on powerpc32, which expects a 32bit timespec. This patch fixes the problem my properly converting from a timespec64 to a timespec before passing the value on to the arch-specific vsyscall logic. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Benjamin Herrenschmidt Reported-by: Benjamin Herrenschmidt Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index f36b028..fb4a9c2 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -338,10 +338,11 @@ EXPORT_SYMBOL_GPL(ktime_get_mono_fast_ns); static inline void update_vsyscall(struct timekeeper *tk) { - struct timespec xt; + struct timespec xt, wm; xt = timespec64_to_timespec(tk_xtime(tk)); - update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->tkr.clock, tk->tkr.mult, + wm = timespec64_to_timespec(tk->wall_to_monotonic); + update_vsyscall_old(&xt, &wm, tk->tkr.clock, tk->tkr.mult, tk->tkr.cycle_last); }