[PATCH] powerpc: Decode correct MSR bits in oops output

Josh Boyer jwboyer at gmail.com
Tue Nov 29 07:12:53 EST 2011


On Mon, Nov 28, 2011 at 3:04 PM, Scott Wood <scottwood at freescale.com> wrote:
> On 11/28/2011 01:46 PM, Josh Boyer wrote:
>> On Mon, Nov 28, 2011 at 2:30 PM, Scott Wood <scottwood at freescale.com> wrote:
>>> On 11/28/2011 10:23 AM, Josh Boyer wrote:
>>>> On Mon, Nov 28, 2011 at 11:04 AM, Kumar Gala <galak at kernel.crashing.org> wrote:
>>>>>
>>>>> Since you're fixing this can you add the following for CONFIG_BOOKE:
>>>>>
>>>>> MSR_GS, MSR_UCLE, MSR_PMM, MSR_CM
>
> PMM is not just BookE, and is already present in the patch.
>
> RI is present on e500mc (despite being reserved in book3e), so might not
> want to stick that inside #ifndef CONFIG_BOOKE.
>
>>> Not all bits are going to exist on all CPUs -- does 4xx use these bits
>>> to mean something different?
>>
>> No, marked as reserved.  However, given the patch shows up in human
>> readable output, I don't think we want reserved bits being decoded and
>> showing up inadvertently.
>
> Do the bits ever actually get set on 4xx (documented or otherwise), or
> is this a theoretical concern?
>
> If 4xx must be excluded, use something like:
> #if defined(CONFIG_BOOKE) && !defined(CONFIG_4xx)

I was going for something a bit simpler.  Basically, CONFIG_BOOKE
should be treated as a legacy Kconfig variable that has nothing to do
with ISA 2.06 because it existed before that and is used by things
that aren't compliant with 2.06 (both FSL and 4xx).  If we use it for
things that show up on these non-compliant CPUs, we'll have to
continually add the !defined(WHATEVER) and that just gets ugly over
time.

> Do we also need to patch out things like MSR_VEC at runtime, in case it
> randomly shows up on a pre-Altivec CPU?
>
>> Could introduce BOOK3E_32 to cover cases like this.
>
> Why _32?  These bits apply to 64-bit as well.  MSR_CM is only for 64-bit.

Because CONFIG_BOOK3E depeonds on PPC_BOOK3E_64.  So either that
dependency needs to go so it's selectable elsewhere, or a similarly
intended PPC_BOOK3E_32 needs to get created.  Or something.

> UCLE and PMM are present on pre-2.06 e500 cores as well.

Sigh.  Maybe there is no way to get un-ugly.

josh


More information about the Linuxppc-dev mailing list