mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	Matthew Wilcox <willy@infradead.org>,
	Paul Durrant <paul.durrant@citrix.com>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen: avoid link error on ARM
Date: Tue, 5 Mar 2019 07:39:15 +0100	[thread overview]
Message-ID: <0eaa0d35-0be8-0053-1dcb-feb61d441bd2@suse.com> (raw)
In-Reply-To: <20190304204826.2414365-1-arnd@arndb.de>

On 04/03/2019 21:47, Arnd Bergmann wrote:
> Building the privcmd code as a loadable module on ARM, we get
> a link error due to the private cache management functions:
> 
> ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!
> 
> Move the code into a new file that is built along with privcmd.o
> but is always built-in, even when the latter is a loadable module.
> 
> xen_remap_vma_range() may not be the best name here, if someone
> comes up with a better one, let me know.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/xen/Makefile  |  3 +++
>  drivers/xen/mm.c      | 41 +++++++++++++++++++++++++++++++++++++++++
>  drivers/xen/privcmd.c | 30 +-----------------------------
>  include/xen/xen-ops.h |  3 +++
>  4 files changed, 48 insertions(+), 29 deletions(-)
>  create mode 100644 drivers/xen/mm.c
> 
> diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
> index ad3844d9f876..7124f9e749b4 100644
> --- a/drivers/xen/Makefile
> +++ b/drivers/xen/Makefile
> @@ -29,6 +29,9 @@ obj-$(CONFIG_SWIOTLB_XEN)		+= swiotlb-xen.o
>  obj-$(CONFIG_XEN_MCE_LOG)		+= mcelog.o
>  obj-$(CONFIG_XEN_PCIDEV_BACKEND)	+= xen-pciback/
>  obj-$(CONFIG_XEN_PRIVCMD)		+= xen-privcmd.o
> +ifdef CONFIG_XEN_PRIVCMD
> +obj-y					+= mm.o
> +endif

Can we avoid that ifdef in the Makefile?

I'd rather have an architecture independant builtin driver added which
is always included for CONFIG_XEN. This would allow to move redundant
stuff from arch/*/xen/ into it (e.g. xen_vcpu_id).

So: rename mm.c to xen-builtin.c, use:

obj-$(CONFIG_XEN) += xen-builtin.o


Juergen

  parent reply	other threads:[~2019-03-05  6:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 20:47 Arnd Bergmann
2019-03-04 21:19 ` Boris Ostrovsky
2019-03-04 21:23   ` Arnd Bergmann
2019-03-05  6:39 ` Juergen Gross [this message]
2019-03-05  8:34   ` Arnd Bergmann
2019-03-05  9:05     ` Juergen Gross
2019-03-05  9:19       ` Arnd Bergmann

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=0eaa0d35-0be8-0053-1dcb-feb61d441bd2@suse.com \
    --to=jgross@suse.com \
    --cc=arnd@arndb.de \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=paul.durrant@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®