On Mon, Sep 12, 2022 at 11:22:53AM +0200, Wolfgang Denk wrote:
> Dear Ovidiu,
> 
> In message <[email protected]> you wrote:
> > The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanently
> > commented out, so there are no users for this macro:
> >   #if 1
> >     #define DECLARE_GLOBAL_DATA_PTR   register volatile gd_t *gd asm ("r2")
> >   #else
> >     #define XTRN_DECLARE_GLOBAL_DATA_PTR   extern
> >     #define DECLARE_GLOBAL_DATA_PTR     XTRN_DECLARE_GLOBAL_DATA_PTR \
> >                                         gd_t *gd
> >   #endif
> >
> > Remove all references.
> 
> Actually the commented out code contained some information, and I
> feel it would be a pity if that got lost:
> 
> > -#if 1
> >  #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r2")
> > -#else /* We could use plain global data, but the resulting code is bigger 
> > */
> > -#define XTRN_DECLARE_GLOBAL_DATA_PTR       extern
> > -#define DECLARE_GLOBAL_DATA_PTR     XTRN_DECLARE_GLOBAL_DATA_PTR \
> > -                               gd_t *gd
> > -#endif
> 
> Maybe we can keep the information that using global data for the GD
> pointer would be possible too (and simpler, as it does not require
> the reservation of a specific register for it), but that the
> implementation uses a register nevertheless because this results in
> smaller code?
> 
> Maybe add such a comment instead ?
> 

This is slightly mentioned in doc/develop/global_data.rst currently, but
a follow-up to expand on this would be good.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to