linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH resend 0/3] SH: compile fixup patches
@ 2020-01-20  1:21 Kuninori Morimoto
  2020-01-20  1:22 ` [PATCH resend 1/3] sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx Kuninori Morimoto
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2020-01-20  1:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux-SH, Linux-Renesas, Yoshinori Sato, Rich Felker


Hi Andrew
Cc: Yoshinori, Rich

I'm posting these patches to SH ML from few month ago,
but SH maintainer is not working in these days...

Is it possible to consider about these ?
SH compile will be fail without these patchese.

I have +1 patch, but will has conflict to Geert's this patch,
thus, I'm skipping it now.

iomap: Constify ioreadX() iomem argument (as in generic implementation)
https://lore.kernel.org/lkml/20200108200528.4614-2-krzk@kernel.org/


Kuninori Morimoto (3):
  sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx
  sh: Convert iounmap() macros to inline functions
  sh: Convert ins[bwl]/outs[bwl] macros to inline functions

 arch/sh/include/asm/io.h          |  2 +-
 arch/sh/include/asm/io_noioport.h | 34 ++++++++++++++++++++++++++++------
 arch/sh/kernel/sh_ksyms_32.c      | 17 +++++++++++++++++
 3 files changed, 46 insertions(+), 7 deletions(-)

-- 
2.7.4


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

* [PATCH resend 1/3] sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx
  2020-01-20  1:21 [PATCH resend 0/3] SH: compile fixup patches Kuninori Morimoto
@ 2020-01-20  1:22 ` Kuninori Morimoto
  2020-01-20  1:22 ` [PATCH resend 2/3] sh: Convert iounmap() macros to inline functions Kuninori Morimoto
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2020-01-20  1:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux-SH, Linux-Renesas, Yoshinori Sato, Rich Felker

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

__ashiftrt_r4_xx might be used from kernel module.
We need DECLARE_EXPORT() for them, otherwise we will get compile error.
This patch adds missing DECLARE_EXPORT()

ERROR: "__ashiftrt_r4_25" [drivers/iio/pressure/bmp280.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/iio/dac/ad5764.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/iio/accel/mma7660.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/iio/accel/dmard06.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/iio/accel/bma220_spi.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/crypto/hisilicon/sec/hisi_sec.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/rtc/rtc-x1205.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/rtc/rtc-pcf85063.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/rtc/rtc-pcf2123.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/input/tablet/gtco.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/input/mouse/psmouse.ko] undefined!
ERROR: "__ashiftrt_r4_28" [drivers/input/mouse/psmouse.ko] undefined!
ERROR: "__ashiftrt_r4_28" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined!
ERROR: "__ashiftrt_r4_28" [fs/udf/udf.ko] undefined!

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/sh/kernel/sh_ksyms_32.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c
index 2827744..5858936 100644
--- a/arch/sh/kernel/sh_ksyms_32.c
+++ b/arch/sh/kernel/sh_ksyms_32.c
@@ -38,6 +38,13 @@ DECLARE_EXPORT(__ashlsi3);
 DECLARE_EXPORT(__lshrsi3_r0);
 DECLARE_EXPORT(__ashrsi3_r0);
 DECLARE_EXPORT(__ashlsi3_r0);
+
+DECLARE_EXPORT(__ashiftrt_r4_0);
+DECLARE_EXPORT(__ashiftrt_r4_1);
+DECLARE_EXPORT(__ashiftrt_r4_2);
+DECLARE_EXPORT(__ashiftrt_r4_3);
+DECLARE_EXPORT(__ashiftrt_r4_4);
+DECLARE_EXPORT(__ashiftrt_r4_5);
 DECLARE_EXPORT(__ashiftrt_r4_6);
 DECLARE_EXPORT(__ashiftrt_r4_7);
 DECLARE_EXPORT(__ashiftrt_r4_8);
@@ -48,13 +55,23 @@ DECLARE_EXPORT(__ashiftrt_r4_12);
 DECLARE_EXPORT(__ashiftrt_r4_13);
 DECLARE_EXPORT(__ashiftrt_r4_14);
 DECLARE_EXPORT(__ashiftrt_r4_15);
+DECLARE_EXPORT(__ashiftrt_r4_16);
+DECLARE_EXPORT(__ashiftrt_r4_17);
+DECLARE_EXPORT(__ashiftrt_r4_18);
+DECLARE_EXPORT(__ashiftrt_r4_19);
 DECLARE_EXPORT(__ashiftrt_r4_20);
 DECLARE_EXPORT(__ashiftrt_r4_21);
 DECLARE_EXPORT(__ashiftrt_r4_22);
 DECLARE_EXPORT(__ashiftrt_r4_23);
 DECLARE_EXPORT(__ashiftrt_r4_24);
+DECLARE_EXPORT(__ashiftrt_r4_25);
+DECLARE_EXPORT(__ashiftrt_r4_26);
 DECLARE_EXPORT(__ashiftrt_r4_27);
+DECLARE_EXPORT(__ashiftrt_r4_28);
+DECLARE_EXPORT(__ashiftrt_r4_29);
 DECLARE_EXPORT(__ashiftrt_r4_30);
+DECLARE_EXPORT(__ashiftrt_r4_31);
+DECLARE_EXPORT(__ashiftrt_r4_32);
 DECLARE_EXPORT(__movstr);
 DECLARE_EXPORT(__movstrSI8);
 DECLARE_EXPORT(__movstrSI12);
-- 
2.7.4


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

* [PATCH resend 2/3] sh: Convert iounmap() macros to inline functions
  2020-01-20  1:21 [PATCH resend 0/3] SH: compile fixup patches Kuninori Morimoto
  2020-01-20  1:22 ` [PATCH resend 1/3] sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx Kuninori Morimoto
@ 2020-01-20  1:22 ` Kuninori Morimoto
  2020-01-20  8:28   ` Sergei Shtylyov
  2020-01-20  1:22 ` [PATCH resend 3/3] sh: Convert ins[bwl]/outs[bwl] " Kuninori Morimoto
  2020-01-22  1:51 ` [PATCH resend 0/3] SH: compile fixup patches Rob Landley
  3 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2020-01-20  1:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux-SH, Linux-Renesas, Yoshinori Sato, Rich Felker


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Macro iounmap() do nothing, but that results in
unused variable warnings all over the place.
This patch convert it to inline to avoid warning

We will get this warning without this patch

	${LINUX}/drivers/thermal/broadcom/ns-thermal.c:78:21: \
	  warning: unused variable 'ns_thermal' [-Wunused-variable]
	struct ns_thermal *ns_thermal = platform_get_drvdata(pdev);
	^~~~~~~~~~

Fixes: 98c90e5ea34e9 ("sh: remove __iounmap")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/sh/include/asm/io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 1495489..351a0a9 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -328,7 +328,7 @@ __ioremap_mode(phys_addr_t offset, unsigned long size, pgprot_t prot)
 #else
 #define __ioremap(offset, size, prot)		((void __iomem *)(offset))
 #define __ioremap_mode(offset, size, prot)	((void __iomem *)(offset))
-#define iounmap(addr)				do { } while (0)
+static inline void iounmap(void __iomem *addr) {}
 #endif /* CONFIG_MMU */
 
 static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
-- 
2.7.4


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

* [PATCH resend 3/3] sh: Convert ins[bwl]/outs[bwl] macros to inline functions
  2020-01-20  1:21 [PATCH resend 0/3] SH: compile fixup patches Kuninori Morimoto
  2020-01-20  1:22 ` [PATCH resend 1/3] sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx Kuninori Morimoto
  2020-01-20  1:22 ` [PATCH resend 2/3] sh: Convert iounmap() macros to inline functions Kuninori Morimoto
@ 2020-01-20  1:22 ` Kuninori Morimoto
  2020-01-22  1:51 ` [PATCH resend 0/3] SH: compile fixup patches Rob Landley
  3 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2020-01-20  1:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux-SH, Linux-Renesas, Yoshinori Sato, Rich Felker

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Macro ins[bwl]/outs[bwl] are just calling BUG(), but that results in
unused variable warnings all over the place.
This patch convert macro to inline to avoid warning

We will get this kind of warning without this patch

	${LINUX}/drivers/iio/adc/ad7606_par.c:21:23: \
	  warning: unused variable 'st' [-Wunused-variable]
	struct ad7606_state *st = iio_priv(indio_dev);
	^~

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/sh/include/asm/io_noioport.h | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/arch/sh/include/asm/io_noioport.h b/arch/sh/include/asm/io_noioport.h
index 90d6109..f7938fe 100644
--- a/arch/sh/include/asm/io_noioport.h
+++ b/arch/sh/include/asm/io_noioport.h
@@ -53,12 +53,34 @@ static inline void ioport_unmap(void __iomem *addr)
 #define outw_p(x, addr)	outw((x), (addr))
 #define outl_p(x, addr)	outl((x), (addr))
 
-#define insb(a, b, c)	BUG()
-#define insw(a, b, c)	BUG()
-#define insl(a, b, c)	BUG()
+static inline void insb(unsigned long port, void *dst, unsigned long count)
+{
+	BUG();
+}
+
+static inline void insw(unsigned long port, void *dst, unsigned long count)
+{
+	BUG();
+}
+
+static inline void insl(unsigned long port, void *dst, unsigned long count)
+{
+	BUG();
+}
 
-#define outsb(a, b, c)	BUG()
-#define outsw(a, b, c)	BUG()
-#define outsl(a, b, c)	BUG()
+static inline void outsb(unsigned long port, const void *src, unsigned long count)
+{
+	BUG();
+}
+
+static inline void outsw(unsigned long port, const void *src, unsigned long count)
+{
+	BUG();
+}
+
+static inline void outsl(unsigned long port, const void *src, unsigned long count)
+{
+	BUG();
+}
 
 #endif /* __ASM_SH_IO_NOIOPORT_H */
-- 
2.7.4


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

* Re: [PATCH resend 2/3] sh: Convert iounmap() macros to inline functions
  2020-01-20  1:22 ` [PATCH resend 2/3] sh: Convert iounmap() macros to inline functions Kuninori Morimoto
@ 2020-01-20  8:28   ` Sergei Shtylyov
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2020-01-20  8:28 UTC (permalink / raw)
  To: Kuninori Morimoto, Andrew Morton
  Cc: Linux-SH, Linux-Renesas, Yoshinori Sato, Rich Felker

Hello!

On 20.01.2020 4:22, Kuninori Morimoto wrote:

    Why plurals in the subject if you only convert 1 function?

> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Macro iounmap() do nothing, but that results in
> unused variable warnings all over the place.
> This patch convert it to inline to avoid warning
> 
> We will get this warning without this patch
> 
> 	${LINUX}/drivers/thermal/broadcom/ns-thermal.c:78:21: \
> 	  warning: unused variable 'ns_thermal' [-Wunused-variable]
> 	struct ns_thermal *ns_thermal = platform_get_drvdata(pdev);
> 	^~~~~~~~~~
> 
> Fixes: 98c90e5ea34e9 ("sh: remove __iounmap")
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>   arch/sh/include/asm/io.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
> index 1495489..351a0a9 100644
> --- a/arch/sh/include/asm/io.h
> +++ b/arch/sh/include/asm/io.h
> @@ -328,7 +328,7 @@ __ioremap_mode(phys_addr_t offset, unsigned long size, pgprot_t prot)
>   #else
>   #define __ioremap(offset, size, prot)		((void __iomem *)(offset))
>   #define __ioremap_mode(offset, size, prot)	((void __iomem *)(offset))
> -#define iounmap(addr)				do { } while (0)
> +static inline void iounmap(void __iomem *addr) {}
>   #endif /* CONFIG_MMU */
>   
>   static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)

MBR, Sergei


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

* Re: [PATCH resend 0/3] SH: compile fixup patches
  2020-01-20  1:21 [PATCH resend 0/3] SH: compile fixup patches Kuninori Morimoto
                   ` (2 preceding siblings ...)
  2020-01-20  1:22 ` [PATCH resend 3/3] sh: Convert ins[bwl]/outs[bwl] " Kuninori Morimoto
@ 2020-01-22  1:51 ` Rob Landley
  3 siblings, 0 replies; 6+ messages in thread
From: Rob Landley @ 2020-01-22  1:51 UTC (permalink / raw)
  To: Kuninori Morimoto, Andrew Morton
  Cc: Linux-SH, Linux-Renesas, Yoshinori Sato, Rich Felker

On 1/19/20 7:21 PM, Kuninori Morimoto wrote:
> 
> Hi Andrew
> Cc: Yoshinori, Rich
> 
> I'm posting these patches to SH ML from few month ago,
> but SH maintainer is not working in these days...

There are two, they're still working, I spoke to Rich yesterday.

It is entirely possible you've convinced them to spam-block _you_ for repeatedly
saying that...

Rob

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

end of thread, other threads:[~2020-01-22  1:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20  1:21 [PATCH resend 0/3] SH: compile fixup patches Kuninori Morimoto
2020-01-20  1:22 ` [PATCH resend 1/3] sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx Kuninori Morimoto
2020-01-20  1:22 ` [PATCH resend 2/3] sh: Convert iounmap() macros to inline functions Kuninori Morimoto
2020-01-20  8:28   ` Sergei Shtylyov
2020-01-20  1:22 ` [PATCH resend 3/3] sh: Convert ins[bwl]/outs[bwl] " Kuninori Morimoto
2020-01-22  1:51 ` [PATCH resend 0/3] SH: compile fixup patches Rob Landley

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