Skip to contentSkip to conversation

arm64: mm: Correct fixmap pagetable types

PATCH New Steve Capper 2 participants 2 messages Oct 17, 2014 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: mm: Correct fixmap pagetable types

Compiling with STRICT_MM_TYPECHECKS gives the following arch/arm64/mm/ioremap.c: In function ?early_ioremap_init?:
arch/arm64/mm/ioremap.c:152:2: warning: passing argument 3 of ?pud_populate? from incompatible pointer type
pud_populate(&init_mm, pud, bm_pmd);

The data types for bm_pmd and bm_pud are incorrectly set to pte_t. This patch corrects these types.

---
 arch/arm64/mm/ioremap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/mm/ioremap.c +2 -2
index fa324bd..4a07630 100644
@@ -105,10 +105,10 @@ EXPORT_SYMBOL(ioremap_cache);
 
 static pte_t bm_pte[PTRS_PER_PTE] __page_aligned_bss;
 #if CONFIG_ARM64_PGTABLE_LEVELS > 2
-static pte_t bm_pmd[PTRS_PER_PMD] __page_aligned_bss;
+static pmd_t bm_pmd[PTRS_PER_PMD] __page_aligned_bss;
 #endif
 #if CONFIG_ARM64_PGTABLE_LEVELS > 3
-static pte_t bm_pud[PTRS_PER_PUD] __page_aligned_bss;
+static pud_t bm_pud[PTRS_PER_PUD] __page_aligned_bss;
 #endif
 
 static inline pud_t * __init early_ioremap_pud(unsigned long addr)
Signature · 1 line
1.9.3
maintainer
#1 lore raw

PATCH 1/1 arm64: mm: Correct fixmap pagetable types

Quoted 10 lines · Steve Capper

Compiling with STRICT_MM_TYPECHECKS gives the following arch/arm64/mm/ioremap.c: In function ?early_ioremap_init?:
arch/arm64/mm/ioremap.c:152:2: warning: passing argument 3 of ?pud_populate? from incompatible pointer type
pud_populate(&init_mm, pud, bm_pmd);

The data types for bm_pmd and bm_pud are incorrectly set to pte_t. This patch corrects these types.

Thanks. Applied.

Signature · 1 line
Catalin