From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0152C2BD09 for ; Wed, 4 Dec 2019 15:08:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BAF472084F for ; Wed, 4 Dec 2019 15:08:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAF472084F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 68A866B0B28; Wed, 4 Dec 2019 10:08:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 63AA66B0B29; Wed, 4 Dec 2019 10:08:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5506D6B0B2A; Wed, 4 Dec 2019 10:08:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 0C3606B0B28 for ; Wed, 4 Dec 2019 10:08:06 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id B1248181AEF31 for ; Wed, 4 Dec 2019 15:08:05 +0000 (UTC) X-FDA: 76227789330.14.box83_c6176a350920 X-HE-Tag: box83_c6176a350920 X-Filterd-Recvd-Size: 5553 Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Wed, 4 Dec 2019 15:08:04 +0000 (UTC) Received: by mail-ot1-f67.google.com with SMTP id r27so6578905otc.8 for ; Wed, 04 Dec 2019 07:08:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RHL8dSUOrL5pjHfjC3HpvdxweDDlt2LLj4x0vndZh5c=; b=b1MhNIjgpilh0sZ9BXS2HilxpcNnN16sLmDvrOprz8hzliIixpUZlBg2ojQxUCi11A uukb7BigI9iNPLTzE/HwUtiJaSr4f4c0F5pcdSRwJ/X0I6drBuBUNlHfIG+/xt9Xay96 cy2IOY9fcpdXTSDKQbAwLial8SVYHeQ9rNmjiDHEjTl06eU0nhGvOuRFMwu/juPg0fAn ussWANKmNc+Qigbjh+63mS7IAm6zAX9cRLcFpybBXYaaGLs387SB9tt3CWf909g9kHKC ywUp++sXhC8BTcpWsQtEjgKOTTZ2+gICipzl80h6kEsrC2DC6/uLpX5HvPkdPgCLHy6s ZKUA== X-Gm-Message-State: APjAAAXQCHkVExTZxapZye+7bgl9LV/BNJxEjBZ5921UD8mguqM/fDJT a7xb1t+JFnv6h+M+tXTbn28/3sD0q92bmt0RMQ8= X-Google-Smtp-Source: APXvYqxPVfERmy1gBvrBqxHZC0GqTcE2GMaywFBbQ/c/FAax0E6p7GOmXJcPBc6vFcrEsleb5RV/wF65+30RG4z9s+w= X-Received: by 2002:a9d:6c81:: with SMTP id c1mr1456108otr.39.1575472084156; Wed, 04 Dec 2019 07:08:04 -0800 (PST) MIME-Version: 1.0 References: <20190219103148.192029670@infradead.org> <20190219103233.443069009@infradead.org> <20191204104733.GR2844@hirez.programming.kicks-ass.net> <20191204133454.GW2844@hirez.programming.kicks-ass.net> In-Reply-To: <20191204133454.GW2844@hirez.programming.kicks-ass.net> From: Geert Uytterhoeven Date: Wed, 4 Dec 2019 16:07:53 +0100 Message-ID: Subject: Re: [PATCH v6 10/18] sh/tlb: Convert SH to generic mmu_gather To: Peter Zijlstra Cc: Will Deacon , "Aneesh Kumar K.V" , Andrew Morton , Nicholas Piggin , Linux-Arch , Linux MM , Linux Kernel Mailing List , Russell King , Heiko Carstens , Rik van Riel , Yoshinori Sato , Rich Felker , Linux-sh list , Guenter Roeck Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hoi Peter, On Wed, Dec 4, 2019 at 2:35 PM Peter Zijlstra wrote: > On Wed, Dec 04, 2019 at 01:32:58PM +0100, Geert Uytterhoeven wrote: > > > Does the below help? > > > > Unfortunately not. > > > > > diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgal= loc.h > > > index 22d968bfe9bb..73a2c00de6c5 100644 > > > --- a/arch/sh/include/asm/pgalloc.h > > > +++ b/arch/sh/include/asm/pgalloc.h > > > @@ -36,9 +36,8 @@ do { = \ > > > #if CONFIG_PGTABLE_LEVELS > 2 > > > #define __pmd_free_tlb(tlb, pmdp, addr) \ > > > do { \ > > > - struct page *page =3D virt_to_page(pmdp); \ > > > - pgtable_pmd_page_dtor(page); \ > > > - tlb_remove_page((tlb), page); \ > > > + pgtable_pmd_page_dtor(pmdp); \ > > > > expected =E2=80=98struct page *=E2=80=99 but argument is of type =E2=80= =98pmd_t * {aka struct > > *}=E2=80=99 > > > > > + tlb_remove_page((tlb), (pmdp)); \ > > > > likewise > > Duh.. clearly I misplaced my SH cross compiler. Let me go find it. > > Also, looking at pgtable.c the pmd_t* actually comes from a kmemcach() > and should probably use pmd_free() (which is what the old code did too). > > Also, since SH doesn't have ARCH_ENABLE_SPLIT_PMD_PTLOCK, it will never > need pgtable_pmd_page_dtor(). > > The below seems to build se7722_defconfig using sh4-linux-. That is, the > build fails, on 'node_reclaim_distance', not pgtable stuff. > > Does this fare better? Yes. Migo-R is happy again. Tested-by: Geert Uytterhoeven > --- a/arch/sh/include/asm/pgalloc.h > +++ b/arch/sh/include/asm/pgalloc.h > @@ -36,9 +36,7 @@ do { \ > #if CONFIG_PGTABLE_LEVELS > 2 > #define __pmd_free_tlb(tlb, pmdp, addr) \ > do { \ > - struct page *page =3D virt_to_page(pmdp); \ > - pgtable_pmd_page_dtor(page); \ > - tlb_remove_page((tlb), page); \ > + pmd_free((tlb)->mm, (pmdp)); \ > } while (0); > #endif Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds