Skip to contentSkip to conversation

mips: ralink: mt7621: add missing __iomem

PATCH Applied Rosen Penev 3 participants 3 messages May 8 – May 26

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: ralink: mt7621: add missing __iomem

raw_readl and writel calls expect pointers annotated with __iomem.

Fixes cc19db8b312a ("MIPS: ralink: mt7621: do memory detection on KSEG1")
---
 arch/mips/ralink/mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/ralink/mt7621.c +1 -1
index a4bdda8541c0..ae7b8cfedd5f 100644
@@ -63,7 +63,7 @@ phys_addr_t mips_cpc_default_phys_base(void)
 
 static bool __init mt7621_addr_wraparound_test(phys_addr_t size)
 {
-	void *dm = (void *)KSEG1ADDR(&detect_magic);
+	void __iomem *dm = (void __iomem *)KSEG1ADDR(&detect_magic);
 
 	if (CPHYSADDR(dm + size) >= MT7621_LOWMEM_MAX_SIZE)
 		return true;
Signature · 1 line
2.54.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Rosen Penev

raw_readl and writel calls expect pointers annotated with __iomem.

Fixes cc19db8b312a ("MIPS: ralink: mt7621: do memory detection on KSEG1")
---
 arch/mips/ralink/mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks,
Sergio Paracuellos

maintainer Applied
#2 lore raw
In reply to Rosen Penev
Quoted 25 lines · Rosen Penev

raw_readl and writel calls expect pointers annotated with __iomem.

Fixes cc19db8b312a ("MIPS: ralink: mt7621: do memory detection on KSEG1")
---
 arch/mips/ralink/mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/ralink/mt7621.c +1 -1
index a4bdda8541c0..ae7b8cfedd5f 100644
@@ -63,7 +63,7 @@ phys_addr_t mips_cpc_default_phys_base(void)
 
 static bool __init mt7621_addr_wraparound_test(phys_addr_t size)
 {
-	void *dm = (void *)KSEG1ADDR(&detect_magic);
+	void __iomem *dm = (void __iomem *)KSEG1ADDR(&detect_magic);
 
 	if (CPHYSADDR(dm + size) >= MT7621_LOWMEM_MAX_SIZE)
 		return true;
Signature · 1 line
2.54.0

applied to mips-next

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]