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: Arnaud Patard <apatard@mandriva.com>
Date: Wed, 27 May 2009 11:51:11 +0200
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, Wu Zhangjin <wuzj@lemote.com>, Yan Hua <yanh@lemote.com>, Philippe Vachon <philippe@cowpig.ca>, Zhang Le <r0bertz@gentoo.org>, Zhang Fuxin <zhangfx@lemote.com>, loongson-dev <loongson-dev@googlegroups.com>, Nicholas Mc Guire <der.herr@hofr.at>, Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>
In-reply-to: <1483a7cb0f587bd329ea3ca8d3af2881afadaf5e.1243362545.git.wuzj@lemote.com> (wuzhangjin@gmail.com's message of "Wed, 27 May 2009 03:10:05 +0800")
Organization: Mandriva
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cover.1243362545.git.wuzj@lemote.com> <1483a7cb0f587bd329ea3ca8d3af2881afadaf5e.1243362545.git.wuzj@lemote.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (gnu/linux)
wuzhangjin@gmail.com writes:

Hi,

[...]

> +LEAF(swsusp_arch_resume)
> +     PTR_L t0, restore_pblist
> +0:
> +     PTR_L t1, PBE_ADDRESS(t0)   /* source */
> +     PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */
> +     PTR_ADDIU t3, t1, _PAGE_SIZE
> +1:
> +     REG_L t8, (t1)
> +     REG_S t8, (t2)
> +     PTR_ADDIU t1, t1, SZREG
> +     PTR_ADDIU t2, t2, SZREG
> +     bne t1, t3, 1b
> +     PTR_L t0, PBE_NEXT(t0)
> +     bnez t0, 0b

you really need to flush cache/tlb here. If you don't do that you'll get
some weird bugs.


Arnaud

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