[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whLs=TrRzmB9KRLxcPERq0QXPUUkbD8vzKzaDszBcUspg@mail.gmail.com>
Date:   Mon, 14 Oct 2019 10:41:18 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc:     Linux-MM <linux-mm@...ck.org>, linux-snps-arc@...ts.infradead.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>, Will Deacon <will@...nel.org>,
        "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Nick Piggin <npiggin@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [RFC] asm-generic/tlb: stub out pmd_free_tlb() if __PAGETABLE_PMD_FOLDED
On Fri, Oct 11, 2019 at 3:38 PM Vineet Gupta <Vineet.Gupta1@...opsys.com> wrote:
>
> This is inine with similar patches for nopud [1] and nop4d [2] cases.
I don't think your patch is wrong, but wouldn't it be easier and
cleaner to just do this instead
    --- a/include/asm-generic/pgtable-nopmd.h
    +++ b/include/asm-generic/pgtable-nopmd.h
    @@ -60,7 +60,7 @@ static inline pmd_t * pmd_offset(pud_t * pud,
unsigned long address)
     static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
     {
     }
    -#define __pmd_free_tlb(tlb, x, a)          do { } while (0)
    +#define pmd_free_tlb(tlb, x, a)            do { } while (0)
     #undef  pmd_addr_end
     #define pmd_addr_end(addr, end)                    (end)
and just rely on the regular "#ifndef pmd_free_tlb" in
include/asm-generic/tlb.h?
Completely untested.
              Linus
Powered by blists - more mailing lists