On 07/11/2013 11:04:23 PM, Wang Dongsheng-B40534 wrote:
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Thursday, July 11, 2013 5:43 AM
> To: Wang Dongsheng-B40534
> Cc: Wang Dongsheng-B40534; b...@kernel.crashing.org; Wood
Scott-B07421;
> johan...@sipsolutions.net; an...@enomsg.org;
ga...@kernel.crashing.org;
> linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH 2/2] powerpc/hibernate: add restore mmu context
after
> resume
>
> On 07/10/2013 05:11:54 AM, Wang Dongsheng-B40534 wrote:
> > > +void restore_mmu_context(void)
> > > +{
> > > + struct mm_struct *mm = current->active_mm;
> > > +
> > > + set_context(mm->context.id, mm->pgd);
> > > +
> > > + _tlbil_all();
> > > +}
> > > +EXPORT_SYMBOL(restore_mmu_context);
>
> What about targets that don't use tlb_nohash.c?
>
Yes, you are right, if we used PPC_STD_MMU, compilation error will
occur.
And _tlbil_all should be remove, because all of the tlb already
invalidated in swsusp_*.S .
So we should invalid tlb in swsusp_asm64.S & swsusp_booke.S on
freescale platform.
How about add restore_mmu_context(struct mm_struct* mm) into
"arch/powerpc/include/asm/mmu_context.h"
Path: arch/powerpc/include/asm/mmu_context.h
static void restore_mmu_context(struct mm_struct *mm)
{
set_context(mm->context.id, mm->pgd);
}
set_context() doesn't exist for hash MMUs.
Whatever you do, please try actually building it on various targets,
including both 32 and 64 bits, and both hash and non-hash. And make
sure that whatever effect PPC32 was depending on switch_mmu_context for
is preserved, including on non-booke.
-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev