Re: [PATCH] sh: exports for delay.h

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel.cross-arch
Message-ID <09c316ecff688e499bebee26aeb7364f1714c675.camel@physik.fu-berlin.de>
Hi Al,

On Sun, 2024-12-22 at 22:22 +0000, Al Viro wrote:
> 	__delay() is either exported or exists as a static inline
> on all architectures - except sh.
> 
> 	Add the missing export of __delay(), move the exports of
> the rest of that bunch from sh_ksyms32.c to the place where all
> of them are defined (i.e. arch/sh/lib/delay.c).
> 
> Signed-off-by: Al Viro <[email protected]>
> ---
> diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c
> index 5858936cb431..0b9b28144efe 100644
> --- a/arch/sh/kernel/sh_ksyms_32.c
> +++ b/arch/sh/kernel/sh_ksyms_32.c
> @@ -2,7 +2,6 @@
>  #include <linux/module.h>
>  #include <linux/string.h>
>  #include <linux/uaccess.h>
> -#include <linux/delay.h>
>  #include <linux/mm.h>
>  #include <asm/checksum.h>
>  #include <asm/sections.h>
> @@ -12,9 +11,6 @@ EXPORT_SYMBOL(memcpy);
>  EXPORT_SYMBOL(memset);
>  EXPORT_SYMBOL(memmove);
>  EXPORT_SYMBOL(__copy_user);
> -EXPORT_SYMBOL(__udelay);
> -EXPORT_SYMBOL(__ndelay);
> -EXPORT_SYMBOL(__const_udelay);
>  EXPORT_SYMBOL(strlen);
>  EXPORT_SYMBOL(csum_partial);
>  EXPORT_SYMBOL(csum_partial_copy_generic);
> diff --git a/arch/sh/lib/delay.c b/arch/sh/lib/delay.c
> index dad8e6a54906..63cd32550b0c 100644
> --- a/arch/sh/lib/delay.c
> +++ b/arch/sh/lib/delay.c
> @@ -7,6 +7,7 @@
>  
>  #include <linux/sched.h>
>  #include <linux/delay.h>
> +#include <linux/export.h>
>  
>  void __delay(unsigned long loops)
>  {
> @@ -29,6 +30,7 @@ void __delay(unsigned long loops)
>  		: "0" (loops)
>  		: "t");
>  }
> +EXPORT_SYMBOL(__delay);
>  
>  inline void __const_udelay(unsigned long xloops)
>  {
> @@ -41,14 +43,16 @@ inline void __const_udelay(unsigned long xloops)
>  		: "macl", "mach");
>  	__delay(++xloops);
>  }
> +EXPORT_SYMBOL(__const_udelay);
>  
>  void __udelay(unsigned long usecs)
>  {
>  	__const_udelay(usecs * 0x000010c6);  /* 2**32 / 1000000 */
>  }
> +EXPORT_SYMBOL(__udelay);
>  
>  void __ndelay(unsigned long nsecs)
>  {
>  	__const_udelay(nsecs * 0x00000005);
>  }
> -
> +EXPORT_SYMBOL(__ndelay);

Thanks, this looks good and I'll pick it up for sh-linux 6.14, although
I'm probably going to make the subject a little more descriptive ;-).

Reviewed-by: John Paul Adrian Glaubitz <[email protected]>

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.