Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp552337ybl; Wed, 4 Dec 2019 07:09:45 -0800 (PST) X-Google-Smtp-Source: APXvYqy2IikHAKxq1fs99ulYoIGgPtWTVYLd8zvcZfgpFasyTDS4EB0AfYtOs90NneZTzVGdsdrT X-Received: by 2002:a9d:6e88:: with SMTP id a8mr2869145otr.79.1575472185609; Wed, 04 Dec 2019 07:09:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575472185; cv=none; d=google.com; s=arc-20160816; b=spb3gG3wW5yNDTpZMfnebtuKUulD8TSQti5EaMgJGpVvjL9AM67bvA/zhYymvo/xY0 ++zrFP9JxnfTL//eFRm8Fkcc0tZs3sBCK2mmext72t2Y7Li1F17lo3wQCb1z6Qp6X9n2 U5idsPhgskYhsB3tY1/u2kzRnt8xCwgnIc46lT8F6ZaRaEiDNDVOR6roU0p8fUl3WmNO rlz4vdd+tYQjpwm/ZF3bixrEgkT2wwLBYWgNyrmBK0mW/VMGhTy4mn2wtmCQesiwYM61 efYB/29Sp6FVHAzWbL5/bcNedXEfRvEzLERVz/CBGLpSkjEJ4OGFDneDOhD6mWygdAcU i+vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=f4ZC0UjUYaClryTDM9fyoa0B+sVNwgSNxlMEtOTcR1A=; b=ZOZFmmh7MuTK/VaNeWeeFOvJlcZWiXaN3zQSyOMMjpZrz+lLQi9piY9jNYINIrGLzD TOg7Ox5H+94Or4/pNmNrbUqRArVMlbWplN3g5tyVv+u3EivGerDBVdjSwG5L8CDXDtuG 2Uc9exyruuIP2BK5+8rn0+cEdrqi5aPesa2V2bWU+7ecDqMtUS5z79yPLGO9rFLzGKE7 CbSSLl13nVnUSf12+HP7SttcAXtgLhur9Yt25lYPD2sZJCx50eE0YrsSuOoeDmAJBZA5 94UmyX5pMyG3A8B8Q1hWkO/AdkY9E1xDNQle1JS1II2Eo+iNZ0b506cIgVxwgVVYFQDL 5rIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r126si3492999oig.36.2019.12.04.07.09.21; Wed, 04 Dec 2019 07:09:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728174AbfLDPIF convert rfc822-to-8bit (ORCPT + 99 others); Wed, 4 Dec 2019 10:08:05 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37942 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727889AbfLDPIF (ORCPT ); Wed, 4 Dec 2019 10:08:05 -0500 Received: by mail-ot1-f66.google.com with SMTP id h20so354018otn.5; 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=dFI2sS/rJq95fEhQmuAbN8uMUsCSyy5KStRwyliw/v9AxhG52ghhnBOVMQN1jDpPt6 Jrx76WQHiPLpMF83vI6qnd90hwyBwVNWomC9S6sR4qFrBhL1PhoYP0WPyl6vLEuV1P2I A6CcR9zFcdIC8aSEqHllKt9cItkesiYMpFOJhSsjiQCau06oXwJva2OeH0yb/400ucC6 8wyCnjUlrUubs/z6W3pLnk2NcASWPYR609Vtizi9zdOYRBIbDxnzcbbU6au2aFKGG7eQ C30B0zUAqI96E9XIpMzXwP2Gd00DoYVorNwrvjnXDNEyVMELZsqJdNc4vb+hY6UhUf80 VXVQ== X-Gm-Message-State: APjAAAWTb94YeVI1uM9FXTsduq0kMqXOHocoQmxCJjvoi/SiFh6AXCKO 7tgOH080oq7eQQ4bojrZE9G8hcgiDAZLa+6YKaA= 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: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/pgalloc.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 = virt_to_page(pmdp); \ > > > - pgtable_pmd_page_dtor(page); \ > > > - tlb_remove_page((tlb), page); \ > > > + pgtable_pmd_page_dtor(pmdp); \ > > > > expected ‘struct page *’ but argument is of type ‘pmd_t * {aka struct > > *}’ > > > > > + 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 = 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 -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds