Skip to contentSkip to conversation

arm64: use is_vmalloc_addr

PATCH Superseded Miles Chen 2 participants 3 messages Feb 9, 2017 – Feb 13, 2017

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Miles Chen

author
#0 lore raw

PATCH v2 1/1 arm64: use is_vmalloc_addr

To is_vmalloc_addr() to check if an address is a vmalloc address instead of checking VMALLOC_START and VMALLOC_END manually.

---
 arch/arm64/mm/ioremap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/mm/ioremap.c +1 -1
index 01e88c8..c4c8cd4 100644
@@ -88,7 +88,7 @@ void __iounmap(volatile void __iomem *io_addr)
 	 * We could get an address outside vmalloc range in case
 	 * of ioremap_cache() reusing a RAM mapping.
 	 */
-	if (VMALLOC_START <= addr && addr < VMALLOC_END)
+	if (is_vmalloc_addr((void *)addr))
 		vunmap((void *)addr);
 }
 EXPORT_SYMBOL(__iounmap);
Signature · 1 line
1.9.1
#1 lore raw

Hi,

Am 09.02.2017 um 12:45 schrieb Miles Chen:

Quoted 1 line

To is_vmalloc_addr() to check if an address is a vmalloc address

"Use ..."?

Regards,
Andreas

Quoted 3 lines

instead of checking VMALLOC_START and VMALLOC_END manually.

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
author
#2 lore raw
Quoted 6 lines · Andreas F?rber

Hi,

Am 09.02.2017 um 12:45 schrieb Miles Chen:

Quoted 1 line

To is_vmalloc_addr() to check if an address is a vmalloc address

"Use ..."?

Yes, it should be "Use". I'll send another patch to fix this.

Quoted 8 lines

Regards,
Andreas

Quoted 3 lines

instead of checking VMALLOC_START and VMALLOC_END manually.