linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xen drivers fail to link on ARM with v3.12-9888-gf63c482
@ 2013-11-16 14:56 Josh Boyer
  2013-11-16 16:36 ` Josh Boyer
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2013-11-16 14:56 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Russell King, xen-devel, linux-arm-kernel,
	Linux-Kernel@Vger. Kernel. Org

Hi All,

The xen-gntalloc, xen-netfront, xen-blkfront, and xen-netback drivers
fail to link on ARM today 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!

This is with Linus' tree as of this morning.

I'm guessing this is because the mfn_to_pfn and pfn_to_mfn functions
are inlined and reference phys_to_mach directly, and that isn't
exported to modules.  Thoughts?

josh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xen drivers fail to link on ARM with v3.12-9888-gf63c482
  2013-11-16 14:56 xen drivers fail to link on ARM with v3.12-9888-gf63c482 Josh Boyer
@ 2013-11-16 16:36 ` Josh Boyer
  2013-11-17 16:18   ` Stefano Stabellini
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2013-11-16 16:36 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Russell King, xen-devel, linux-arm-kernel,
	Linux-Kernel@Vger. Kernel. Org

On Sat, Nov 16, 2013 at 9:56 AM, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> Hi All,
>
> The xen-gntalloc, xen-netfront, xen-blkfront, and xen-netback drivers
> fail to link on ARM today 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!
>
> This is with Linus' tree as of this morning.
>
> I'm guessing this is because the mfn_to_pfn and pfn_to_mfn functions
> are inlined and reference phys_to_mach directly, and that isn't
> exported to modules.  Thoughts?

The patch below seems to fix this, but I'm not sure it's the desired
approach.  I added the export for mach_to_phys just in case.

josh

diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
index 23732cd..7772fa8 100644
--- a/arch/arm/xen/p2m.c
+++ b/arch/arm/xen/p2m.c
@@ -27,7 +27,9 @@ 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;
+EXPORT_SYMBOL_GPL(mach_to_phys);

 static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new)
 {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: xen drivers fail to link on ARM with v3.12-9888-gf63c482
  2013-11-16 16:36 ` Josh Boyer
@ 2013-11-17 16:18   ` Stefano Stabellini
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2013-11-17 16:18 UTC (permalink / raw)
  To: Josh Boyer
  Cc: Stefano Stabellini, Russell King, xen-devel, linux-arm-kernel,
	Linux-Kernel@Vger. Kernel. Org

On Sat, 16 Nov 2013, Josh Boyer wrote:
> On Sat, Nov 16, 2013 at 9:56 AM, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> > Hi All,
> >
> > The xen-gntalloc, xen-netfront, xen-blkfront, and xen-netback drivers
> > fail to link on ARM today 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!
> >
> > This is with Linus' tree as of this morning.
> >
> > I'm guessing this is because the mfn_to_pfn and pfn_to_mfn functions
> > are inlined and reference phys_to_mach directly, and that isn't
> > exported to modules.  Thoughts?
> 
> The patch below seems to fix this, but I'm not sure it's the desired
> approach.  I added the export for mach_to_phys just in case.
> 

Thank you for letting me know of the problem and thank you for the
patch!


> diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
> index 23732cd..7772fa8 100644
> --- a/arch/arm/xen/p2m.c
> +++ b/arch/arm/xen/p2m.c
> @@ -27,7 +27,9 @@ 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;
> +EXPORT_SYMBOL_GPL(mach_to_phys);
> 

The approach is OK but mach_to_phys should not be exported.
Can you please resent the patch only exporting phys_to_mach and with
your signed-off-by line so that I can send it to Linus as soon as
possible?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-17 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-16 14:56 xen drivers fail to link on ARM with v3.12-9888-gf63c482 Josh Boyer
2013-11-16 16:36 ` Josh Boyer
2013-11-17 16:18   ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).