All of lore.kernel.org
 help / color / mirror / Atom feed
* "arm_coreboot: Support DMA" breaks arm64
@ 2017-05-11 15:13 Leif Lindholm
  2017-05-11 18:33 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 6+ messages in thread
From: Leif Lindholm @ 2017-05-11 15:13 UTC (permalink / raw)
  To: The development of GNU GRUB

Commit 265292f ("arm_coreboot: Support DMA") breaks arm64 grub-mkimage with:
/work/local/bin/grub-mkimage: error: undefined symbol grub_arch_sync_dma_caches.

This appears to be caused purely by the false symbol dependency
created by the non-x86 version being an EXPORT_FUNC, in order to be
usable by modules.

A not very pretty but functional workaround is:

diff --git a/include/grub/cache.h b/include/grub/cache.h
index 1c98ce2..cc4c833 100644
--- a/include/grub/cache.h
+++ b/include/grub/cache.h
@@ -40,7 +40,7 @@ grub_arch_sync_dma_caches (volatile void *address
__attribute__ ((unused)),
                           grub_size_t len __attribute__ ((unused)))
 {
 }
-#else
+#elif !defined (__aarch64__)
 void EXPORT_FUNC(grub_arch_sync_dma_caches) (volatile void *address,
grub_size_t len);
 #endif
 #endif

Thoughts?

/
    Leif


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

* Re: "arm_coreboot: Support DMA" breaks arm64
  2017-05-11 15:13 "arm_coreboot: Support DMA" breaks arm64 Leif Lindholm
@ 2017-05-11 18:33 ` Vladimir 'phcoder' Serbinenko
  2017-05-24 11:35   ` Leif Lindholm
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-11 18:33 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]

On Thu, May 11, 2017, 17:35 Leif Lindholm <leif.lindholm@linaro.org> wrote:

> Commit 265292f ("arm_coreboot: Support DMA") breaks arm64 grub-mkimage
> with:
> /work/local/bin/grub-mkimage: error: undefined symbol
> grub_arch_sync_dma_caches.
>
> This appears to be caused purely by the false symbol dependency
> created by the non-x86 version being an EXPORT_FUNC, in order to be
> usable by modules.
>
> A not very pretty but functional workaround is:
>
> diff --git a/include/grub/cache.h b/include/grub/cache.h
> index 1c98ce2..cc4c833 100644
> --- a/include/grub/cache.h
> +++ b/include/grub/cache.h
> @@ -40,7 +40,7 @@ grub_arch_sync_dma_caches (volatile void *address
> __attribute__ ((unused)),
>                            grub_size_t len __attribute__ ((unused)))
>  {
>  }
> -#else
> +#elif !defined (__aarch64__)
>  void EXPORT_FUNC(grub_arch_sync_dma_caches) (volatile void *address,
> grub_size_t len);
>  #endif
>  #endif
>
> Thoughts?
>
I don't think that functions in cache.h are used outside of kernel on arm64
currently. We can just remove cache.h from the list of exported headers

>
> /
>     Leif
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 1946 bytes --]

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

* Re: "arm_coreboot: Support DMA" breaks arm64
  2017-05-11 18:33 ` Vladimir 'phcoder' Serbinenko
@ 2017-05-24 11:35   ` Leif Lindholm
  2017-05-30 15:28     ` Leif Lindholm
  2017-05-30 16:06     ` Vladimir 'phcoder' Serbinenko
  0 siblings, 2 replies; 6+ messages in thread
From: Leif Lindholm @ 2017-05-24 11:35 UTC (permalink / raw)
  To: The development of GNU GRUB

Apologies for delay, got knocked out by a bad cold.

On Thu, May 11, 2017 at 06:33:34PM +0000, Vladimir 'phcoder' Serbinenko wrote:
> > Thoughts?
> >
> I don't think that functions in cache.h are used outside of kernel on arm64
> currently. We can just remove cache.h from the list of exported headers

That's true. So, would something like the below be acceptable?

/
    Leif

diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index 1045138..622f946 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -66,7 +66,9 @@ CLEANFILES += grub_script.yy.c grub_script.yy.h

 include $(srcdir)/Makefile.core.am

+if !COND_arm64
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
+endif
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h


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

* Re: "arm_coreboot: Support DMA" breaks arm64
  2017-05-24 11:35   ` Leif Lindholm
@ 2017-05-30 15:28     ` Leif Lindholm
  2017-05-30 16:06     ` Vladimir 'phcoder' Serbinenko
  1 sibling, 0 replies; 6+ messages in thread
From: Leif Lindholm @ 2017-05-30 15:28 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, May 24, 2017 at 12:35:51PM +0100, Leif Lindholm wrote:
> Apologies for delay, got knocked out by a bad cold.
> 
> On Thu, May 11, 2017 at 06:33:34PM +0000, Vladimir 'phcoder' Serbinenko wrote:
> > > Thoughts?
> > >
> > I don't think that functions in cache.h are used outside of kernel on arm64
> > currently. We can just remove cache.h from the list of exported headers
> 
> That's true. So, would something like the below be acceptable?

Or would a new AM_CONDITIONAL be preferable?
Once the 32/64-bit ARM UEFI linux loaders are unified, the same change
should probably be made for the 32-bit port, so there is a case for
doing it that way.
Maybe COND_efi? Although that could require a workaround for ia64.

/
    Leif

> diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
> index 1045138..622f946 100644
> --- a/grub-core/Makefile.am
> +++ b/grub-core/Makefile.am
> @@ -66,7 +66,9 @@ CLEANFILES += grub_script.yy.c grub_script.yy.h
> 
>  include $(srcdir)/Makefile.core.am
> 
> +if !COND_arm64
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
> +endif
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h


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

* Re: "arm_coreboot: Support DMA" breaks arm64
  2017-05-24 11:35   ` Leif Lindholm
  2017-05-30 15:28     ` Leif Lindholm
@ 2017-05-30 16:06     ` Vladimir 'phcoder' Serbinenko
  2017-06-05 10:15       ` Leif Lindholm
  1 sibling, 1 reply; 6+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-30 16:06 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

LGTM

On Wed, May 24, 2017, 13:36 Leif Lindholm <leif.lindholm@linaro.org> wrote:

> Apologies for delay, got knocked out by a bad cold.
>
> On Thu, May 11, 2017 at 06:33:34PM +0000, Vladimir 'phcoder' Serbinenko
> wrote:
> > > Thoughts?
> > >
> > I don't think that functions in cache.h are used outside of kernel on
> arm64
> > currently. We can just remove cache.h from the list of exported headers
>
> That's true. So, would something like the below be acceptable?
>
> /
>     Leif
>
> diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
> index 1045138..622f946 100644
> --- a/grub-core/Makefile.am
> +++ b/grub-core/Makefile.am
> @@ -66,7 +66,9 @@ CLEANFILES += grub_script.yy.c grub_script.yy.h
>
>  include $(srcdir)/Makefile.core.am
>
> +if !COND_arm64
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
> +endif
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
>  KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 1768 bytes --]

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

* Re: "arm_coreboot: Support DMA" breaks arm64
  2017-05-30 16:06     ` Vladimir 'phcoder' Serbinenko
@ 2017-06-05 10:15       ` Leif Lindholm
  0 siblings, 0 replies; 6+ messages in thread
From: Leif Lindholm @ 2017-06-05 10:15 UTC (permalink / raw)
  To: The development of GNU GRUB

On Tue, May 30, 2017 at 04:06:52PM +0000, Vladimir 'phcoder' Serbinenko wrote:
> LGTM

Thanks - so am I OK to push the following?:

From bb9aa73e172ee284d9b41a0a4657154c355d6f63 Mon Sep 17 00:00:00 2001
From: Leif Lindholm <leif.lindholm@linaro.org>
Date: Mon, 5 Jun 2017 10:47:35 +0100
Subject: [PATCH] arm64: don't export cache.h

arm64 does not implement grub_arch_sync_dma_caches(), which causes an
error when running grub-mkimage due to the missing exported symbol.
Make the exporting of cache.h conditional on !COND_arm64.
---
 grub-core/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index 1045138..622f946 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -66,7 +66,9 @@ CLEANFILES += grub_script.yy.c grub_script.yy.h
 
 include $(srcdir)/Makefile.core.am
 
+if !COND_arm64
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
+endif
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
-- 
2.1.4



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

end of thread, other threads:[~2017-06-05 10:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 15:13 "arm_coreboot: Support DMA" breaks arm64 Leif Lindholm
2017-05-11 18:33 ` Vladimir 'phcoder' Serbinenko
2017-05-24 11:35   ` Leif Lindholm
2017-05-30 15:28     ` Leif Lindholm
2017-05-30 16:06     ` Vladimir 'phcoder' Serbinenko
2017-06-05 10:15       ` Leif Lindholm

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.