public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Geoff Levand <geoffrey.levand@am•sony.com>
To: benh@kernel•crashing.org
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom•com>,
	Linux/PPC Development <linuxppc-dev@ozlabs•org>
Subject: Re: PS3 early lock-up
Date: Mon, 4 Aug 2008 17:31:43 -0700	[thread overview]
Message-ID: <48979F6F.1050507@am.sony.com> (raw)
In-Reply-To: <1217886777.24157.91.camel@pasglop>

Hi,

Benjamin Herrenschmidt wrote:
>> > ps3_hpte_insert() seems to be called during system initialization with the
>> > following values of rflags:
>> >   - first call: 0x190
>> >   - initial memory: 0x194 (455 times)
>> >   - hotplug memory:
>> >       o crash: 0x115
>> >       o OK: 0x117
>> > 
>> > Do you have an idea of what's really going on?
>> 
>> Weird... Both look incorrect. In fact, it's a bit scary...
>> 
>> The one with the 7 at the end means that user space as RO access to
>> the segment (oops !) and supervisor too. The one with the 5 means
>> RO for user and RW for supervisor.
>> 
>> That is unless your HV is munging them in strange ways... I don't
>> know why LV1 is refusing a combination though.
>> 
>> As for the flags, it depends what htab_bolt_mapping() is called
>> with.
>> 
>> Do you have a backtrace ? I'm a bit lots in the mem hotswap code
>> trying to figure out where the mapping comes from..
> 
> Ah, found it... It should be ok... both the mapping of the RAM itself
> and vmemmap_populate() should be passing 
> 
>   _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX;
> 
> Which should be 0x194.

That is 0x190.

0x194 = _PAGE_EXEC | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX

> 
> Can you find out where that stupid value comes from ?

I didn't have time to look at in detail, but it fails from the
ioremap call in ps3_map_htab (arch/powerpc/platfroms/ps3/htab.c):

 htab = (__force struct hash_pte *)ioremap_flags(htab_addr, htab_size,
     pgprot_val(PAGE_READONLY_X));

IIRC, lv1 doesn't allow a read/write mapping of the htab, and that is
why I used pgprot_val(PAGE_READONLY_X) here.

I guess the value returned from pgprot_val(PAGE_READONLY_X)
changed in recent kernels, and that is what is causing the failure.

Just FYI, I put these in:

  printk("%s:%d: flags = %x\n", __func__, __LINE__, (_PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX));
  printk("%s:%d: flags = %x\n", __func__, __LINE__, pgprot_val(PAGE_READONLY_X));

and got this (and lv1_write_htab_entry failed):

  ps3_map_htab:288: flags = 190
  ps3_map_htab:289: flags = 117

-Geoff

  reply	other threads:[~2008-08-05  0:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 15:48 PS3 early lock-up Geert Uytterhoeven
2008-08-04 21:44 ` Benjamin Herrenschmidt
2008-08-04 21:52   ` Benjamin Herrenschmidt
2008-08-05  0:31     ` Geoff Levand [this message]
2008-08-05  1:40       ` Benjamin Herrenschmidt
2008-08-05  9:43         ` Geert Uytterhoeven
2008-08-05 10:28           ` Benjamin Herrenschmidt
2008-08-05 11:31             ` Benjamin Herrenschmidt
2008-08-05 23:24             ` Geoff Levand

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=48979F6F.1050507@am.sony.com \
    --to=geoffrey.levand@am$(echo .)sony.com \
    --cc=Geert.Uytterhoeven@sonycom$(echo .)com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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