Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp454453ybl; Wed, 4 Dec 2019 05:37:05 -0800 (PST) X-Google-Smtp-Source: APXvYqxrYSmbKczNZhC3wjhrKh7QupmqlpJi4nMp5tipL1LiC8FxDWJ4/BnyaeSOTUHJ89PRR8wc X-Received: by 2002:a9d:d6a:: with SMTP id 97mr1561479oti.44.1575466625044; Wed, 04 Dec 2019 05:37:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575466625; cv=none; d=google.com; s=arc-20160816; b=DTtXbIkZ+govT/gjNnPAD/ZdLTvAmFCoZSo/g2O/9z4xLKDweTQiI9BQGu153o23zw ZVurbfJOoPgOTXLh9gh/rE0iMLKRB4QWHM1cYkvG9xwygeJYTPFLNSty7vAiVEqW9bGo JQHf47VTAw1oqVFOaDA9OUUyZaFDF8re5bbdt0VdwV9C33lhT+h4OuCx5jTWVte/cNko L+g2UK/jVu5jc7H9gmqK4uXk8CEUk0bKE9+oj9pDeZ3b00YBvq9u0qqG1InYqEdnc3HF pCYbgzRvd0PCne/DLPX74OAq9OKYLuZ3iJvEil6QCaTyZzS2jVOsZFOTrwwJnGsXweY3 DHQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gsxBSJMrev/SxOwOS8U1NE/zJhvhFQpkbcsNWJa3VFA=; b=ULS9JBDDqhQpHpT9jXmM/jjSJQ64H5XUtzurqd0ro1fuaju1YTZzHfoBnsqJXDn6Ke eu48aJc0m9I9uMiorrn2CublDbqZMuQcq+lPgXwM6NQ5cTfvGTVEtbrIuW8q4tfhRsfM 75BQgf9WHPpE4q594iCxsEEOhyakK9HntbX6Ydo6HGofA0ilM+A1oDqKoA6bUR/P9h9A FUCzGJiCHLdi1BRkOaG5vRCcDUyCOGDvVNKViC9m/2/OTgimGqVAj79RBhr6gLTxpSQU SzW5EOD1iAdv0e/gq5T+VQN2FZzPb1K0aG0QDrrkccJmWRIZpUPRlFggm+VcJEikzYji SavA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YMFdKWyJ; 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 65si3056221oig.274.2019.12.04.05.36.53; Wed, 04 Dec 2019 05:37:05 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YMFdKWyJ; 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 S1727883AbfLDNfU (ORCPT + 99 others); Wed, 4 Dec 2019 08:35:20 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:42890 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727530AbfLDNfU (ORCPT ); Wed, 4 Dec 2019 08:35:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gsxBSJMrev/SxOwOS8U1NE/zJhvhFQpkbcsNWJa3VFA=; b=YMFdKWyJN3dcfeI/aItzDAqwaJ qg4WH/eHBoJikRcEN5hWnzzg7w99XWp3sQyb4St3knyk+Us3/ZB4NvLVIpNqOmLxba2hgcvl+h8XB Cj3gWb3YFio17fRpBZ2f65RjLw0hg7h+NO1xob/dknCtw+N8NVETJRg9IrG4G8kW6ia9Ee1wIr4wo 5rWA7o96bKeHqE1fhEgeweMTEQ/h4E7CJ7KHkjyIaN6o47ebmwrxEOMvhkK6yR4J0cYUctBiC5pb4 2YTR4PKZLVar7ZgulYtkU6BZQAg6Px1zN+TekGkKXcekYkfdlCMvcgiZV1r4GZQiYUJ01A2O5lEM8 dnQnZF7g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1icUnw-0000gz-BL; Wed, 04 Dec 2019 13:34:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7FD5B3011E0; Wed, 4 Dec 2019 14:33:37 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 489B72B2679C9; Wed, 4 Dec 2019 14:34:54 +0100 (CET) Date: Wed, 4 Dec 2019 14:34:54 +0100 From: Peter Zijlstra To: Geert Uytterhoeven 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 Subject: Re: [PATCH v6 10/18] sh/tlb: Convert SH to generic mmu_gather Message-ID: <20191204133454.GW2844@hirez.programming.kicks-ass.net> References: <20190219103148.192029670@infradead.org> <20190219103233.443069009@infradead.org> <20191204104733.GR2844@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? --- arch/sh/include/asm/pgalloc.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h index 22d968bfe9bb..c910e5bcde62 100644 --- 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