From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
Steven Rostedt <rostedt@goodmis.org>,
Stephen Boyd <sboyd@kernel.org>
Cc: Joel Fernandes <joel@joelfernandes.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Andy Gross <andy.gross@linaro.org>,
David Brown <david.brown@linaro.org>,
Jiri Slaby <jslaby@suse.com>, Kees Cook <keescook@chromium.org>,
Geliang Tang <geliangtang@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pramod Gurav <gpramod@codeaurora.org>,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Rajendra Nayak <rnayak@codeaurora.org>,
Vivek Gautam <vivek.gautam@codeaurora.org>,
Sibi Sankar <sibis@codeaurora.org>
Subject: Re: Crash in msm serial on dragonboard with ftrace bootargs
Date: Thu, 15 Nov 2018 10:53:24 +0000 [thread overview]
Message-ID: <ed648cc5-0748-8bcc-5ebb-ce6dbc7d4fee@linaro.org> (raw)
In-Reply-To: <8f65f83b-8cd9-5e35-c324-30b86390906e@codeaurora.org>
On 15/11/18 10:33, Sai Prakash Ranjan wrote:
> 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?
>
Yes, this is not the solution, but it proves that the hand-off between
booloaders and kernel is the issue.
In general there is wider issue with resources hand-off between
bootloader and kernel.
There has been some proposal in the past by Viresh for a new framework
called boot-constriants (https://lkml.org/lkml/2017/12/14/440) which am
not sure if its still actively looked at. But something similar should
be the way to address such issues.
--srini
> Thanks,
> Sai
next prev parent reply other threads:[~2018-11-15 10:53 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 11:38 Crash in msm serial on dragonboard with ftrace bootargs Sai Prakash Ranjan
2018-10-16 11:44 ` Greg Kroah-Hartman
2018-10-16 11:58 ` Sai Prakash Ranjan
2018-10-16 15:29 ` Steven Rostedt
2018-10-16 16:35 ` Sai Prakash Ranjan
2018-10-16 16:57 ` Steven Rostedt
2018-10-16 17:36 ` Sai Prakash Ranjan
2018-10-16 17:48 ` Steven Rostedt
2018-10-16 18:05 ` Sai Prakash Ranjan
2018-10-16 18:16 ` Steven Rostedt
2018-10-16 18:25 ` Sai Prakash Ranjan
2018-10-16 18:41 ` Steven Rostedt
2018-10-16 19:01 ` Sai Prakash Ranjan
2018-10-16 19:03 ` Steven Rostedt
2018-10-16 19:06 ` Sai Prakash Ranjan
2018-10-16 19:15 ` Steven Rostedt
2018-10-16 19:16 ` Steven Rostedt
2018-10-16 19:37 ` Sai Prakash Ranjan
2018-10-16 19:35 ` Sai Prakash Ranjan
2018-10-16 20:51 ` Stephen Boyd
2018-10-17 11:27 ` Sai Prakash Ranjan
2018-10-18 2:33 ` Steven Rostedt
2018-10-18 5:21 ` Sai Prakash Ranjan
2018-10-18 13:17 ` Steven Rostedt
2018-10-19 4:17 ` Joel Fernandes
2018-10-19 6:54 ` Sai Prakash Ranjan
2018-10-19 13:51 ` Steven Rostedt
2018-10-19 14:48 ` Sai Prakash Ranjan
2018-10-19 15:12 ` Steven Rostedt
2018-10-25 14:36 ` saiprakash.ranjan
2018-11-13 9:44 ` Srinivas Kandagatla
2018-11-15 10:33 ` Sai Prakash Ranjan
2018-11-15 10:53 ` Srinivas Kandagatla [this message]
2018-11-16 3:39 ` Viresh Kumar
2018-11-16 10:49 ` Sai Prakash Ranjan
2018-10-16 17:02 ` Kees Cook
2018-10-17 10:13 ` Joel Fernandes
2018-10-17 11:38 ` Sai Prakash Ranjan
2018-10-17 14:49 ` Sai Prakash Ranjan
2018-10-17 17:56 ` Joel Fernandes
2018-10-17 18:25 ` Kees Cook
2018-10-16 23:09 ` Joel Fernandes
2018-10-17 11:53 ` Sai Prakash Ranjan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed648cc5-0748-8bcc-5ebb-ce6dbc7d4fee@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=david.brown@linaro.org \
--cc=geliangtang@gmail.com \
--cc=gpramod@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=joel@joelfernandes.org \
--cc=jslaby@suse.com \
--cc=keescook@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=rnayak@codeaurora.org \
--cc=rostedt@goodmis.org \
--cc=saiprakash.ranjan@codeaurora.org \
--cc=sboyd@kernel.org \
--cc=sibis@codeaurora.org \
--cc=vivek.gautam@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).