From patchwork Mon Jun 18 09:56:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138865 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3749049lji; Mon, 18 Jun 2018 02:57:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJbPPke6h4r83DGaYJWfqeDpVAIwI8lxaO03cJVgRkmvpt+TDG0l5Eds047VMcKGE8zjdrQ X-Received: by 2002:a17:902:246a:: with SMTP id m39-v6mr13352558plg.141.1529315844210; Mon, 18 Jun 2018 02:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529315844; cv=none; d=google.com; s=arc-20160816; b=IAZfH0A9no4lFLbtZVSZ4TmgXNn65tsgjAfV9+NBeagKQba/YcLghG103y/XcVUA92 RGowULkZhnRAz7jRKPcTadpBf8elm0b4p8uLG0lQKb3GZ3q4JdsPGKFhebkG09+snPTU YYDVP1fOvnyjHf93P+7a8XlemH2bVeNqyf4X4Y3gOtMzCpY98Um1C0V069CH7VmOSzqq MQ6BASGPCfUThdLVBA/nzSCMZ+IhrqAH0IHzdXzjZpvu55hcnigLTIQlYLmlez1l/z5K 16YKZC9uPicAewbqrxLuRRQ3MB0wXGIWEiTFpYoH5+syRsjLvLVK/XJmtjyDNCtiOoh4 BuAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/LxCFvs+e8rwp2gn+qhv8a8LMTTsOZXecQSs14is30U=; b=Yo1N/8C33iJIOeeQUePovcFo/JtOjBjiRkyJlK51+vN7wJ0tJOjQlKJ2qsJoogvIGW 7tl9a9zxkFojHpy3KOxfS3Hw3sJkF36O+MriiHCsZMvBZ94y0prPuUGZbyEns756/Kld /KKyohPIwqFA5ulC/l0QqLA4T9D6dz9NSFgI79YIwhjVdwz0g8hcXJ/dXjL/05u51+8d gl2uk3iBx5+H3elwW8J4Wsym9ta9DEqlW/+w1kSSTfhhGA+8V+Ljact1bS/m7Wsaqnnb tHiK7EyWSaF9rB8/9pc+maai6OxmEswG5fv3XAc0yxV4nFuCDLAkMM745J4wQfr4hzs4 X3nQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 134-v6si11993099pgc.116.2018.06.18.02.57.23; Mon, 18 Jun 2018 02:57:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965084AbeFRJ5W (ORCPT + 30 others); Mon, 18 Jun 2018 05:57:22 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:54357 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935593AbeFRJ5T (ORCPT ); Mon, 18 Jun 2018 05:57:19 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0LaaTv-1fvR4v1R1D-00mMr4; Mon, 18 Jun 2018 11:56:58 +0200 From: Arnd Bergmann To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: y2038@lists.linaro.org, Arnd Bergmann , Balbir Singh , Nicholas Piggin , Vaibhav Jain , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc: xmon: use ktime_get_coarse_boottime64 Date: Mon, 18 Jun 2018 11:56:24 +0200 Message-Id: <20180618095653.1538471-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:K3qWwbYJPc/0FMoxy267GVAqqc3hnz7jWsMa1gYPT2HjARst7vv ZrsO2Jp0O68fl795Hx/f+3d+9f32OEqixHzP9p8D8qHYlD5kssl5LAWKLXqPFENwJNGiWdh uS5NvWHaBgCpjrg+eyMviHgm/X54FFl5VWAOJXFpURaooU396HYJuzul1jhiOy3c7z06YCD 7jQdJmAt61FhzshCjm/jg== X-UI-Out-Filterresults: notjunk:1; V01:K0:9o4fSSy/kCI=:ojttosg+6EHzDkKSG+U349 oWAElekfUqsFTwFepEXEJj1pCBVn1dImnWc7RTmUugfpQXzKsianUHbH0cKK9W8zU5mhMhEfr lCfRANqMa0pW2E0DQsbmBRubz0z+3mHh33WHNy+9EGt2UsUe3WMpZg1pwAT9lNuXgmWeBHai4 eKWj4GefsBYz2B6eYawZ69o/LTSYByf7iGRHEAS9CJm4dRbssUBaFF998xCrXBCJbF//zDXwn fJNpzFMfYNnK7NTUl8C4iEuYvFQFjp2yeRfYTIUwHq7k9GvI/VBKXyW18/vFSd4psS1KXXN0H ISXKWCksAGashXT4139b1DhsPrZw3Jz8XwlCtjZoouen6ePLmj66oaCqYKPQvpu9VYIpgcF+k LAaQSoMoFTXaJJjEhsnjIt9V/Pyf6lq0xeElAUilZq1oew2K/dQ8ISDDJ7zXhYhENZcfzsOHR mScouWPNKROQ1LS6HBxnBFqDFXbaR/E1Vzyjy3zw2ScXhxnRTaVxnpkRzkJ08+qjjc+sFrSDJ FBvcTEIPIS0/vb5a1UacPXEZ9LLAq/ZRwOwlaqFMPlfPDcpONQojJN5WqzSkYvbtVM3ZQh1E7 x2tQEJS9DKqkEew6hORZRe5nJmwGPn/OY6iH6XFcJuMZqDXC8RbCctSccJbf9SqY/oDixsxuk iWOCm4givzIf/7ygwXKcwp9V7SkQdCM/BLZmdyAZsKZLJatjlcRvrm5RwqxMPM3b/DIQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org get_monotonic_boottime() is deprecated, and may not be safe to call in every context, as it has to read a hardware clocksource. This changes xmon to print the time using ktime_get_coarse_boottime64() instead, which avoids the old timespec type and the HW access. Signed-off-by: Arnd Bergmann --- arch/powerpc/xmon/xmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 Acked-by: Balbir Singh diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 47166ad2a669..45e3d0ec1246 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -918,13 +918,13 @@ static void remove_cpu_bpts(void) static void show_uptime(void) { - struct timespec uptime; + struct timespec64 uptime; if (setjmp(bus_error_jmp) == 0) { catch_memory_errors = 1; sync(); - get_monotonic_boottime(&uptime); + ktime_get_coarse_boottime_ts64(&uptime); printf("Uptime: %lu.%.2lu seconds\n", (unsigned long)uptime.tv_sec, ((unsigned long)uptime.tv_nsec / (NSEC_PER_SEC/100)));