All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Kiper <daniel.kiper@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Juergen Gross <JGross@suse.com>,
	sstabellini@kernel.org, andrew.cooper3@citrix.com,
	cardoe@cardoe.com, pgnet.dev@gmail.com, ning.sun@intel.com,
	david.vrabel@citrix.com, xen-devel@lists.xenproject.org,
	qiaowei.ren@intel.com, gang.wei@intel.com, fu.wei@linaro.org
Subject: Re: [PATCH v6 08/15] x86/efi: create new early memory allocator
Date: Thu, 22 Sep 2016 14:07:08 +0200	[thread overview]
Message-ID: <20160922120708.GR28753@olila.local.net-space.pl> (raw)
In-Reply-To: <57E3DBDA020000780011194A@prv-mh.provo.novell.com>

On Thu, Sep 22, 2016 at 05:25:46AM -0600, Jan Beulich wrote:
> >>> On 22.09.16 at 12:52, <daniel.kiper@oracle.com> wrote:
> > On Wed, Sep 21, 2016 at 03:42:09AM -0600, Jan Beulich wrote:
> >> >>> On 20.09.16 at 20:45, <daniel.kiper@oracle.com> wrote:
> >> > On Tue, Sep 20, 2016 at 07:46:56AM -0600, Jan Beulich wrote:
> >> >> >>> On 20.09.16 at 12:52, <daniel.kiper@oracle.com> 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)
>
> Quote from an earlier reply of mine:
>
>   Arguably the one static function may better be, as other
>   workarounds to avoid the "unused" compiler warning wouldn't
>   be any better.
>
> and then later
>
>   You misunderstood - I said that for this one (unused) static
>   function such an #ifdef is probably okay, as the presumably
>   smallest possible workaround.
>
> I really have no idea what else to say.

Sorry, however, sometimes it is very difficult to understand what are
you referring to. If you could be more specific then I will be happy.

Anyway, now it looks that you wish something like that:

#ifndef CONFIG_ARM
/* Whole x86 ebmalloc stuff. */
...
#else
void __init free_ebmalloc_unused_mem(void)
{
}
#endif

and then call free_ebmalloc_unused_mem() from e.g.
xen/arch/arm/setup.c:init_done(). Am I right?

Daniel

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

  reply	other threads:[~2016-09-22 12:07 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 20:18 [PATCH v6 00/15] x86: multiboot2 protocol support Daniel Kiper
2016-09-12 20:18 ` [PATCH v6 01/15] x86: properly calculate ELF end of image address Daniel Kiper
2016-09-16 20:43   ` Konrad Rzeszutek Wilk
2016-09-19 11:14     ` Jan Beulich
2016-09-19 13:56       ` Daniel Kiper
2016-09-19 14:52         ` Jan Beulich
2016-09-20 11:43           ` Daniel Kiper
2016-09-20 13:28             ` Jan Beulich
2016-09-20 18:00           ` Daniel Kiper
2016-09-21  9:37             ` Jan Beulich
2016-09-22 11:45               ` Daniel Kiper
2016-09-22 12:02                 ` Jan Beulich
2016-09-19 11:18     ` Daniel Kiper
2016-09-12 20:18 ` [PATCH v6 02/15] x86/boot/reloc: create generic alloc and copy functions Daniel Kiper
2016-09-19 11:23   ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 03/15] x86/boot/reloc: rename some variables and rearrange code a bit Daniel Kiper
2016-09-12 20:18 ` [PATCH v6 04/15] x86: add multiboot2 protocol support Daniel Kiper
2016-09-19 11:42   ` Jan Beulich
2016-09-21  8:56     ` Daniel Kiper
2016-09-21  9:41       ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 05/15] efi: create efi_enabled() Daniel Kiper
2016-09-19 11:58   ` Jan Beulich
2016-09-19 14:27     ` Daniel Kiper
2016-09-19 14:31       ` Wei Liu
2016-09-19 14:57       ` Jan Beulich
2016-09-19 15:38         ` Daniel Kiper
2016-09-19 16:00           ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 06/15] x86: allow EFI reboot method neither on EFI platforms Daniel Kiper
2016-09-19 12:01   ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 07/15] efi: build xen.gz with EFI code Daniel Kiper
2016-09-12 20:18 ` [PATCH v6 08/15] x86/efi: create new early memory allocator Daniel Kiper
2016-09-19 12:12   ` Jan Beulich
2016-09-19 15:04     ` Daniel Kiper
2016-09-19 15:17       ` Jan Beulich
2016-09-20  9:45         ` Daniel Kiper
2016-09-20  9:57           ` Jan Beulich
2016-09-20 10:52             ` Daniel Kiper
2016-09-20 13:46               ` Jan Beulich
2016-09-20 18:45                 ` Daniel Kiper
2016-09-21  9:42                   ` Jan Beulich
2016-09-22 10:52                     ` Daniel Kiper
2016-09-22 11:25                       ` Jan Beulich
2016-09-22 12:07                         ` Daniel Kiper [this message]
2016-09-22 13:12                           ` Jan Beulich
2016-09-22 17:07                           ` Julien Grall
2016-09-23 10:50                             ` Daniel Kiper
2016-09-23 11:07                               ` Julien Grall
2016-09-23 11:35                                 ` Daniel Kiper
2016-09-23 11:42                                   ` Julien Grall
2016-09-23 11:53                                     ` Daniel Kiper
2016-09-23 14:10                                   ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 09/15] x86: add multiboot2 protocol support for EFI platforms Daniel Kiper
2016-09-19 12:29   ` Jan Beulich
2016-09-19 15:18     ` Daniel Kiper
2016-09-19 15:28       ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 10/15] x86/boot: implement early command line parser in C Daniel Kiper
2016-09-19 12:47   ` Jan Beulich
2016-09-19 15:27     ` Daniel Kiper
2016-09-19 16:03       ` Jan Beulich
2016-09-20  9:49         ` Daniel Kiper
2016-09-20 10:05           ` Jan Beulich
2016-09-20 11:31             ` Daniel Kiper
2016-09-12 20:18 ` [PATCH v6 11/15] x86: change default load address from 1 MiB to 2 MiB Daniel Kiper
2016-09-19 12:54   ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 12/15] x86/setup: use XEN_IMG_OFFSET instead of Daniel Kiper
2016-09-19 13:00   ` Jan Beulich
2016-09-12 20:18 ` [PATCH v6 13/15] x86: make Xen early boot code relocatable Daniel Kiper
2016-09-12 20:18 ` [PATCH v6 14/15] x86/boot: rename sym_phys() to sym_offs() Daniel Kiper
2016-09-12 20:18 ` [PATCH v6 15/15] x86: add multiboot2 protocol support for relocatable images Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160922120708.GR28753@olila.local.net-space.pl \
    --to=daniel.kiper@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=JGross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=david.vrabel@citrix.com \
    --cc=fu.wei@linaro.org \
    --cc=gang.wei@intel.com \
    --cc=ning.sun@intel.com \
    --cc=pgnet.dev@gmail.com \
    --cc=qiaowei.ren@intel.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.