Skip to content

Commit

Permalink
arm/xen: Export phys_to_mach to fix Xen module link errors
Browse files Browse the repository at this point in the history
Various xen drivers fail to link when built as modules with the following
error:

ERROR: "phys_to_mach" [drivers/xen/xen-gntalloc.ko] undefined!
ERROR: "phys_to_mach" [drivers/net/xen-netfront.ko] undefined!
ERROR: "phys_to_mach" [drivers/net/xen-netback/xen-netback.ko] undefined!
ERROR: "phys_to_mach" [drivers/block/xen-blkfront.ko] undefined!

The mfn_to_pfn and pfn_to_mfn functions get inlined in these modules and
those functions require phys_to_mach.  Export the symbol to fix the link
errors.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
  • Loading branch information
Josh Boyer authored and Stefano Stabellini committed Nov 18, 2013
1 parent 71bfae9 commit c8999a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/xen/p2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct xen_p2m_entry {

rwlock_t p2m_lock;
struct rb_root phys_to_mach = RB_ROOT;
EXPORT_SYMBOL_GPL(phys_to_mach);
static struct rb_root mach_to_phys = RB_ROOT;

static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new)
Expand Down

0 comments on commit c8999a8

Please sign in to comment.