From patchwork Wed Aug 13 19:47:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 35386 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0996220DCC for ; Wed, 13 Aug 2014 19:47:27 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id l13sf5702541iga.6 for ; Wed, 13 Aug 2014 12:47:27 -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=oWbnJCpHBV1crJHpxDl1Ngqj9l82SotaLk5dFzbb/3c=; b=SUZYIyCcgAUypeK22B2MBdN3aBfJlc//xKM3emfECZ9IRBnJiILf+3zJb9dd1z5kxF zt/SAd4c1yb7fo6dxjdi22cno50M33E92xkNZ7Mj/OIQryFNErikTVnrB3AJZLjvUrNu iGzXQtRUqjvgldkKSWwwD+/+2PfPdjhZRqiW9Idy2Stl/ga3bRgNkeZ94G7MaFF4PtNZ vK8FokSYRLB6xvb1mDh3/K9kih+hTnLjgWF7hj3PRmMmcLoRQfzsghheF/WXPEQ5ZiI1 RSk3pm3dFvBNe8yizT89edpVDKmZY1Uz/dfU0sCSt7ctBzHKmXbUFfPKU1O/F4+le6gc lLuw== X-Gm-Message-State: ALoCoQmXhTRraaLrTiAlhmfp7PjwFLZpWxPnMSsWDjeRu3AXXyqwnHXF01m0k9MsUb3W7CTOszWi X-Received: by 10.182.66.68 with SMTP id d4mr3257597obt.39.1407959247443; Wed, 13 Aug 2014 12:47:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.119 with SMTP id f110ls658771qga.96.gmail; Wed, 13 Aug 2014 12:47:27 -0700 (PDT) X-Received: by 10.220.105.201 with SMTP id u9mr5577502vco.11.1407959247271; Wed, 13 Aug 2014 12:47:27 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id e5si41594vek.81.2014.08.13.12.47.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Aug 2014 12:47:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf12so294404vcb.12 for ; Wed, 13 Aug 2014 12:47:27 -0700 (PDT) X-Received: by 10.52.88.74 with SMTP id be10mr2654244vdb.54.1407959247199; Wed, 13 Aug 2014 12:47:27 -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 tc5csp356529vcb; Wed, 13 Aug 2014 12:47:26 -0700 (PDT) X-Received: by 10.70.43.170 with SMTP id x10mr5925970pdl.9.1407959246126; Wed, 13 Aug 2014 12:47:26 -0700 (PDT) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by mx.google.com with ESMTPS id pc2si2206945pac.118.2014.08.13.12.47.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Aug 2014 12:47:26 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.192.182 as permitted sender) client-ip=209.85.192.182; Received: by mail-pd0-f182.google.com with SMTP id fp1so245340pdb.13 for ; Wed, 13 Aug 2014 12:47:25 -0700 (PDT) X-Received: by 10.66.178.205 with SMTP id da13mr3056029pac.146.1407959245630; Wed, 13 Aug 2014 12:47:25 -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 ei1sm4319123pdb.20.2014.08.13.12.47.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Aug 2014 12:47:24 -0700 (PDT) From: John Stultz To: Linus Torvalds Cc: John Stultz , LKML , Thomas Gleixner , Ingo Molnar , Benjamin Herrenschmidt Subject: [PATCH] timekeeping: Another fix to the VSYSCALL_OLD update_vsyscall Date: Wed, 13 Aug 2014 12:47:14 -0700 Message-Id: <1407959234-27989-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.181 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: , Linus, Thomas is currently on vacation, but reviewed it and wanted me to send this fix on to you directly. thanks -john Benjamin Herrenschmidt pointed out that I further 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 by properly converting from a timespec64 to a timespec before passing the value on to the arch-specific vsyscall logic. Cc: LKML Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Benjamin Herrenschmidt Reported-by: Benjamin Herrenschmidt Reviewed-by: Thomas Gleixner 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); }