+ asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: asm-generic/mm: stub out p{4,d}d_clear_bad() if __PAGETABLE_P{4,u}D_FOLDED
has been added to the -mm tree.  Its filename is
     asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded.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/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx>
Subject: asm-generic/mm: stub out p{4,d}d_clear_bad() if __PAGETABLE_P{4,u}D_FOLDED

This removes the code for 2 level paging as seen on ARC

| bloat-o-meter2 vmlinux-D-elide-p4d_free_tlb vmlinux-E-elide-p?d_clear_b=
ad
| add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-22 (-22)
| function                                     old     new   delta
| pud_clear_bad                                 20       -     -20
| p4d_clear_bad                                 20       -     -20
| Total: Before=3D4137104, After=3D4137082, chg -1.000000%

Link: http://lkml.kernel.org/r/20191009222658.961-4-vgupta@xxxxxxxxxxxx
Signed-off-by: Vineet Gupta <vgupta@xxxxxxxxxxxx>
Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@xxxxxxxxxxxxx>
Cc: Nick Piggin <npiggin@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/asm-generic/pgtable.h |   11 +++++++++++
 mm/pgtable-generic.c          |    4 ++++
 2 files changed, 15 insertions(+)

--- a/include/asm-generic/pgtable.h~asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded
+++ a/include/asm-generic/pgtable.h
@@ -558,8 +558,19 @@ static inline pgprot_t pgprot_modify(pgp
  * Do the tests inline, but report and clear the bad entry in mm/memory.c.
  */
 void pgd_clear_bad(pgd_t *);
+
+#ifndef __PAGETABLE_P4D_FOLDED
 void p4d_clear_bad(p4d_t *);
+#else
+#define p4d_clear_bad(p4d)        do { } while (0)
+#endif
+
+#ifndef __PAGETABLE_PUD_FOLDED
 void pud_clear_bad(pud_t *);
+#else
+#define pud_clear_bad(p4d)        do { } while (0)
+#endif
+
 void pmd_clear_bad(pmd_t *);
 
 static inline int pgd_none_or_clear_bad(pgd_t *pgd)
--- a/mm/pgtable-generic.c~asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded
+++ a/mm/pgtable-generic.c
@@ -24,17 +24,21 @@ void pgd_clear_bad(pgd_t *pgd)
 	pgd_clear(pgd);
 }
 
+#ifndef __PAGETABLE_P4D_FOLDED
 void p4d_clear_bad(p4d_t *p4d)
 {
 	p4d_ERROR(*p4d);
 	p4d_clear(p4d);
 }
+#endif
 
+#ifndef __PAGETABLE_PUD_FOLDED
 void pud_clear_bad(pud_t *pud)
 {
 	pud_ERROR(*pud);
 	pud_clear(pud);
 }
+#endif
 
 void pmd_clear_bad(pmd_t *pmd)
 {
_

Patches currently in -mm which might be from Vineet.Gupta1@xxxxxxxxxxxx are

asm-generic-tlb-stub-out-pud_free_tlb-if-__pagetable_pud_folded.patch
asm-generic-tlb-stub-out-p4d_free_tlb-if-__pagetable_p4d_folded.patch
asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux