[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH RFC 03/16] Save/Restore Support: Declare kernel and arch pre/post suspend functions
Bruno Alvisio, on mar. 19 déc. 2017 15:41:58 -0800, wrote: > For mini-OS to support suspend and restore, the kernel will have to suspend > different modules such as xenbus, console, irq, etc. During save/restore the > kernel and arch pre_suspend and post_suspend functions will be invoked to > suspend/resume each of the modules. > > Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> > --- > arch/x86/setup.c | 10 ++++++++++ > include/kernel.h | 2 ++ > include/x86/os.h | 4 ++-- > kernel.c | 10 ++++++++++ > 4 files changed, 24 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/setup.c b/arch/x86/setup.c > index 5278227..3dd86f9 100644 > --- a/arch/x86/setup.c > +++ b/arch/x86/setup.c > @@ -204,6 +204,16 @@ arch_init(void *par) > start_kernel(); > } > > +void arch_pre_suspend(void) > +{ > + > +} > + > +void arch_post_suspend(int canceled) > +{ > + > +} > + > void > arch_fini(void) > { > diff --git a/include/kernel.h b/include/kernel.h > index d37ddda..161d757 100644 > --- a/include/kernel.h > +++ b/include/kernel.h > @@ -5,6 +5,8 @@ > extern char cmdline[MAX_CMDLINE_SIZE]; > > void start_kernel(void); > +void pre_suspend(void); > +void post_suspend(int canceled); > void do_exit(void) __attribute__((noreturn)); > void arch_do_exit(void); > void stop_kernel(void); > diff --git a/include/x86/os.h b/include/x86/os.h > index d155914..a73b63e 100644 > --- a/include/x86/os.h > +++ b/include/x86/os.h > @@ -71,10 +71,10 @@ void trap_fini(void); > void xen_callback_vector(void); > #endif > > +void arch_pre_suspend(void); > +void arch_post_suspend(int canceled); > void arch_fini(void); > > - > - > #ifdef CONFIG_PARAVIRT > > /* > diff --git a/kernel.c b/kernel.c > index 0d84a9b..90c865a 100644 > --- a/kernel.c > +++ b/kernel.c > @@ -155,6 +155,16 @@ void start_kernel(void) > run_idle_thread(); > } > > +void pre_suspend(void) > +{ > + > +} > + > +void post_suspend(int canceled) > +{ > + > +} > + > void stop_kernel(void) > { > /* TODO: fs import */ > -- > 2.3.2 (Apple Git-55) > > > _______________________________________________ > Minios-devel mailing list > Minios-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/mailman/listinfo/minios-devel -- Samuel <g> r: et la marmotte, elle écrit un papier IPDPS _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |