* [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h
@ 2023-07-04 19:01 Guenter Roeck
2023-07-04 19:30 ` Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Guenter Roeck @ 2023-07-04 19:01 UTC (permalink / raw)
To: Yoshinori Sato
Cc: Rich Felker, John Paul Adrian Glaubitz, linux-sh, linux-kernel,
Guenter Roeck, Arnd Bergmann
The unxlate_dev_mem_ptr() function has no prototype on the sh architecture,
which does not include asm-generic/io.h. This results in the following
build failure.
drivers/char/mem.c: In function 'read_mem':
drivers/char/mem.c:164:25: error: implicit declaration of function 'unxlate_dev_mem_ptr'
This compile error is now seen because commit 99b619b37ae1 ("mips: provide
unxlate_dev_mem_ptr() in asm/io.h") removed the weak function which was
previously in place to handle the problem.
Add a trivial macro to the sh header to provide the now missing dummy
function.
Fixes: 99b619b37ae1 ("mips: provide unxlate_dev_mem_ptr() in asm/io.h")
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
arch/sh/include/asm/io.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index fba90e670ed4..d8f3537ef57f 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -286,6 +286,7 @@ static inline void iounmap(volatile void __iomem *addr) { }
* access
*/
#define xlate_dev_mem_ptr(p) __va(p)
+#define unxlate_dev_mem_ptr(p, v) do { } while (0)
#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
int valid_phys_addr_range(phys_addr_t addr, size_t size);
--
2.39.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h
2023-07-04 19:01 [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h Guenter Roeck
@ 2023-07-04 19:30 ` Arnd Bergmann
2023-07-04 19:38 ` John Paul Adrian Glaubitz
2023-07-05 17:09 ` John Paul Adrian Glaubitz
2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2023-07-04 19:30 UTC (permalink / raw)
To: Guenter Roeck, Yoshinori Sato
Cc: Rich Felker, John Paul Adrian Glaubitz, linux-sh, linux-kernel
On Tue, Jul 4, 2023, at 21:01, Guenter Roeck wrote:
> The unxlate_dev_mem_ptr() function has no prototype on the sh architecture,
> which does not include asm-generic/io.h. This results in the following
> build failure.
>
> drivers/char/mem.c: In function 'read_mem':
> drivers/char/mem.c:164:25: error: implicit declaration of function
> 'unxlate_dev_mem_ptr'
>
> This compile error is now seen because commit 99b619b37ae1 ("mips: provide
> unxlate_dev_mem_ptr() in asm/io.h") removed the weak function which was
> previously in place to handle the problem.
>
> Add a trivial macro to the sh header to provide the now missing dummy
> function.
>
> Fixes: 99b619b37ae1 ("mips: provide unxlate_dev_mem_ptr() in asm/io.h")
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Ideally, we should use the asm-generic/io.h header here, but as a hotfix
this should do.
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h
2023-07-04 19:01 [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h Guenter Roeck
2023-07-04 19:30 ` Arnd Bergmann
@ 2023-07-04 19:38 ` John Paul Adrian Glaubitz
2023-07-05 17:09 ` John Paul Adrian Glaubitz
2 siblings, 0 replies; 4+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-04 19:38 UTC (permalink / raw)
To: Guenter Roeck, Yoshinori Sato
Cc: Rich Felker, linux-sh, linux-kernel, Arnd Bergmann
On Tue, 2023-07-04 at 12:01 -0700, Guenter Roeck wrote:
> The unxlate_dev_mem_ptr() function has no prototype on the sh architecture,
> which does not include asm-generic/io.h. This results in the following
> build failure.
>
> drivers/char/mem.c: In function 'read_mem':
> drivers/char/mem.c:164:25: error: implicit declaration of function 'unxlate_dev_mem_ptr'
>
> This compile error is now seen because commit 99b619b37ae1 ("mips: provide
> unxlate_dev_mem_ptr() in asm/io.h") removed the weak function which was
> previously in place to handle the problem.
>
> Add a trivial macro to the sh header to provide the now missing dummy
> function.
>
> Fixes: 99b619b37ae1 ("mips: provide unxlate_dev_mem_ptr() in asm/io.h")
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> arch/sh/include/asm/io.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
> index fba90e670ed4..d8f3537ef57f 100644
> --- a/arch/sh/include/asm/io.h
> +++ b/arch/sh/include/asm/io.h
> @@ -286,6 +286,7 @@ static inline void iounmap(volatile void __iomem *addr) { }
> * access
> */
> #define xlate_dev_mem_ptr(p) __va(p)
> +#define unxlate_dev_mem_ptr(p, v) do { } while (0)
>
> #define ARCH_HAS_VALID_PHYS_ADDR_RANGE
> int valid_phys_addr_range(phys_addr_t addr, size_t size);
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
I'm going to pick this up tomorrow before sending my PR to Linus.
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h
2023-07-04 19:01 [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h Guenter Roeck
2023-07-04 19:30 ` Arnd Bergmann
2023-07-04 19:38 ` John Paul Adrian Glaubitz
@ 2023-07-05 17:09 ` John Paul Adrian Glaubitz
2 siblings, 0 replies; 4+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-05 17:09 UTC (permalink / raw)
To: Guenter Roeck, Yoshinori Sato
Cc: Rich Felker, linux-sh, linux-kernel, Arnd Bergmann
On Tue, 2023-07-04 at 12:01 -0700, Guenter Roeck wrote:
> The unxlate_dev_mem_ptr() function has no prototype on the sh architecture,
> which does not include asm-generic/io.h. This results in the following
> build failure.
>
> drivers/char/mem.c: In function 'read_mem':
> drivers/char/mem.c:164:25: error: implicit declaration of function 'unxlate_dev_mem_ptr'
>
> This compile error is now seen because commit 99b619b37ae1 ("mips: provide
> unxlate_dev_mem_ptr() in asm/io.h") removed the weak function which was
> previously in place to handle the problem.
>
> Add a trivial macro to the sh header to provide the now missing dummy
> function.
>
> Fixes: 99b619b37ae1 ("mips: provide unxlate_dev_mem_ptr() in asm/io.h")
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> arch/sh/include/asm/io.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
> index fba90e670ed4..d8f3537ef57f 100644
> --- a/arch/sh/include/asm/io.h
> +++ b/arch/sh/include/asm/io.h
> @@ -286,6 +286,7 @@ static inline void iounmap(volatile void __iomem *addr) { }
> * access
> */
> #define xlate_dev_mem_ptr(p) __va(p)
> +#define unxlate_dev_mem_ptr(p, v) do { } while (0)
>
> #define ARCH_HAS_VALID_PHYS_ADDR_RANGE
> int valid_phys_addr_range(phys_addr_t addr, size_t size);
Applied to my for-next tree for 6.5. PR will be sent tomorrow.
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-05 17:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 19:01 [PATCH] sh: provide unxlate_dev_mem_ptr() in asm/io.h Guenter Roeck
2023-07-04 19:30 ` Arnd Bergmann
2023-07-04 19:38 ` John Paul Adrian Glaubitz
2023-07-05 17:09 ` John Paul Adrian Glaubitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®