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

Re: [Xen-devel] [PATCH v6 08/15] x86/efi: create new early memory allocator



On Wed, Sep 21, 2016 at 03:42:09AM -0600, Jan Beulich wrote:
> >>> On 20.09.16 at 20:45, <daniel.kiper@xxxxxxxxxx> wrote:
> > On Tue, Sep 20, 2016 at 07:46:56AM -0600, Jan Beulich wrote:
> >> >>> On 20.09.16 at 12:52, <daniel.kiper@xxxxxxxxxx> wrote:

[...]

> >> > Do you suggest that I should move out of #ifndef CONFIG_ARM all ebmalloc 
> >> > stuff
> >> > except free_ebmalloc_unused_mem(). Even if it is not used on ARM right 
> >> > now?
> >>
> >> That's not the static function, is it? The function you name should
> >> actually be called on ARM too (as I did point out elsewhere already),
> >> just to not leave a trap open for someone to fall into when (s)he
> >> adds a first use of the allocator on ARM.
> >
> > Well, I think that sane person doing that would analyze how ebmalloc works
> > on x86 and then move (align to ARM needs if required) all its machinery
> > (including free_ebmalloc_unused_mem()) to run on ARM. At least I would do
> > that. This way he/she would avoid issues mentioned by you. However, if you
> > still prefer your way I can do that. Though I am not sure about the rest of
> > ebmalloc stuff. Should I move it out of #ifndef CONFIG_ARM? Looking at your
> > earlier replies I see that yes. Am I correct?
>
> Yes.

This does not work because if I build Xen for ARM then I got:
boot.c:589:21: error: 'ebmalloc' defined but not used [-Werror=unused-function]
 static void __init *ebmalloc(size_t size)

I think about following solutions:
  - leave all ebmalloc stuff in #ifndef CONFIG_ARM as it is right now,
  - if we wish to have ebmalloc stuff in common code but does not use
    it yet then we must add __used attribute to ebmalloc() or drop
    the static,
  - use ebmalloc on ARM and x86; the best option but I do not think
    that we should do this right now before freeze.

What is your choice? Or do you have better ideas?

Daniel

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

 


Rackspace

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