Static register access from outside scall_o32.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there.  I'm porting vmadump (a process checkpoint module) to
Linux/MIPS.  The thing now works, but to make it go I had to adjust
the entry and exit points in arch/mips/kernel/scall_o32.S such that
they always do SAVE_ALL and RESTORE_ALL_AND_RET.

Normally, it appears that "static" registers and probably a few others
are either left alone by the kernel code or stored on the stack
somewhere by the syscall and/or subsequent jump instructions.

Anywho, the rub is that the vmadump code needs for the passed-in
pt_regs to be complete, and needs for the syscall return path from it
to fully restore from pt_regs if it has been modified.  Obviously I'd
like to do this without making all syscalls store everything.

I see that marking the task for rescheduling will make all the
registers be saved and restored, but that's either *after* I'm
supposed to have copied all the register contents, or *before* I've
written new information to the pt_regs, so that's not it.

Is there any nice way to read and/or modifiy the static and other
"!SOME" register values from within my system call implementation?  I
assume I can find them on the stack somewhere, but that seems awfully
ugly.

-- 
Grant Taylor - gtaylor@picante.com - http://www.picante.com/~gtaylor/
  Linux Printing Website and HOWTO:  http://www.linuxprinting.org/

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux