Subject: Re: [PATCH 8/9] ps3: cleanup ps3fb before clearing HPTE

From: Geoff Levand <[email-masked]>
Date: Sat, 24 Mar 2007 16:46:41 -0700

Christoph Hellwig wrote:
>>>  static void ps3_hpte_clear(void)
>>  {
>> +
>> +#ifdef CONFIG_FB_PS3
>> +	ps3fb_cleanup();
>> +#endif
> 
> And well, adding framebuffer calls into the mmu code is rather fucked.
> This at least needs a big comment explaning the hypervisor braindamage
> that is responsible for this in colourfull language.

Sorry for such a late reply, but I'm now doing the kexec code and see
why it was put here (by the original author).  It is so you will have
debugging output until the very last possible moment during a kexec
shutdown.

The real problem is really that this routine (and the corresponding ppc_md
variable) are inappropriately named.  In the general case all that is left
to do is to call ppc_md.hpte_clear_all, but for ps3 we also want to do the
framebuffer shutdown here, so something like this should be better:

-static void ps3_hpte_clear(void)
+static void ps3_kexec_final(void)

-	ppc_md.hpte_clear_all = ps3_hpte_clear;
+	ppc_md.hpte_clear_all = ps3_kexec_final;

-Geoff