On Tue, 26 May 2009 10:27:47 +0800, Hongbing Hu <huhb@xxxxxxxxxx> 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()) save_fp(current); if (cpu_has_dsp) save_dsp(p); I'm not sure DSP part, and I also wonder other cp0 registers should be saved or not ... --- Atsushi Nemoto