From patchwork Wed Jun 1 21:12:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9148141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 87FE760751 for ; Wed, 1 Jun 2016 21:13:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A7B6200F4 for ; Wed, 1 Jun 2016 21:13:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F1E726C2F; Wed, 1 Jun 2016 21:13:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC542200F4 for ; Wed, 1 Jun 2016 21:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbcFAVNA (ORCPT ); Wed, 1 Jun 2016 17:13:00 -0400 Received: from mout.gmx.net ([212.227.17.20]:54912 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbcFAVM7 (ORCPT ); Wed, 1 Jun 2016 17:12:59 -0400 Received: from p100.box ([92.203.1.217]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MhQju-1auPeD0Ur4-00Met5; Wed, 01 Jun 2016 23:12:51 +0200 Date: Wed, 1 Jun 2016 23:12:48 +0200 From: Helge Deller To: Mikulas Patocka Cc: linux-parisc@vger.kernel.org Subject: Re: invalid printk time during boot on PA-RISC Message-ID: <20160601211248.GA15061@p100.box> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:MSWBngI9THLhWVPZCp8CfeqqQaplw3SWb/BkvyLjYo0KduwiKvE gnr6ySMTlbwvopeDM4al25VGcy8Sy7DHE8VPO/+a9dQ7VEBgnTRu/OhZMIA2cAcqJcaTScv vpWO2eUF8cMccSTYDAhBxYenZspvQujxg+/6oDQQYO1e+de2bSSicn6mWe93jQyraaZb4PO WZwOLLaqmsTxcM7TLX7vA== X-UI-Out-Filterresults: notjunk:1; V01:K0:aQDHvP0zY98=:4bwxEiLvoMZPslGDFZ867M 6absUW+F1QSPkHRsStufNJKPlXG1e5JcffhfNauoq6umW+ys5N/uADqKMxK8+OZ8zKAq1KE5W n6y9XUWb1kwd85btRbsTTgt66ozODgXOJNjavPl86tvOskfNIvpbH/DVlLwm6U1TiVUs9jOZ1 nwgwy/SCNOsyIHllStJ2/u+7D06QPId5p1wb1y88kT8uXv/trE7tjkVN4Kd5elurSa0Loh70Y h6rutxlOrjDtBikkpNNAsI8uXvBBi79z2aiyPXjWDTPMCKY06pUxYm3zGCsXfYChGW7urofVQ lo4yoNSLsWdySTPP6SZnOTYHNHjh6yZNpknZODGAaa25HEGm9uTp3tVgxYHSKgB77PqsxmT5R 6TFeyE/Oty3jymnjpp/et3CMfDXTIhFK674PE1EAtJNNLvm14ZA4AXo8vUccrWqtXyhepp0Cw 9PbNqXyGjSBdD0IIsFpWhv2rpwRSu5KeXDjHHDOHNdfdF+eZixLy2eGWIDQe5QRsLAW39MXDK zQyPbdQdfs8/uwgQxK8xdskzvsLUCKbmMxyopjlxVB5tjpIfP6JvXrnf21DK8/FYLl589PP4y EgGyfbWJqjKU4mE7+vJBwGl0OIZvZBXfAU7IM//GsULUizBGGM78PqR49LlU6EpAdSC6U7duM 3NI2FYBWkAmOc5o511tX/8rvqpgA7OTdsoK4DoxIii/oJhzG6E3mu31lUeQDRc9v6Vs1m+lek adYmwJmggwZ//HpxzRrseptVyYfu5KevZuFrkAeh6X8O0lLN3kalulKcK6c= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * Mikulas Patocka : > Hi > > With the kernel 4.7-rc1, I get corrupted printk times when the machine > boots. The kernel is compiled with "Show timing information on printks" > (CONFIG_PRINTK_TIME) enabled. There are no other negative effects. > > Bisecting shows that it is caused by the patch > 54b668009076caddbede8fde513ca2c982590bfe ("parisc: Add native > high-resolution sched_clock() implementation"). > > [ 0.000000] NR_IRQS:80 > [ 0.000000] clocksource: cr16: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns > [ 0.000000] Console: colour dummy device 160x64 > [ 90.122205] Calibrating delay loop... 1991.60 BogoMIPS (lpj=3317760) > [ 90.224168] pid_max: default: 32768 minimum: 301 > .... > [ 92.235878] 13. Crestone Peak Core RS-232 at 0xfffffff0f05e2000 [18] { 10, 0x0, 0x076, 0x000ad } > [ 92.708000] Releasing cpu 1 now, hpa=fffffffffe781000 > [ 92.818803] FP[1] enabled: Rev 1 Model 20 > [ 2.917508] Releasing cpu 2 now, hpa=fffffffffe798000 > [ 0.196666] FP[2] enabled: Rev 1 Model 20 > [ 3.116794] Releasing cpu 3 now, hpa=fffffffffe799000 > [ 0.196666] FP[3] enabled: Rev 1 Model 20 > [ 3.296942] CPU(s): 4 out of 4 PA8900 (Shortfin) at 1000.000000 MHz online > [ 3.447762] Setting cache flush threshold to 65536 kB > [ 3.450548] Setting TLB flush threshold to 1020 kB Please try attached patch. It fixes the problem mostly for me, there is just one little glitch left, which is that the lines "FP[x] enabled" will still print an invalid time. I assume it's because when this text is printed, the clock/interrupts for the just booted CPU aren't enabled yet. I'm not sure it's worth trying to fix that. One could print out that info at a later time, or just disabled it. Helge [ 5.720014] Enabling PDC_PAT chassis codes support v0.05 [ 6.644542] Releasing cpu 1 now, hpa=fffffffffe781000 [ 0.196000] FP[1] enabled: Rev 1 Model 20 [ 7.088432] CPU(s): 2 out of 2 PA8800 (Mako) at 900.000000 MHz online ----------- [PATCH] parisc: Fix printk time during boot Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 58dd680..31ec99a 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -309,11 +309,6 @@ void __init time_init(void) clocks_calc_mult_shift(&cyc2ns_mul, &cyc2ns_shift, current_cr16_khz, NSEC_PER_MSEC, 0); -#if defined(CONFIG_HAVE_UNSTABLE_SCHED_CLOCK) && defined(CONFIG_64BIT) - /* At bootup only one 64bit CPU is online and cr16 is "stable" */ - set_sched_clock_stable(); -#endif - start_cpu_itimer(); /* get CPU 0 started */ /* register at clocksource framework */