Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1041532AbdDURk5 (ORCPT ); Fri, 21 Apr 2017 13:40:57 -0400 Received: from mail.skyhub.de ([5.9.137.197]:56176 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161124AbdDURkW (ORCPT ); Fri, 21 Apr 2017 13:40:22 -0400 Date: Fri, 21 Apr 2017 19:26:03 +0200 From: Borislav Petkov To: "Baicar, Tyler" Cc: christoffer.dall@linaro.org, marc.zyngier@arm.com, pbonzini@redhat.com, rkrcmar@redhat.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, rjw@rjwysocki.net, lenb@kernel.org, matt@codeblueprint.co.uk, robert.moore@intel.com, lv.zheng@intel.com, nkaje@codeaurora.org, zjzhang@codeaurora.org, mark.rutland@arm.com, james.morse@arm.com, akpm@linux-foundation.org, eun.taik.lee@samsung.com, sandeepa.s.prabhu@gmail.com, labbott@redhat.com, shijie.huang@arm.com, rruigrok@codeaurora.org, paul.gortmaker@windriver.com, tn@semihalf.com, fu.wei@linaro.org, rostedt@goodmis.org, bristot@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-efi@vger.kernel.org, devel@acpica.org, Suzuki.Poulose@arm.com, punit.agrawal@arm.com, astone@redhat.com, harba@codeaurora.org, hanjun.guo@linaro.org, john.garry@huawei.com, shiju.jose@huawei.com, joe@perches.com, rafael@kernel.org, tony.luck@intel.com, gengdongjiu@huawei.com, xiexiuqi@huawei.com Subject: Re: [PATCH V15 03/11] cper: add timestamp print to CPER status printing Message-ID: <20170421172603.4574wonnm5tgvbcn@pd.tnic> References: <1492556723-9189-1-git-send-email-tbaicar@codeaurora.org> <1492556723-9189-4-git-send-email-tbaicar@codeaurora.org> <20170421122150.76cce2cfrt767glv@pd.tnic> <35cc4ae0-e8fa-fd3a-5d7f-243ed2e82ea0@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <35cc4ae0-e8fa-fd3a-5d7f-243ed2e82ea0@codeaurora.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 967 Lines: 34 On Fri, Apr 21, 2017 at 10:04:35AM -0600, Baicar, Tyler wrote: > This is basically what I already had in v14...you asked to move it into a > different if-statement? https://lkml.org/lkml/2017/4/12/397 Well, clearly I've been smoking some nasty potent sh*t. :-\ /me goes and looks at the spec: "Bit 0 – Timestamp is precise if this bit is set and correlates to the time of the error event." So why are we even printing the timestamp when !precise? IOW, I think we should do: if (!(timestamp[3] & 0x1)) printk("%stimestamp imprecise\n", pfx); else { sec = .. min = ... ... } and print the actual values only when the timestamp is precise. Otherwise it has *some* values which could just as well be completely random. And it's not like we're reporting the error tomorrow - it is mostly a couple of seconds from logging to the fw pushing it out... -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.