linux-mips
[Top] [All Lists]

Re: [loongson-PATCH-v2 23/23] Hibernation Support in mips system

To: wuzhangjin@gmail.com
Subject: Re: [loongson-PATCH-v2 23/23] Hibernation Support in mips system
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Fri, 29 May 2009 00:44:52 +0900 (JST)
Cc: apatard@mandriva.com, huhb@lemote.com, linux-mips@linux-mips.org, ralf@linux-mips.org, yanh@lemote.com, philippe@cowpig.ca, r0bertz@gentoo.org, zhangfx@lemote.com, loongson-dev@googlegroups.com, der.herr@hofr.at, liujl@lemote.com, erwan@thiscow.com
In-reply-to: <1243450339.11263.125.camel@falcon>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1483a7cb0f587bd329ea3ca8d3af2881afadaf5e.1243362545.git.wuzj@lemote.com> <m3my8yoovk.fsf@anduin.mandriva.com> <1243450339.11263.125.camel@falcon>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 28 May 2009 02:52:19 +0800, Wu Zhangjin <wuzhangjin@gmail.com> wrote:
> diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S
> index 9dbe48e..1f06fd5 100644
> --- a/arch/mips/power/hibernate.S
> +++ b/arch/mips/power/hibernate.S
...
> @@ -39,6 +47,16 @@ LEAF(swsusp_arch_resume)
>         bne t1, t3, 1b
>         PTR_L t0, PBE_NEXT(t0)
>         bnez t0, 0b
> +       /* flush caches to make sure context is in memory */
> +       PTR_LA t1, flush_cache_all
> +       PTR_L t0, 0(t1)
> +       jalr t0
> +       nop

flush_cache_all is cache_noop on r4k.  Maybe __flush_cache_all ?

Also, you can write this like:

        PTR_L t0, flush_cache_all
        jalr t0

The nop just after the jalr is not needed since or are in "reorder"
mode here.

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>