From: Guenter Roeck <linux@roeck-us.net>
To: Ivid Suvarna <ivid.suvarna@gmail.com>
Cc: Kees Cook <keescook@chromium.org>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jason Baron <jbaron@redhat.com>,
Kernel development list <linux-kernel@vger.kernel.org>,
Joe Perches <joe@perches.com>,
linux-arm-msm@vger.kernel.org
Subject: Re: arm64: pstore: printk causing hang during boot in __memcpy_toio with pstore enabled
Date: Wed, 1 Aug 2018 10:25:49 -0700 [thread overview]
Message-ID: <20180801172549.GA16774@roeck-us.net> (raw)
In-Reply-To: <CABXF_ACKZXe+3J76bfyr4V1qdyhJ--cTekSXSVPksKOTxCBfTQ@mail.gmail.com>
On Wed, Aug 01, 2018 at 10:46:06PM +0530, Ivid Suvarna wrote:
> On Wed, Aug 1, 2018 at 6:49 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On 08/01/2018 05:35 AM, Ivid Suvarna wrote:
> >>
> >> Hi,
> >>
> >> When pstore is enabled and a *pr_info(any printk) in
> >> __memcpy_toio(arch/arm64/kernel/io.c)* is added, kernel wont boot and
> >> just hangs.
> >>
> >> The path where __memcpy_toio is called is below:
> >>
> >> ->persistent_ram_update
> >> -> memcpy_toio
> >> -> __memcpy_toio
> >>
> >> I tried with trace_printk and kernel boots fine. I understand that
> >> printk has overhead, but is this expected when we use some printk
> >> statement in __memcpy_toio?
> >>
> >
> > I think the problem may be that the printk() output is copied to pstore.
> > Since pstore calls memcpy_toio(), you get a nice recursion if you add a
> > printk() call to it.
> >
>
> Is there any solution to this other than not adding printk :p
Well, disabling pstore would help. You could also use a trace function,
as you already found out, or you could use gdb for debugging. Since
this is obviously a debug image, you should be willing to accept some
limitations/restrictions.
Guenter
next prev parent reply other threads:[~2018-08-01 17:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 12:35 arm64: pstore: printk causing hang during boot in __memcpy_toio with pstore enabled Ivid Suvarna
2018-08-01 13:19 ` Guenter Roeck
2018-08-01 17:16 ` Ivid Suvarna
2018-08-01 17:25 ` Guenter Roeck [this message]
2018-08-01 17:51 ` Ivid Suvarna
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=20180801172549.GA16774@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=ivid.suvarna@gmail.com \
--cc=jbaron@redhat.com \
--cc=joe@perches.com \
--cc=keescook@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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).