[PATCH 2/3 -mm] kexec jump -v8 : add write support to oldmem device

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

 



On Dec 21, 2007 6:17 PM, Pavel Machek <pavel at ucw.cz> wrote:
> Hi!
>
> > This patch adds writing support for /dev/oldmem. This can be used to
> >
> > - Communicate between original kernel and kexeced kernel through write
> >   to some pages in original kernel.
> >
> > - Restore the memory contents of hibernated system in kexec based
> >   hibernation.
> >
> > Signed-off-by: Huang Ying <ying.huang at intel.com>
> >
> > --- a/arch/x86/kernel/crash_dump_32.c
> > +++ b/arch/x86/kernel/crash_dump_32.c
> > +ssize_t write_oldmem_page(unsigned long pfn, const char *buf,
> > +                       size_t csize, unsigned long offset, int
> > userbuf)
>
> > --- a/drivers/char/mem.c
> > +++ b/drivers/char/mem.c
> > @@ -348,6 +348,37 @@ static ssize_t read_oldmem(struct file *
> >       }
> >       return read;
> >  }
> > +
> > +/*
> > + * Write memory corresponding to the old kernel.
> > + */
> > +static ssize_t write_oldmem(struct file *file, const char __user *buf,
> > +                         size_t count, loff_t *ppos)
> > +{
> ...
> > +             rc = write_oldmem_page(pfn, buf, csize, offset, 1);
>
> I believe this is going to break compilation on non-32bit
> machines.

Yes, I will fix this.

Best Regards,
Huang Ying



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux