Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1735855pxk; Sat, 26 Sep 2020 03:20:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV3zgaP133qLdDx7ivzDfSryAmYVepQn3OccBhxzUiwsjisSOn0diW/+P9rZrfSlLWkd9K X-Received: by 2002:a17:906:6c82:: with SMTP id s2mr7101404ejr.182.1601115645155; Sat, 26 Sep 2020 03:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601115645; cv=none; d=google.com; s=arc-20160816; b=TQTgrbc20SrTg1V5D7dA30DzsYgbtke0lKE0ahl2lFjulZMTxb6mgwL5BFGwEARAW+ 5ZA4HDOQvFRjKXATkPW9GZ055lECSGy/rmGKcYe+uQA9J+mz4B9KmRdVrhMTVS92crPS jyvPqw6EzwGJ1FSzTkpwey0sqGObc9V2+XADq6ajnsQU0zE5UUpZ3XWuJNrYGHyXm2KH IWMvRTzjCoULd8uXd1jqe9ksQ+8FXp0r2+gl5IhpUpRAJvcSLWf9EbNkr5eVlK5fzc9s zyAh4ibJZ6uzlXCbm0HSue7QKvMAKnZpcTmql3AMxpWTZTCRZS4gn0FlfH0AeBJakNcT v6rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=al9kmSAGKvscgI1WOUj4enjC5tXjsvmnCFzHNme3ZjI=; b=t6ZXEg3lw+9vtdh+3HjCK9Xlka2TVRMMnFgUSa3QJH77zZCZfKPJxuXtAEb3kRie92 +rHzi4kBezZwuyRQh7nxpbv4qqX87Nx5qTZWu0qQyHLNq9c6Lq1GQavaitwozp1Bu0zE pXOCF2Iej4DODrskGpLHpDUOR+sTXxOw7IbCkJCWi+NPhrREQVvrbHGasRIzmsRN3SsA 4AjZZLzY20ZLBTDqpMHSD//N72r4Zl29QaHCzpOUVpkbTltwaOom+CS7Gvi/YEAV0VWC hTiMQrZSVo2KmcYr/rC5p24mKIpUfnhGzPkjbpL6kYt6d7YQ99KeeyGOnx3vUu99pL5u egRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si4044999eja.565.2020.09.26.03.20.21; Sat, 26 Sep 2020 03:20:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbgIZKRM (ORCPT + 99 others); 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