From patchwork Mon Jul 23 20:22:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 10180 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 88AD52402A for ; Mon, 23 Jul 2012 20:22:56 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4820BA18375 for ; Mon, 23 Jul 2012 20:22:56 +0000 (UTC) Received: by ggnf1 with SMTP id f1so6260007ggn.11 for ; Mon, 23 Jul 2012 13:22:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-content-scanned:x-cbid :x-gm-message-state; bh=WjUf5SG5XlCdiXza8oJREN3vSiEk5foXbmGPS9dLqUw=; b=WFpVoqany0C2rwVPOz9jJ+R9KNtjTXZqHwlXT+lmRfsEKFtXeuPU9bsZNxAfQhiCj/ j56heI7Qqg98bBNS8DYInJiBqDNeucqncnvIbwZwhk3UvctgWxwaL/uwQ+ObXtNT7AVP 50ioG/EvJayNbXTrps+CkFKwT2AOZD9eGfu/JWUDThypiQcbnMjidLXw14Qi67OrQYjb dLWlCzQpkQQHrS+txdYPAZI0HuN3bg8kOV31XlDJL4uzKWzdMB9WNV9nQJ0rXSOuy9cK OF70xvdEZmSvtCjayiPvggnTSNKoyd/vXcJbr6WQb30qpwNI+SI4evuLVPwHl3CW2nRM eb3A== Received: by 10.42.62.211 with SMTP id z19mr9649834ich.2.1343074975357; Mon, 23 Jul 2012 13:22:55 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.153.7 with SMTP id i7csp61547ibw; Mon, 23 Jul 2012 13:22:54 -0700 (PDT) Received: by 10.43.46.194 with SMTP id up2mr9635514icb.22.1343074974407; Mon, 23 Jul 2012 13:22:54 -0700 (PDT) Received: from e7.ny.us.ibm.com (e7.ny.us.ibm.com. [32.97.182.137]) by mx.google.com with ESMTPS id ut2si18556424icb.43.2012.07.23.13.22.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Jul 2012 13:22:54 -0700 (PDT) Received-SPF: neutral (google.com: 32.97.182.137 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=32.97.182.137; Authentication-Results: mx.google.com; spf=neutral (google.com: 32.97.182.137 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) smtp.mail=john.stultz@linaro.org Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Jul 2012 16:22:50 -0400 Received: from d01dlp01.pok.ibm.com (9.56.224.56) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 23 Jul 2012 16:22:48 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 9885B38C8045; Mon, 23 Jul 2012 16:22:47 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6NKMlFR360616; Mon, 23 Jul 2012 16:22:47 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6NKMlRq024978; Mon, 23 Jul 2012 17:22:47 -0300 Received: from kernel.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6NKMlSK024955; Mon, 23 Jul 2012 17:22:47 -0300 From: John Stultz To: LKML Cc: John Stultz , Ingo Molnar , Thomas Gleixner , Prarit Bhargava , Konrad Rzeszutek Wilk Subject: [PATCH] time: Fix casting issue in tk_set_xtime and tk_xtime_add Date: Mon, 23 Jul 2012 16:22:37 -0400 Message-Id: <1343074957-16541-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12072320-5806-0000-0000-00001797BBC1 X-Gm-Message-State: ALoCoQlHaCIpHOpqV88ayq6ISVhlI4oQC1UECzvjZ46Edn2IKxnoF8JnGq9E4eum2RadlZMf0yo2 Fix missing casts that can cause boot problems on 32bit systems, most easily observed with Xen systems. This issue was introduced w/ 1e75fa8be9fb61e1af46b5b3b176347a4c958ca1. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Prarit Bhargava Cc: Konrad Rzeszutek Wilk Reported-by: Konrad Rzeszutek Wilk Tested-by: Konrad Rzeszutek Wilk Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index f045cc5..cf364db 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -108,13 +108,13 @@ static struct timespec tk_xtime(struct timekeeper *tk) static void tk_set_xtime(struct timekeeper *tk, const struct timespec *ts) { tk->xtime_sec = ts->tv_sec; - tk->xtime_nsec = ts->tv_nsec << tk->shift; + tk->xtime_nsec = (u64)ts->tv_nsec << tk->shift; } static void tk_xtime_add(struct timekeeper *tk, const struct timespec *ts) { tk->xtime_sec += ts->tv_sec; - tk->xtime_nsec += ts->tv_nsec << tk->shift; + tk->xtime_nsec += (u64)ts->tv_nsec << tk->shift; } /**