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

Re: [Xen-devel] [GRUB2 PATCH v4 1/4] i386/relocator: Add grub_relocator64_efi relocator



On Tue, Mar 15, 2016 at 05:00:33PM +0100, Vladimir 'phcoder' Serbinenko wrote:
> Other than 2 typos (inline). Looks good. Let's give it a day if somebody
> wants to object, then I'll commit it
>
> >
> >         movq    %rax, %rsp
> >
> > +       /*
> > +        * Here is grub_relocator64_efi_start() entry point.
> > +        * Following code is shared between grub_relocator64_efi_start()
> > +        * and grub_relocator64_start().
> > +        *
> > +        * Think twice before changing anything below!!!
> > +        */
> >
> above?

Why? Everything outside of grub_relocator64_efi_start (above
grub_relocator64_efi_start) and grub_relocator64_efi_end (below
grub_relocator64_efi_end) is used by one function. So, we can
quite safely change anything there. However, everything between
grub_relocator64_efi_start (__below__ grub_relocator64_efi_start
label) and grub_relocator64_efi_end is owned by two functions. Hence,
every change should take into account that. Am I missing something?

> > +       /* Here grub_relocator64_efi_start() ends. Ufff... */
> > +VARIABLE(grub_relocator64_efi_end)
> > +
> >
> Probably without _start. Comment probably applies even more here than above.

Nope, grub_relocator64_efi_start is entry point, so, grub_relocator64_efi_end
label marks end of grub_relocator64_efi_start() func.

>  Are you ok with me moving ends to the same place when comitting?  This

If you wish. However, I think that grub_relocator64_efi_start() should
contain only code/data which is really used by it. Otherwise, it could
make some confusion. Why unused code/data is owned by 
grub_relocator64_efi_start()?
Is by design or by mistake?

> would make the code less error-prone.

I am not convinced that it will be less error-prone then. If we wish
that maybe we should not share code in that way... ;-)))

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.