sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc32: Fix version generation failed warnings
@ 2024-03-24  6:56 Sam Ravnborg
  2024-04-22 14:30 ` Andreas Larsson
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Ravnborg @ 2024-03-24  6:56 UTC (permalink / raw)
  To: Andreas Larsson, David S. Miller, sparclinux

An allmodconfig build of sparc32 resulted in several warnings:

WARNING: modpost: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned.
Is "empty_zero_page" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "__udelay" [vmlinux] version generation failed, symbol will not be versioned.
Is "__udelay" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "__ndelay" [vmlinux] version generation failed, symbol will not be versioned.
Is "__ndelay" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "__ashldi3" [vmlinux] version generation failed, symbol will not be versioned.
Is "__ashldi3" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "__ashrdi3" [vmlinux] version generation failed, symbol will not be versioned.
Is "__ashrdi3" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "__lshrdi3" [vmlinux] version generation failed, symbol will not be versioned.
Is "__lshrdi3" prototyped in <asm/asm-prototypes.h>?

And later a lot of warnings like this:
WARNING: modpost: "__udelay" [kernel/locking/locktorture.ko] has no CRC!
WARNING: modpost: "__udelay" [kernel/rcu/rcutorture.ko] has no CRC!
WARNING: modpost: "__udelay" [kernel/rcu/rcuscale.ko] has no CRC!
WARNING: modpost: "__udelay" [kernel/rcu/refscale.ko] has no CRC!
WARNING: modpost: "__ndelay" [kernel/rcu/refscale.ko] has no CRC!
WARNING: modpost: "__udelay" [kernel/time/test_udelay.ko] has no CRC!
WARNING: modpost: "__udelay" [kernel/scftorture.ko] has no CRC!
WARNING: modpost: "__ashrdi3" [fs/quota/quota_tree.ko] has no CRC!
WARNING: modpost: "__ashldi3" [fs/ext4/ext4.ko] has no CRC!

The fix was, as hinted, to add missing prototypes to asm-prototypes.h.

For the __*di3 functions add the prototypes direct to the
asm-prototypes.h file.
Some of the symbols were already declared, so pulled in the relevant
headers (delay.h, pgtable.h).
The include files was alphabetically sorted to make the list somehow
readable.

The .S files exporting the symbols do not include asm-prototypes.h,
so they need to be explicit rebuild to generate symbol versioning.
One or more of the generic headers pulled in by asm-prototypes.h
did not support being used from .S files, so adding asm-prototypes.h
as an include file was not an option.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: "David S. Miller" <davem@davemloft.net>
---

 arch/sparc/include/asm/asm-prototypes.h | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/include/asm/asm-prototypes.h b/arch/sparc/include/asm/asm-prototypes.h
index 4987c735ff56..08810808ca6d 100644
--- a/arch/sparc/include/asm/asm-prototypes.h
+++ b/arch/sparc/include/asm/asm-prototypes.h
@@ -3,15 +3,18 @@
  * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
  */
 
-#include <asm/xor.h>
-#include <asm/checksum.h>
-#include <asm/trap_block.h>
+#include <linux/atomic.h>
 #include <linux/uaccess.h>
+
 #include <asm/atomic.h>
-#include <asm/ftrace.h>
 #include <asm/cacheflush.h>
+#include <asm/checksum.h>
+#include <asm/delay.h>
+#include <asm/ftrace.h>
 #include <asm/oplib.h>
-#include <linux/atomic.h>
+#include <asm/pgtable.h>
+#include <asm/trap_block.h>
+#include <asm/xor.h>
 
 void *__memscan_zero(void *, size_t);
 void *__memscan_generic(void *, int, size_t);
@@ -23,3 +26,7 @@ void *memcpy(void *dest, const void *src, size_t n);
 void *memset(void *s, int c, size_t n);
 typedef int TItype __attribute__((mode(TI)));
 TItype __multi3(TItype a, TItype b);
+
+s64 __ashldi3(s64, int);
+s64 __lshrdi3(s64, int);
+s64 __ashrdi3(s64, int);
-- 
2.34.1


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

* Re: [PATCH] sparc32: Fix version generation failed warnings
  2024-03-24  6:56 [PATCH] sparc32: Fix version generation failed warnings Sam Ravnborg
@ 2024-04-22 14:30 ` Andreas Larsson
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Larsson @ 2024-04-22 14:30 UTC (permalink / raw)
  To: Sam Ravnborg, David S. Miller, sparclinux

On 2024-03-24 07:56, Sam Ravnborg wrote:
> An allmodconfig build of sparc32 resulted in several warnings:
> 
> WARNING: modpost: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned.
> Is "empty_zero_page" prototyped in <asm/asm-prototypes.h>?
> WARNING: modpost: EXPORT symbol "__udelay" [vmlinux] version generation failed, symbol will not be versioned.
> Is "__udelay" prototyped in <asm/asm-prototypes.h>?
> WARNING: modpost: EXPORT symbol "__ndelay" [vmlinux] version generation failed, symbol will not be versioned.
> Is "__ndelay" prototyped in <asm/asm-prototypes.h>?
> WARNING: modpost: EXPORT symbol "__ashldi3" [vmlinux] version generation failed, symbol will not be versioned.
> Is "__ashldi3" prototyped in <asm/asm-prototypes.h>?
> WARNING: modpost: EXPORT symbol "__ashrdi3" [vmlinux] version generation failed, symbol will not be versioned.
> Is "__ashrdi3" prototyped in <asm/asm-prototypes.h>?
> WARNING: modpost: EXPORT symbol "__lshrdi3" [vmlinux] version generation failed, symbol will not be versioned.
> Is "__lshrdi3" prototyped in <asm/asm-prototypes.h>?
> 
> And later a lot of warnings like this:
> WARNING: modpost: "__udelay" [kernel/locking/locktorture.ko] has no CRC!
> WARNING: modpost: "__udelay" [kernel/rcu/rcutorture.ko] has no CRC!
> WARNING: modpost: "__udelay" [kernel/rcu/rcuscale.ko] has no CRC!
> WARNING: modpost: "__udelay" [kernel/rcu/refscale.ko] has no CRC!
> WARNING: modpost: "__ndelay" [kernel/rcu/refscale.ko] has no CRC!
> WARNING: modpost: "__udelay" [kernel/time/test_udelay.ko] has no CRC!
> WARNING: modpost: "__udelay" [kernel/scftorture.ko] has no CRC!
> WARNING: modpost: "__ashrdi3" [fs/quota/quota_tree.ko] has no CRC!
> WARNING: modpost: "__ashldi3" [fs/ext4/ext4.ko] has no CRC!
> 
> The fix was, as hinted, to add missing prototypes to asm-prototypes.h.
> 
> For the __*di3 functions add the prototypes direct to the
> asm-prototypes.h file.
> Some of the symbols were already declared, so pulled in the relevant
> headers (delay.h, pgtable.h).
> The include files was alphabetically sorted to make the list somehow
> readable.
> 
> The .S files exporting the symbols do not include asm-prototypes.h,
> so they need to be explicit rebuild to generate symbol versioning.
> One or more of the generic headers pulled in by asm-prototypes.h
> did not support being used from .S files, so adding asm-prototypes.h
> as an include file was not an option.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Andreas Larsson <andreas@gaisler.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> ---
> 
>  arch/sparc/include/asm/asm-prototypes.h | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/sparc/include/asm/asm-prototypes.h b/arch/sparc/include/asm/asm-prototypes.h
> index 4987c735ff56..08810808ca6d 100644
> --- a/arch/sparc/include/asm/asm-prototypes.h
> +++ b/arch/sparc/include/asm/asm-prototypes.h
> @@ -3,15 +3,18 @@
>   * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
>   */
>  
> -#include <asm/xor.h>
> -#include <asm/checksum.h>
> -#include <asm/trap_block.h>
> +#include <linux/atomic.h>
>  #include <linux/uaccess.h>
> +
>  #include <asm/atomic.h>
> -#include <asm/ftrace.h>
>  #include <asm/cacheflush.h>
> +#include <asm/checksum.h>
> +#include <asm/delay.h>
> +#include <asm/ftrace.h>
>  #include <asm/oplib.h>
> -#include <linux/atomic.h>
> +#include <asm/pgtable.h>
> +#include <asm/trap_block.h>
> +#include <asm/xor.h>
>  
>  void *__memscan_zero(void *, size_t);
>  void *__memscan_generic(void *, int, size_t);
> @@ -23,3 +26,7 @@ void *memcpy(void *dest, const void *src, size_t n);
>  void *memset(void *s, int c, size_t n);
>  typedef int TItype __attribute__((mode(TI)));
>  TItype __multi3(TItype a, TItype b);
> +
> +s64 __ashldi3(s64, int);
> +s64 __lshrdi3(s64, int);
> +s64 __ashrdi3(s64, int);

Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>

Picking this up to my for-next.

Thanks,
Andreas

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

end of thread, other threads:[~2024-04-22 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-24  6:56 [PATCH] sparc32: Fix version generation failed warnings Sam Ravnborg
2024-04-22 14:30 ` Andreas Larsson

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