* [PATCH] arm64: fix pmem interface definition
@ 2017-08-10 14:52 Arnd Bergmann
2017-08-10 16:33 ` Robin Murphy
2017-08-10 17:14 ` Catalin Marinas
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-08-10 14:52 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon
Cc: Arnd Bergmann, Robin Murphy, linux-arm-kernel, linux-kernel
Defining the two functions as 'static inline' and exporting them
leads to the interesting case where we can use the interface
from loadable modules, but not from built-in drivers, as shown
in this link failure:
vers/nvdimm/claim.o: In function `nsio_rw_bytes':
claim.c:(.text+0x1b8): undefined reference to `arch_invalidate_pmem'
drivers/nvdimm/pmem.o: In function `pmem_dax_flush':
pmem.c:(.text+0x11c): undefined reference to `arch_wb_cache_pmem'
drivers/nvdimm/pmem.o: In function `pmem_make_request':
pmem.c:(.text+0x5a4): undefined reference to `arch_invalidate_pmem'
pmem.c:(.text+0x650): undefined reference to `arch_invalidate_pmem'
pmem.c:(.text+0x6d4): undefined reference to `arch_invalidate_pmem'
This removes the bogus 'static inline'.
Fixes: d50e071fdaa3 ("arm64: Implement pmem API support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm64/mm/flush.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
index 280f90ff33a2..e36ed5087b5c 100644
--- a/arch/arm64/mm/flush.c
+++ b/arch/arm64/mm/flush.c
@@ -85,7 +85,7 @@ EXPORT_SYMBOL(flush_dcache_page);
EXPORT_SYMBOL(flush_icache_range);
#ifdef CONFIG_ARCH_HAS_PMEM_API
-static inline void arch_wb_cache_pmem(void *addr, size_t size)
+void arch_wb_cache_pmem(void *addr, size_t size)
{
/* Ensure order against any prior non-cacheable writes */
dmb(osh);
@@ -93,7 +93,7 @@ static inline void arch_wb_cache_pmem(void *addr, size_t size)
}
EXPORT_SYMBOL_GPL(arch_wb_cache_pmem);
-static inline void arch_invalidate_pmem(void *addr, size_t size)
+void arch_invalidate_pmem(void *addr, size_t size)
{
__inval_dcache_area(addr, size);
}
--
2.9.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arm64: fix pmem interface definition
2017-08-10 14:52 [PATCH] arm64: fix pmem interface definition Arnd Bergmann
@ 2017-08-10 16:33 ` Robin Murphy
2017-08-10 17:14 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2017-08-10 16:33 UTC (permalink / raw)
To: Arnd Bergmann, Catalin Marinas, Will Deacon
Cc: linux-arm-kernel, linux-kernel
On 10/08/17 15:52, Arnd Bergmann wrote:
> Defining the two functions as 'static inline' and exporting them
> leads to the interesting case where we can use the interface
> from loadable modules, but not from built-in drivers, as shown
> in this link failure:
>
> vers/nvdimm/claim.o: In function `nsio_rw_bytes':
> claim.c:(.text+0x1b8): undefined reference to `arch_invalidate_pmem'
> drivers/nvdimm/pmem.o: In function `pmem_dax_flush':
> pmem.c:(.text+0x11c): undefined reference to `arch_wb_cache_pmem'
> drivers/nvdimm/pmem.o: In function `pmem_make_request':
> pmem.c:(.text+0x5a4): undefined reference to `arch_invalidate_pmem'
> pmem.c:(.text+0x650): undefined reference to `arch_invalidate_pmem'
> pmem.c:(.text+0x6d4): undefined reference to `arch_invalidate_pmem'
>
> This removes the bogus 'static inline'.
Oops, yes, this was clearly a silly copy-paste error on my part.
Acked-by: Robin Murphy <robin.murphy@arm.com>
> Fixes: d50e071fdaa3 ("arm64: Implement pmem API support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm64/mm/flush.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
> index 280f90ff33a2..e36ed5087b5c 100644
> --- a/arch/arm64/mm/flush.c
> +++ b/arch/arm64/mm/flush.c
> @@ -85,7 +85,7 @@ EXPORT_SYMBOL(flush_dcache_page);
> EXPORT_SYMBOL(flush_icache_range);
>
> #ifdef CONFIG_ARCH_HAS_PMEM_API
> -static inline void arch_wb_cache_pmem(void *addr, size_t size)
> +void arch_wb_cache_pmem(void *addr, size_t size)
> {
> /* Ensure order against any prior non-cacheable writes */
> dmb(osh);
> @@ -93,7 +93,7 @@ static inline void arch_wb_cache_pmem(void *addr, size_t size)
> }
> EXPORT_SYMBOL_GPL(arch_wb_cache_pmem);
>
> -static inline void arch_invalidate_pmem(void *addr, size_t size)
> +void arch_invalidate_pmem(void *addr, size_t size)
> {
> __inval_dcache_area(addr, size);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arm64: fix pmem interface definition
2017-08-10 14:52 [PATCH] arm64: fix pmem interface definition Arnd Bergmann
2017-08-10 16:33 ` Robin Murphy
@ 2017-08-10 17:14 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2017-08-10 17:14 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Will Deacon, Robin Murphy, linux-arm-kernel, linux-kernel
On Thu, Aug 10, 2017 at 04:52:31PM +0200, Arnd Bergmann wrote:
> Defining the two functions as 'static inline' and exporting them
> leads to the interesting case where we can use the interface
> from loadable modules, but not from built-in drivers, as shown
> in this link failure:
>
> vers/nvdimm/claim.o: In function `nsio_rw_bytes':
> claim.c:(.text+0x1b8): undefined reference to `arch_invalidate_pmem'
> drivers/nvdimm/pmem.o: In function `pmem_dax_flush':
> pmem.c:(.text+0x11c): undefined reference to `arch_wb_cache_pmem'
> drivers/nvdimm/pmem.o: In function `pmem_make_request':
> pmem.c:(.text+0x5a4): undefined reference to `arch_invalidate_pmem'
> pmem.c:(.text+0x650): undefined reference to `arch_invalidate_pmem'
> pmem.c:(.text+0x6d4): undefined reference to `arch_invalidate_pmem'
>
> This removes the bogus 'static inline'.
>
> Fixes: d50e071fdaa3 ("arm64: Implement pmem API support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied. Thanks.
--
Catalin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-10 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 14:52 [PATCH] arm64: fix pmem interface definition Arnd Bergmann
2017-08-10 16:33 ` Robin Murphy
2017-08-10 17:14 ` Catalin Marinas
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®