arm64/mm/dump: fix a compilation error
Subsystems (2)
PATCH 1/1 arm64/mm/dump: fix a compilation error
The linux-next commit "x86: mm: avoid allocating struct mm_struct on the stack" [1] introduced a compilation error with "arm64: mm: convert mm/dump.c to use walk_page_range()" [2]. Fixed it by using the new API.
arch/arm64/mm/dump.c:326:38: error: too few arguments to function call, expected 3, have 2
ptdump_walk_pgd(&st.ptdump, info->mm);
~~~~~~~~~~~~~~~ ^./include/linux/ptdump.h:20:1: note: 'ptdump_walk_pgd' declared here void ptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd);
^arch/arm64/mm/dump.c:364:38: error: too few arguments to function call, expected 3, have 2
ptdump_walk_pgd(&st.ptdump, &init_mm);
~~~~~~~~~~~~~~~ ^./include/linux/ptdump.h:20:1: note: 'ptdump_walk_pgd' declared here void ptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd);
^
2 errors generated.
[1] http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]
--- arch/arm64/mm/dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/mm/dump.c +2 -2
@@ -323,7 +323,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info) } }; -ptdump_walk_pgd (&st.ptdump, info->mm); +ptdump_walk_pgd (&st.ptdump, info->mm,NULL ); }static void ptdump_initialize (void )
@@ -361,7 +361,7 @@ void ptdump_check_wx(void) } }; -ptdump_walk_pgd (&st.ptdump, &init_mm); +ptdump_walk_pgd (&st.ptdump, &init_mm,NULL );if (st.wx_pages || st.uxn_pages) pr_warn("Checked W+X mappings: FAILED, %lu W+X pages found, %lu non-UXN pages found\n",
Signature · 1 line
2.21.0 (Apple Git-122.2)
Quoted 16 lines · Qian Cai
The linux-next commit "x86: mm: avoid allocating struct
mm_structon the stack" [1] introduced a compilation error with "arm64: mm: convertmm/dump.cto usewalk_page_range()" [2]. Fixed it by using the new API.
arch/arm64/mm/dump.c:326:38: error: too few arguments to function call, expected 3, have 2ptdump_walk_pgd(&st.ptdump, info->mm); ~~~~~~~~~~~~~~~ ^
./include/linux/ptdump.h:20:1: note: 'ptdump_walk_pgd' declared here voidptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd);
^arch/arm64/mm/dump.c:364:38: error: too few arguments to function call, expected 3, have 2ptdump_walk_pgd(&st.ptdump, &init_mm); ~~~~~~~~~~~~~~~ ^
Quoted 7 lines
./include/linux/ptdump.h:20:1: note: 'ptdump_walk_pgd' declared here voidptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd);
^
2 errors generated.
Actually this was in the patch I originally posted - somehow it got lost when Andrew picked it up.
Quoted 3 lines
[2] http://lkml.kernel.org/r/[email protected]
Signed-off-by Qian Cai <[email protected]>
Since this matches what I originally wrote... ;)
Steve
Quoted 29 lines
--- arch/arm64/mm/dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/mm/dump.c +2
-2@@ -323,7 +323,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info) } }; -ptdump_walk_pgd (&st.ptdump, info->mm); +ptdump_walk_pgd (&st.ptdump, info->mm,NULL ); }static void ptdump_initialize (void )@@ -361,7 +361,7 @@ void ptdump_check_wx(void) } }; -ptdump_walk_pgd (&st.ptdump, &init_mm); +ptdump_walk_pgd (&st.ptdump, &init_mm,NULL );if (st.wx_pages || st.uxn_pages) pr_warn("Checked W+X mappings: FAILED, %lu W+X pages found, %lu non-UXN pages found\n",Signature · 1 line
2.21.0 (Apple Git-122.2)
Quoted 28 lines · Steven Price
Quoted 16 lines · Qian Cai
The linux-next commit "x86: mm: avoid allocating struct
mm_structon the stack" [1] introduced a compilation error with "arm64: mm: convertmm/dump.cto usewalk_page_range()" [2]. Fixed it by using the new API.
arch/arm64/mm/dump.c:326:38: error: too few arguments to function call, expected 3, have 2ptdump_walk_pgd(&st.ptdump, info->mm); ~~~~~~~~~~~~~~~ ^
./include/linux/ptdump.h:20:1: note: 'ptdump_walk_pgd' declared here voidptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd);
^arch/arm64/mm/dump.c:364:38: error: too few arguments to function call, expected 3, have 2ptdump_walk_pgd(&st.ptdump, &init_mm); ~~~~~~~~~~~~~~~ ^Quoted 7 lines
./include/linux/ptdump.h:20:1: note: 'ptdump_walk_pgd' declared here voidptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd);
^
2 errors generated.Actually this was in the patch I originally posted - somehow it got lost when Andrew picked it up.
Quoted 7 lines
Quoted 3 lines
[2] http://lkml.kernel.org/r/[email protected]
Signed-off-by Qian Cai <[email protected]>Since this matches what I originally wrote... ;)
Reviewed-by Steven Price <[email protected]>
I'm assuming Andrew will queue this alongside the others.
Thanks,
Will