From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0655FC2D0A8 for ; Sat, 26 Sep 2020 10:17:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABFBB238E5 for ; Sat, 26 Sep 2020 10:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726645AbgIZKRM (ORCPT ); Sat, 26 Sep 2020 06:17:12 -0400 Received: from [78.8.192.131] ([78.8.192.131]:20054 "EHLO orcam.me.uk" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725208AbgIZKRM (ORCPT ); Sat, 26 Sep 2020 06:17:12 -0400 X-Greylist: delayed 446 seconds by postgrey-1.27 at vger.kernel.org; Sat, 26 Sep 2020 06:17:11 EDT Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by orcam.me.uk (Postfix) with ESMTPS id 2F9902BE086; Sat, 26 Sep 2020 11:09:42 +0100 (BST) Date: Sat, 26 Sep 2020 11:09:41 +0100 (BST) From: "Maciej W. Rozycki" To: Damien Le Moal cc: "paul.walmsley@sifive.com" , "palmer@dabbelt.com" , "palmerdabbelt@google.com" , Anup Patel , "aou@eecs.berkeley.edu" , "anup@brainfault.org" , "linux-riscv@lists.infradead.org" , Alistair Francis , "linux-kernel@vger.kernel.org" , Atish Patra Subject: Re: [PATCH] RISC-V: Check clint_time_val before use In-Reply-To: <0e1990c99bf2a342cd2e78ec7ecfc2fdecaf67fb.camel@wdc.com> Message-ID: References: <20200926072750.807764-1-anup.patel@wdc.com> <1ee25b9bca3956d15a4a0dbf83f43d1ead454220.camel@wdc.com> <0e1990c99bf2a342cd2e78ec7ecfc2fdecaf67fb.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 26 Sep 2020, Damien Le Moal wrote: > > > Applying this on top of rc6, I now get a hang on Kendryte boot... > > > No problems without the patch on the other hand. > > > > Not sure about the issue with Kendryte but I get a crash on > > QEMU virt machine without this patch. > > With this applied in addition to your patch, it works. > > diff --git a/drivers/clocksource/timer-clint.c b/drivers/clocksource/timer- > clint.c > index d17367dee02c..8dbec85979fd 100644 > --- a/drivers/clocksource/timer-clint.c > +++ b/drivers/clocksource/timer-clint.c > @@ -37,7 +37,7 @@ static unsigned long clint_timer_freq; > static unsigned int clint_timer_irq; > > #ifdef CONFIG_RISCV_M_MODE > -u64 __iomem *clint_time_val; > +u64 __iomem *clint_time_val = NULL; > #endif Hmm, BSS initialisation issue? Maciej