* + sparc64-simplify-vmemmap_populate.patch added to -mm tree
@ 2017-10-13 21:18 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-10-13 21:18 UTC (permalink / raw)
To: pasha.tatashin, ard.biesheuvel, aryabinin, bob.picco,
borntraeger, catalin.marinas, daniel.m.jordan, davem, dvyukov,
glider, heiko.carstens, hpa, mark.rutland, mgorman, mhocko,
mhocko, mingo, sam, steven.sistare, tglx, will.deacon, willy,
mm-commits
The patch titled
Subject: sparc64: simplify vmemmap_populate
has been added to the -mm tree. Its filename is
sparc64-simplify-vmemmap_populate.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/sparc64-simplify-vmemmap_populate.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/sparc64-simplify-vmemmap_populate.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Pavel Tatashin <pasha.tatashin@oracle.com>
Subject: sparc64: simplify vmemmap_populate
Remove duplicating code by using common functions vmemmap_pud_populate and
vmemmap_pgd_populate.
Link: http://lkml.kernel.org/r/20171013173214.27300-5-pasha.tatashin@oracle.com
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Bob Picco <bob.picco@oracle.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/sparc/mm/init_64.c | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
diff -puN arch/sparc/mm/init_64.c~sparc64-simplify-vmemmap_populate arch/sparc/mm/init_64.c
--- a/arch/sparc/mm/init_64.c~sparc64-simplify-vmemmap_populate
+++ a/arch/sparc/mm/init_64.c
@@ -2643,30 +2643,19 @@ int __meminit vmemmap_populate(unsigned
vstart = vstart & PMD_MASK;
vend = ALIGN(vend, PMD_SIZE);
for (; vstart < vend; vstart += PMD_SIZE) {
- pgd_t *pgd = pgd_offset_k(vstart);
+ pgd_t *pgd = vmemmap_pgd_populate(vstart, node);
unsigned long pte;
pud_t *pud;
pmd_t *pmd;
- if (pgd_none(*pgd)) {
- pud_t *new = vmemmap_alloc_block(PAGE_SIZE, node);
+ if (!pgd)
+ return -ENOMEM;
- if (!new)
- return -ENOMEM;
- pgd_populate(&init_mm, pgd, new);
- }
-
- pud = pud_offset(pgd, vstart);
- if (pud_none(*pud)) {
- pmd_t *new = vmemmap_alloc_block(PAGE_SIZE, node);
-
- if (!new)
- return -ENOMEM;
- pud_populate(&init_mm, pud, new);
- }
+ pud = vmemmap_pud_populate(pgd, vstart, node);
+ if (!pud)
+ return -ENOMEM;
pmd = pmd_offset(pud, vstart);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-13 21:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13 21:18 + sparc64-simplify-vmemmap_populate.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).