Subject: Re: [PATCH V2] powerpc/mm: Don't do debug print before we do feature fixup

From: Benjamin Herrenschmidt <[email-masked]>
Date: Sun, 19 Jun 2016 09:21:51 +1000

On Sat, 2016-06-18 at 23:57 +0530, Aneesh Kumar K.V wrote:
> We use feature fixup in segment and page fault path and hence we should
> not call any function that can cause either of these before we finish
> feature fixup.
> 
> Calling into early debug routine can result in segment fault as updated
> in https://lkml.kernel.org/r/CAOJe8K2L8D1M_yZPmyiZ11JvJ+HAS0aFHOnsqaY=[email-masked]
> 
> Avoid the segment fault by removing the debug print. Also remove the
> matching closing debug print at the end of the function.

Please add a comment at the beginning of setup_system() explaining
the situation. IE, that until the fixups are done, not even debug
printfs can be used.

It used to work though, the fact that we used 256M segment in that
case wasn't an issue, in part because btext only really existed on
machines that didn't have 1T segments. It was only ever going to be
a segment fault, the rest was bolted (early ioremap).

Ben.