Commit abcdbd03 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/vdso: Remove get_page() in vdso_pagelist initialization

Partly copied from commit 16fb1a9b ("arm64: vdso: clean up
vdso_pagelist initialization").

No need to get_page() the vdso text/data - these are part of the
kernel image.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9d14540bd10832b6c9519d74fb5728fdc4974b36.1601197618.git.christophe.leroy@csgroup.eu
parent 1bb30b7a
...@@ -748,7 +748,7 @@ static int __init vdso_init(void) ...@@ -748,7 +748,7 @@ static int __init vdso_init(void)
BUG_ON(vdso32_pagelist == NULL); BUG_ON(vdso32_pagelist == NULL);
for (i = 0; i < vdso32_pages; i++) { for (i = 0; i < vdso32_pages; i++) {
struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE);
get_page(pg);
vdso32_pagelist[i] = pg; vdso32_pagelist[i] = pg;
} }
vdso32_pagelist[i++] = virt_to_page(vdso_data); vdso32_pagelist[i++] = virt_to_page(vdso_data);
...@@ -761,15 +761,13 @@ static int __init vdso_init(void) ...@@ -761,15 +761,13 @@ static int __init vdso_init(void)
BUG_ON(vdso64_pagelist == NULL); BUG_ON(vdso64_pagelist == NULL);
for (i = 0; i < vdso64_pages; i++) { for (i = 0; i < vdso64_pages; i++) {
struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE);
get_page(pg);
vdso64_pagelist[i] = pg; vdso64_pagelist[i] = pg;
} }
vdso64_pagelist[i++] = virt_to_page(vdso_data); vdso64_pagelist[i++] = virt_to_page(vdso_data);
vdso64_pagelist[i] = NULL; vdso64_pagelist[i] = NULL;
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
get_page(virt_to_page(vdso_data));
smp_wmb(); smp_wmb();
vdso_ready = 1; vdso_ready = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment