Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1175167imm; Thu, 4 Oct 2018 09:16:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV63MBu5J/+Qr+ewdKaSEml0rB6/HWD7dc6aRrwCSe763mySHTMUpKDAk6u2LJKrO29xTshrQ X-Received: by 2002:a62:1551:: with SMTP id 78-v6mr7435695pfv.178.1538669811761; Thu, 04 Oct 2018 09:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538669811; cv=none; d=google.com; s=arc-20160816; b=SdejVMDBjF4+MzP7phiFqfAvsqzVEzCM5S4UKDHJ5a5RE8maIhf8XG5xal5+6WLcdm 9w8PBWtYif0tcJ2KAB1fCjdnJDKh5B7GiPNiaffx247fSPnNpnbXgijHHQxD19eLUbKx /tJmbI/kQgl+qCIZVw4n2gx6PyrwamQuCa1hTOVyGqUuu9ANZ7TWpl26wTlEuuTw0Bqd W/Vq3DOhkuYRGSAuHWoXN7cv0OdanniktvtgQZKW5sHy88HNKnCZPJuvwWpkSqK/vIuv I/YUQEyMnlOqivV7zOEBPrpcqDPHC3fdJohqvZFjsFvRyvCsnavkqiqyG0UrGpImA9tL yP+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iuRpfqVzTJ/N9hUMjgWok0dWs4Opn66MmB1YEQeHrD0=; b=zPSMIbNwhaqxIsBlB4ve2OPt2SvHrycRHujIQ51JHELydcEfSHmPy9jA74f872jtYB M5a/DJYTjHGYHBlCcaeMtx764gNXuIOR9bRY3uTfR8eZOb9MbVFMR8cUIt3BpcRXd6ui ZiEW+0eqz4AWrjlMovZX33yPH07C/TqMsEUqkXTNWNWz5Q0+YaDMuv2A46fZJiGP30GW nBqSFxEt0feChWp9pgKqoepkNYTAZD89qWc0aTQp5KCrFtNtaV1ag/Q2OPfnBMt1qqMX OFnH8fzjvs+vgDDx3c3oCOw3hEsV3EE8lbECLf5fylj476h/AH5NzSEM/GO99qslHy6N 7+pg== 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 y34-v6si5266380pgk.479.2018.10.04.09.16.36; Thu, 04 Oct 2018 09:16:51 -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 S1727966AbeJDXIo (ORCPT + 99 others); Thu, 4 Oct 2018 19:08:44 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:38886 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbeJDXIo (ORCPT ); Thu, 4 Oct 2018 19:08:44 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.0812346|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01e01546;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=17;RT=17;SR=0;TI=SMTPD_---.CzOm7Av_1538669673; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.CzOm7Av_1538669673) by smtp.aliyun-inc.com(10.147.44.129); Fri, 05 Oct 2018 00:14:33 +0800 Date: Fri, 5 Oct 2018 00:14:32 +0800 From: Guo Ren To: Daniel Lezcano Cc: tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, robh+dt@kernel.org, mark.rutland@arm.com, anurup.m@huawei.com, Jonathan.Cameron@huawei.com, will.deacon@arm.com, zhangshaokun@hisilicon.com, jhogan@kernel.org, paul.burton@mips.com, peterz@infradead.org, f.fainelli@gmail.com, arnd@arndb.de, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH V9 3/8] clocksource: add C-SKY SMP timer Message-ID: <20181004161431.GA30844@guoren-Inspiron-7460> References: <88e320f2-8cf0-fdb9-c9b0-ee25d7a4d00f@linaro.org> <20181002054024.GA12645@guoren> <49238cda-d12c-7d3f-9333-296527d94f12@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49238cda-d12c-7d3f-9333-296527d94f12@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 02, 2018 at 09:59:42AM +0200, Daniel Lezcano wrote: > On 02/10/2018 07:40, Guo Ren wrote: > [ ... ] > > >> > >> irq = irq_of_parse_and_map(np, 0); > >> if (irq <= 0) > >> return -EINVAL; > > panic(); > > I want a panic here. Return will make debug confused and directly tell > > the people where is wrong. It's root-timer for us and it must bootup. > > > > If it's a co-timer, I also think return is good. > > We don't need a panic in case of failure. If the board as an alternate > timer it should be able to boot, that is the general rule of thumb for > these drivers in this directory. > > The init timer functions will be called via the timer_probe() which > browse the timer_of_table (the one with all entries for the > TIMER_OF_DECLARE macros). > > You can see in the code below (from timer_probe.c), there is an error > message emitted if the driver fails to initialize and another one much > stronger if no timer was initialize. > > This is enough trace IMO. > > void __init timer_probe(void) > { > struct device_node *np; > const struct of_device_id *match; > of_init_fn_1_ret init_func_ret; > unsigned timers = 0; > int ret; > > for_each_matching_node_and_match(np, __timer_of_table, &match) { > if (!of_device_is_available(np)) > continue; > > init_func_ret = match->data; > > ret = init_func_ret(np); > if (ret) { > pr_err("Failed to initialize '%pOF': %d\n", np, > ret); > continue; > } > > timers++; Ok, let other timers boot up as possible and no panic for csky timer. Guo Ren