From patchwork Wed Jul 11 12:53:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 141738 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp251869ljj; Wed, 11 Jul 2018 05:54:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdGnOj+QR7qEYwvIFujnB3KWoqWyULyPneaHQFqz84nRIHlk/ovIbR5lTAlYpk284wO07A+ X-Received: by 2002:a17:902:2884:: with SMTP id f4-v6mr28688717plb.204.1531313643329; Wed, 11 Jul 2018 05:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531313643; cv=none; d=google.com; s=arc-20160816; b=tzIW29ZZziwTVRfFhcPFNyvV6vSvMHEX9DthzA+f0BCjmTUtWux0wr8o+LWNgIthPP Ou6DKN4gzUEH8C/3mXExjrU7QyJunuVU1YJWsAtogGiyr+jlYsCAhQWSde8vWoJ7UNIH UzD6L73D6b/bB+FsLqd+XZODnz87s54S55AvRwDd28HvW3Q1kjGDLDY2WnZsLpEsryRF jnj24hAKBIzv1eHab6bXVUBUnxnXwnQY8jWw//eJSoJm1Z6sTWcQ9+vUsivB7zyvS6v0 ztWbRHRZwsO/yK6PPT6aEanXjfXk0v5xIQYBczcOPrSCoad3Pf4T2ihbIE+JJu6iYw4c I7Cg== 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=PEQNxtRcSVZ55VYGAsEpq8Jghl8nbVWdgIxqFWz7KIQ=; b=0ufT3lftrGYk/QPTtN13NTGJjt429ym+uv9uVmzcrTjRNWWkFNaCmjM2aFcM8pKvnj 64J0FGJ8EokRqRGmsp3oYfjM/FFvtmKe/xuDZ31mwUEo1lOQNfJ7v3AcUxpl7FWq/dGn OrRJZh0gLcxM0d8ePxOqBYwe3+yshb+szluxIpTGiwBGX/gXxrHe6CB9y5G8czZkoWRt dBNBiXdgKiSwquReDafxmb6SxgukMr4FJLZV8ZxOt7Ml11wILA0ZoO2NKRry1vcDnTb6 zFLFKzwBgczVSqEj05kQT7h8fLzwZ5FtUecDZ7S/GQsgHtsDXHvq2HGcZ7cYTU2jzOB6 3vMA== 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 j135-v6si21985464pfd.207.2018.07.11.05.54.03; Wed, 11 Jul 2018 05:54:03 -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 S1733191AbeGKM6N (ORCPT + 23 others); Wed, 11 Jul 2018 08:58:13 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:47673 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733079AbeGKM6M (ORCPT ); Wed, 11 Jul 2018 08:58:12 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0MNN9N-1fjX5A0QJN-006zWd; Wed, 11 Jul 2018 14:53:41 +0200 From: Arnd Bergmann To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: y2038@lists.linaro.org, Arnd Bergmann , Balbir Singh , Nicholas Piggin , Vaibhav Jain , Breno Leitao , Mathieu Malaterre , Yisheng Xie , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] [RESEND] powerpc: xmon: use ktime_get_coarse_boottime64 Date: Wed, 11 Jul 2018 14:53:23 +0200 Message-Id: <20180711125338.1365368-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:aQmqlEfX5gIb1xrvZhQLQ0kVYizyBD6g1rPrRJQGIegtv5mX8qX 2XlRYslK4bPnVwQw9gwVkflX6ejx9S0zqd+x4VnWQFfUuaeZeJv7EN1e5Ar1sCBj9OzqbnN 26rHYxxye48yb3fWpztsLVIf0rkR4fRsOR5GFVXVLcr6SEJmehw5iH9DmYcbrOvrjsW+S6q gakmuVFAEhU3jbZpJnIjw== X-UI-Out-Filterresults: notjunk:1; V01:K0:fASEmwXl75Q=:XMHBxE8Q8exiBAlxqis/iI FG/Qgmnp/Csi47C8hg1mtEvU0c2vlw7E/3xqBFvtdcg4Mafas7u/vkiNzh+WB1sd8aivfYWDC 1kTLRFkdAQeIGUO2Wqiw98tyOedJ3aVTGeccnmWY4E/a6oaf3PKAN5GxQoJopApelYNKXwKVf Eerd/ElitppYypSy5PvSy04Zs+p8wibB9Sn3LjgPZMiEpl5SX3doo0O5T1DwU0ebJT6ntcTR2 MxPeFfkT9lVyFPVEkwQ/rmoT7kmV1TfR26GhPdpsxmkSI0l8jjOO+B2Qir9eJxBygKLCMoiUp F1uYy4bzXb9DuQymYitKsNjLyGueBllBa/axXaTBZ5HEcqmiThlbus7Z8R5mfMh9NvPiOpK7h ZZRBkBoVSlVVBkDD+UWBMh5lnx0GeMZFkWzg/pQN+Hw72k0QruWSkJ3nnWJGOLSMthtDHpgI6 wem1+E+vnx0zjHE+vfGKlV0zAcxag23W6/7Jg5nhp2K7QcR5qYltWhNZ9ixUkIccY33+Jrvvh n3NBjLLSxBo0eRFQNXt4Y0Am+ZF216+gIgdb8kRJ7jhYecMk7dR4F6zbpfsdXwMOvAPX0cpTr 0Lx0XkelIn0YByWW4b7CWH6DaDotaQ24FVz6QndrJfRfVBj30ag6ie3BcLjn+ZTn9GHA6Y9Ze OVlFHcymKXBbHhhDLSOwM7OqQP4pGXudpcHqMjvFl8pP/oim+2r8roD0lDnpKsvmmvFo= 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. Acked-by: Balbir Singh Signed-off-by: Arnd Bergmann --- Originally sent Jun 18, but this hasn't appeared in linux-next yet. Resending to make sure this is still on the radar. Please apply to the powerpc git for 4.19 --- arch/powerpc/xmon/xmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 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)));