[PATCH 1/2] powerpc:mm: export symbol ioremap_coherent

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1517d

4 messages, 3 authors, 2022-06-15 · open the first message on its own page

[PATCH 1/2] powerpc:mm: export symbol ioremap_coherent

From: Wang Wenhu <hidden>
Date: 2022-06-09 10:30:34

The function ioremap_coherent may be called by modules such as
fsl_85xx_cache_sram. So export it for access in other modules.

Signed-off-by: Wang Wenhu <redacted>
---
 arch/powerpc/mm/ioremap.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c
index 4f12504fb405..08a00dacef0b 100644
--- a/arch/powerpc/mm/ioremap.c
+++ b/arch/powerpc/mm/ioremap.c
@@ -40,6 +40,7 @@ void __iomem *ioremap_coherent(phys_addr_t addr, unsigned long size)
 		return iowa_ioremap(addr, size, prot, caller);
 	return __ioremap_caller(addr, size, prot, caller);
 }
+EXPORT_SYMBOL(ioremap_coherent);
 
 void __iomem *ioremap_prot(phys_addr_t addr, unsigned long size, unsigned long flags)
 {
-- 
2.25.1

Re: [PATCH 1/2] powerpc:mm: export symbol ioremap_coherent

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2022-06-14 10:45:38

Wang Wenhu [off-list ref] writes:
The function ioremap_coherent may be called by modules such as
fsl_85xx_cache_sram. So export it for access in other modules.
ioremap_coherent() is powerpc specific, and only has one other caller,
I'd like to remove it.

Does ioremap_cache() work for you?

cheers
quoted hunk
diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c
index 4f12504fb405..08a00dacef0b 100644
--- a/arch/powerpc/mm/ioremap.c
+++ b/arch/powerpc/mm/ioremap.c
@@ -40,6 +40,7 @@ void __iomem *ioremap_coherent(phys_addr_t addr, unsigned long size)
 		return iowa_ioremap(addr, size, prot, caller);
 	return __ioremap_caller(addr, size, prot, caller);
 }
+EXPORT_SYMBOL(ioremap_coherent);
 
 void __iomem *ioremap_prot(phys_addr_t addr, unsigned long size, unsigned long flags)
 {
-- 
2.25.1

Re: [PATCH 1/2] powerpc:mm: export symbol ioremap_coherent

From: Christoph Hellwig <hch@infradead.org>
Date: 2022-06-14 14:49:43

On Tue, Jun 14, 2022 at 08:45:25PM +1000, Michael Ellerman wrote:
Wang Wenhu [off-list ref] writes:
quoted
The function ioremap_coherent may be called by modules such as
fsl_85xx_cache_sram. So export it for access in other modules.
ioremap_coherent() is powerpc specific, and only has one other caller,
I'd like to remove it.

Does ioremap_cache() work for you?
Chances are that both are the wrong thing and this really wants
memremap, as SRAM tends to have memory and not MMIO semantics.

回复: [PATCH 1/2] powerpc:mm: export symbol ioremap_coherent

From: Wenhu Wang <hidden>
Date: 2022-06-15 04:37:50

发件人: Michael Ellerman [off-list ref]
发送时间: 2022年6月14日 18:45
收件人: Wang Wenhu [off-list ref]; gregkh@linuxfoundation.org [off-list ref]; christophe.leroy@csgroup.eu [off-list ref]
抄送: linuxppc-dev@lists.ozlabs.org [off-list ref]; linux-kernel@vger.kernel.org [off-list ref]; Wang Wenhu [off-list ref]
主题: Re: [PATCH 1/2] powerpc:mm: export symbol ioremap_coherent 

Wang Wenhu [off-list ref] writes:
quoted
The function ioremap_coherent may be called by modules such as
fsl_85xx_cache_sram. So export it for access in other modules.
ioremap_coherent() is powerpc specific, and only has one other caller,
I'd like to remove it.

Does ioremap_cache() work for you?
Yes, it works. I will update in v2 to use ioremap_cache.
I tested and compared the outcomes of ioremap_cache and ioremap_coherent,
and found they ended same values.

Thanks,
Wenhu
quoted
diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c
index 4f12504fb405..08a00dacef0b 100644
--- a/arch/powerpc/mm/ioremap.c
+++ b/arch/powerpc/mm/ioremap.c
@@ -40,6 +40,7 @@ void __iomem *ioremap_coherent(phys_addr_t addr, unsigned long size)
               return iowa_ioremap(addr, size, prot, caller);
       return __ioremap_caller(addr, size, prot, caller);
 }
+EXPORT_SYMBOL(ioremap_coherent);
 
 void __iomem *ioremap_prot(phys_addr_t addr, unsigned long size, unsigned long flags)
 {
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help