Re: [PATCH 1/2] kexec: Default __NR_kexec_file_load is set to undefined

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

 



Hi Philipp,

On 02/27/23 at 04:19pm, Philipp Rudo wrote:
...... 
> > diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
> > index be6ccd5..ea77936 100644
> > --- a/kexec/kexec-syscall.h
> > +++ b/kexec/kexec-syscall.h
> > @@ -59,9 +59,7 @@
> >  #endif
> >  #endif /*ifndef __NR_kexec_load*/
> >  
> > -#ifdef __arm__
> >  #undef __NR_kexec_file_load
> > -#endif
> >  
> >  #ifndef __NR_kexec_file_load
> 
> I don't think this will work as intended. 
> 
> On the top of the file sys/syscall.h gets included. In there
> architectures that support kexec_file_load define __NR_kexec_file_load.
> This also means that if an architecture doesn't support kexec_file_load
> __NR_kexec_file_load shouldn't be defined in the first place. Thus I
> suggest that you find out why sys/syscall.h defines
> __NR_kexec_file_load for LoongArch even when the system call is not
> supported and fix it there.

Checking whether LoongArch has defined __NR_kexec_file_load sounds a
good suggestion. Wondering why we still need add __NR_kexec_file_load
definition in kexec-tools. E.g below s390 kexec_file support you added.
<sys/syscall.h> sometime won't be found or __NR_kexec_file_load could be
not defined yet?

commit d4a948c268272cf37c71be820fb02bf40e56292b
Author: Philipp Rudo <prudo@xxxxxxxxxxxxx>
Date:   Wed May 16 14:27:18 2018 +0200

    kexec/s390: Add support for kexec_file_load


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[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