Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7853692imu; Thu, 15 Nov 2018 02:34:33 -0800 (PST) X-Google-Smtp-Source: AJdET5etspKJXduf3XgoZyYGkIWvnfPNLDMhAbnspTeHJHQsqjdPE5EySGUCKTDnNG7gS9fqjIxB X-Received: by 2002:aa7:80ce:: with SMTP id a14-v6mr5786029pfn.86.1542278073458; Thu, 15 Nov 2018 02:34:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542278073; cv=none; d=google.com; s=arc-20160816; b=LA2TC3N6w2UD3YP/6nyDzWExjDsZyHgq4LA9GMXAsj0cXSXKuOIAUA+A7eRawUAZ7V 8iheW0yWixhG6zGr93UcskCBPv96vWa7SRA5Dx35ZZYhkllWMBmk5wsmV9x+n83oQ/yv 1dKC5RaWz7k68uMHloBqPzISWyCp6RGxoshWItEr7SoBQG8Yb0jfn43NSdjMyudqvJpa 7vRWmr+2SCxpw4N3xyEHGKhZBupVt/mcIGOmKgo0pqkQFysfnoA0zy74Exm1CG4LlXc3 9FHBW4q7jwiv/bIxVmpX5Cse28GIptqmS28Lvr17xIZ70IE6TanCecfYkxmeHWiBIYuF L96A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=fpG7cMbP98uwcY1IMuA5JFlk8akZjXJ0Yczu/q7s3M4=; b=XN6dtZFqrTJnKxBKp81lpeZCzMsogni2Me1o29Db6Cd9zdQMESHp5No5qjmWAJG1uq 1Z7/qRKqDDyGgbdO7DpbMxF0lI8/oHjmAHpLxYd/ENlMl8orfp6iaqmDO0Wk2V9ozCaZ HWmNgzbZXN73IIsRCKN9mfKnlr3Sq0sOngs7QBDN3zQ7/BCgF6JTCHSBejfdXdkt1m3E m/5Zmqn0Cg9Ha3aYas3z5jfMg49ilYVLx7T9ExFPJUCVh9yMqix4ylldIrsilyROHokX yJCECFBQjr+GvjeKR+2Lq/LSI1kWo/c5aB9s3OA2STR2scgaNB7lifFDJ+SdyCuY9SzF qAbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="iz994EL/"; dkim=pass header.i=@codeaurora.org header.s=default header.b=UHe3iMsV; 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 p64si34372pfg.79.2018.11.15.02.34.18; Thu, 15 Nov 2018 02:34:33 -0800 (PST) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b="iz994EL/"; dkim=pass header.i=@codeaurora.org header.s=default header.b=UHe3iMsV; 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 S2387657AbeKOUk4 (ORCPT + 99 others); Thu, 15 Nov 2018 15:40:56 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:55384 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728609AbeKOUk4 (ORCPT ); Thu, 15 Nov 2018 15:40:56 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EA06960764; Thu, 15 Nov 2018 10:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1542278019; bh=UcrABndtdwZgroMuLed8/vaasjc83k8jpPRjBe6hup4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=iz994EL/h4OgrXHnzxHtI0ne5htdqLba9UlCPh0W+rZ6eWufdmHMCCRPUcUv2KBv6 jjcIYGqtnJaA97LK7gVXpMZjY/pccyXWp+8M2h7r5LuA3FvRVAln5sxgogxEhj38jj QpgQCOQiqEn+zm/bXEexIBqaD6f/lbbifcodISTw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.79.128.176] (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9308F6020B; Thu, 15 Nov 2018 10:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1542278018; bh=UcrABndtdwZgroMuLed8/vaasjc83k8jpPRjBe6hup4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UHe3iMsVMg9sYb5TbuX13dRc796EVZPC2qsAQDv1vYe/4Blc4hX/iHwoGs1q0hWgi 8bmkMiZb/t3GFyHduTYnjr2J5T1STynx4I8ZqyTwWZxw/YjUoWHh8FK8Wv8ZKMWGgv rXH4bnCfZW0CZcFEJ3+R6xu9DGaXCxFqm7w6m+wY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9308F6020B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=saiprakash.ranjan@codeaurora.org Subject: Re: Crash in msm serial on dragonboard with ftrace bootargs To: Srinivas Kandagatla , Steven Rostedt , Stephen Boyd Cc: Joel Fernandes , Bjorn Andersson , Andy Gross , David Brown , Jiri Slaby , Kees Cook , Geliang Tang , Greg Kroah-Hartman , Pramod Gurav , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Rajendra Nayak , Vivek Gautam , Sibi Sankar References: <472db11e-49a6-a1ee-e298-791ee1bbb10b@codeaurora.org> <20181016141610.639b9000@gandalf.local.home> <20181016144123.24c47b38@gandalf.local.home> <7781815e-cba2-9e36-db6d-268298747876@codeaurora.org> <20181016150328.3450d718@gandalf.local.home> <20181017223334.29ca2837@vmware.local.home> <58d2474c-53cd-e6cb-2d25-db38d1a88da6@codeaurora.org> <20181018091706.62310b38@gandalf.local.home> <20181019041740.GB141835@joelaf.mtv.corp.google.com> <8a75f2d5-f1bd-504e-b545-ae2e2f61ca8f@codeaurora.org> <20181019095122.0f1c0946@gandalf.local.home> <9cafe321-87f6-98a3-3bda-c2f7a3d7fc67@codeaurora.org> <20181019111205.5c8e98e8@gandalf.local.home> <1e6cc1fa5263b9edfcf7567d3f9f65fd@codeaurora.org> <38099043-f5ed-6d81-bf94-13f61cfa8507@linaro.org> From: Sai Prakash Ranjan Message-ID: <8f65f83b-8cd9-5e35-c324-30b86390906e@codeaurora.org> Date: Thu, 15 Nov 2018 16:03:29 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <38099043-f5ed-6d81-bf94-13f61cfa8507@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/13/2018 3:14 PM, Srinivas Kandagatla wrote: > Hi Sai, > > > > On 25/10/18 15:36, saiprakash.ranjan@codeaurora.org wrote: >> "If I disable dma node and LS-UART0, then I don't see any crash and >> ftrace also works fine" >> >> And one more observation is that even without ftrace cmdline, if I use >> earlycon and disable dma, I face the same crash. >> >> So basically this seems to be some kind of earlycon and dma issue and >> not ftrace(I can be wrong). >> >> So adding Srinivas for more info on this dma node. > > Its Interesting that my old email conversations with SBoyd show that I > have investigated this issue in early 2016! > > My analysis so far: > > This reason for such behavior is due the common iface clock > (GCC_BLSP1_AHB_CLK) across multiple drivers(serial ports, bam dma > and other low speed devices). > The code flow in DB410C is bit different, as the uart0 is first > attempted to set as console and then uart1, this ordering triggers > pm state change uart_change_pm(state, UART_PM_STATE_OFF) from serial > core while setting up uart0, this would go and disable all the > clocks for uart0. > As uart1 is not setup Yet, and earlycon is still active, any > attempts by earlycon to write to registers would trigger a system > reboot as the clock was just disabled by uart0 change_pm code. > > This can even be triggered with any drivers like spi which uses same > clock I guess. > > Hope it helps, > > Either earlycon needs to reference the clocks or those clocks needs to > be marked always-on (but only with earlycon). > >> >> Also just for a note: apq8096-db820c.dtsi shows UART0 is disabled because >> bootloader does not allow access to it. Could this also be the case >> for db410c? > No, this is not the case with DB410c. DB820c has added restrictions in > TZ, I think new booloaders should have solved this issue. > > Hi Srinivas, Thanks a lot for pointing out the cause of crash. I just tried setting GCC_BLSP1_AHB_CLK with flag CLK_IS_CRITICAL and the crash disappears. But I suppose setting CLK_IS_CRITICAL is not the solution? Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation