Re: [Xen-devel] [PATCH 1/2] Add a kexec_crash_loaded() function

2016-07-13 Thread Petr Tesarik
On Wed, 13 Jul 2016 05:52:33 -0700 Josh Triplett wrote: > On Wed, Jul 13, 2016 at 02:19:55PM +0200, Petr Tesarik wrote: > > --- a/kernel/kexec_core.c > > +++ b/kernel/kexec_core.c > > @@ -95,6 +95,12 @@ int kexec_should_crash(struct task_struct *p) > > return 0; > > } > > > > +int kexec_cr

Re: [Xen-devel] [PATCH 1/2] Add a kexec_crash_loaded() function

2016-07-13 Thread Josh Triplett
On Wed, Jul 13, 2016 at 02:19:55PM +0200, Petr Tesarik wrote: > --- a/kernel/kexec_core.c > +++ b/kernel/kexec_core.c > @@ -95,6 +95,12 @@ int kexec_should_crash(struct task_struct *p) > return 0; > } > > +int kexec_crash_loaded(void) > +{ > + return !!kexec_crash_image; > +} Nit: thi

[Xen-devel] [PATCH 1/2] Add a kexec_crash_loaded() function

2016-07-13 Thread Petr Tesarik
Provide a wrapper function to be used by kernel code to check whether a crash kernel is loaded. It returns the same value that can be seen in /sys/kernel/kexec_crash_loaded by userspace programs. I'm exporting the function, because it will be used by Xen, and it is possible to compile Xen modules