"arm_coreboot: Support DMA" breaks arm64

Message ID CAF7UmSw0GfWDiLEwf2f6JnWrJ-Qpx3Rp1OZJ-DNUJx1VrerX3w@mail.gmail.com
State New
Headers show

Commit Message

Leif Lindholm May 11, 2017, 3:13 p.m.
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:

 #endif
 #endif

Thoughts?

/
    Leif

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

Comments

Vladimir 'phcoder' Serbinenko May 11, 2017, 6:33 p.m. | #1
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

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

Patch hide | download patch | download mbox

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);