[Top] [All Lists]

Re: [loongson-PATCH-v1 22/27] Hibernation Support in mips system

Subject: Re: [loongson-PATCH-v1 22/27] Hibernation Support in mips system
From: Atsushi Nemoto <>
Date: Tue, 26 May 2009 23:48:51 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <1243302188.9819.58.camel@localhost.localdomain> <>
On Tue, 26 May 2009 10:27:47 +0800, Hongbing Hu <> wrote:
> > Yes, the struct array method is more efficient, we will change to it.
> >   
> The length of registers  is different between  32bit kernel  and  64bit 
> kernel.
> That means the file hibernate.S wiil be divided into  hibernate_32.S  
> and hibernate_64.S ?

No, you can use macros in include/asm/asm.h to write common code for
32-bit/64-bit kernel.

> >> No, floating point registers are not saved on entering into kernel.
> >> They are saved on context switch.  
> >>     
> Yes, suspend to disk  will freeze processes at first,and i think the 
> process wiil save the float point regs.
> So there is no need to save them.

Hmm, but the floating point registers in _current_ task are not saved
(I think, but it this wrong?).

Maybe nobody might notice if ioctl() of the s2disk process clobbers
floating point registers, but I think something like this is needed:

        if (is_fpu_owner())
        if (cpu_has_dsp)

I'm not sure DSP part, and I also wonder other cp0 registers should be
saved or not ...

Atsushi Nemoto

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