Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp525563ybl; Fri, 31 Jan 2020 03:20:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzwKYSwPB4apBPHTVSm9zZhi7/FAuOklFQQjwaP+6BIrr/WS9juHg6fxvtKYebzxPtz7rxz X-Received: by 2002:a9d:7b4e:: with SMTP id f14mr7210353oto.355.1580469600018; Fri, 31 Jan 2020 03:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580469600; cv=none; d=google.com; s=arc-20160816; b=MZL34/XMNGVAm3qP0CKB6psh3S+oA72znhC/1kkNdxpV7ZvfCAEkKSzeBB/q/k2DJs MRF0zXk++N5ds5GUwczmQFP2z1QI12RUWYxqOHNx2io7EYaLBHnQFmdPsfEuhvtr9aF9 ShrTAzWLe1mFDV1zJGoNKLfFnMHzrIiYYEq44eBqDA6lQnlTt0tWssYQeEqsawHMICdg +TGNfWonSm6mAYuD7SBxSZw4MTo+xy7ZlkqojRkShfv4RgYTaPF7aZey6dJJgUO7lDKH MKyY5LBL4vEd6AreA2Pynbo2bPwXO4SWC/hJzVOxY+yS8faxieFpuH31jtSd9qU1dQtE mB8g== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yDD0WE9hySTkXN/7U9lSknsDhedU8SiYjvLPMcAOwUM=; b=L/6tygX7X+JryJHh8hSdeAvZWr1nojV8yVMEEfH9oD0hvZbnsM7slWHG1fJTMi5mfT q+H644dguhz+R8kMe2NSSj+XT+KlwHzE4NTfJRoeqt6x9xLCJlGUKuiMHdbxjAx9o5qI 6RtqGHuS4m0nxGuJkNuEciJFetrgIvzuCs5wKcnSI1CofftUVQVMuPIU1gZPQ/7UuXUt 9SiOgDyPikO7kQxZja/ti+3VHEmHUXFC7NmjY4Isxuqf466j2NeoO6duqf24Z/3wjOBH 6tipxF6rXe5UGWx3/sE2+w3vezwrbN4tnQUpHbpH4pAT2CJKhS03ZSmttl4qlnRqh8a+ Nf5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vZ7rnWZl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n207si2865733oig.185.2020.01.31.03.19.47; Fri, 31 Jan 2020 03:20:00 -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=pass header.i=@kernel.org header.s=default header.b=vZ7rnWZl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728408AbgAaLSa (ORCPT + 99 others); Fri, 31 Jan 2020 06:18:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:52518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728268AbgAaLS3 (ORCPT ); Fri, 31 Jan 2020 06:18:29 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2566C20707; Fri, 31 Jan 2020 11:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580469509; bh=kfksbVctjzkm9cOOLXTOESFvzM3fs9LV6pPtQoFVLmI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vZ7rnWZlXp3qRQJMGAb5dXXrK3h9eqVI1EAq8cOoQT1+57gnyX1fNJ/TgEHHuVG7D TA00ucPfJGpvv1jkS137NaXFfaPQGfE1BqHpfQfAvKfYIiPpJmsziReRrBooQ/+jkP zZdy0qb4tH84LrqdKCCpCShFwt2L6VSSyKDBVfD0= Date: Fri, 31 Jan 2020 11:18:24 +0000 From: Will Deacon To: Peter Zijlstra Cc: Greg Ungerer , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] Rewrite Motorola MMU page-table layout Message-ID: <20200131111824.GA4298@willie-the-truck> References: <20200129103941.304769381@infradead.org> <8a81e075-d3bd-80c1-d869-9935fdd73162@linux-m68k.org> <20200131093813.GA3938@willie-the-truck> <20200131102239.GB14914@hirez.programming.kicks-ass.net> <20200131111459.GO14946@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200131111459.GO14946@hirez.programming.kicks-ass.net> 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 Fri, Jan 31, 2020 at 12:14:59PM +0100, Peter Zijlstra wrote: > On Fri, Jan 31, 2020 at 11:22:39AM +0100, Peter Zijlstra wrote: > > On Fri, Jan 31, 2020 at 09:38:13AM +0000, Will Deacon wrote: > > > > > > This series breaks compilation for the ColdFire (with MMU) variant of > > > > the m68k family: > > > > That's like the same I had reported by the build robots for sun3, which > > I fixed by frobbing pgtable_t. That said, this is probably a more > > consistent change. > > > > One note below: > > > > > > > -static inline struct page *pte_alloc_one(struct mm_struct *mm) > > > +static inline pgtable_t pte_alloc_one(struct mm_struct *mm) > > > { > > > struct page *page = alloc_pages(GFP_DMA, 0); > > > pte_t *pte; > > > @@ -54,20 +55,19 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm) > > > return NULL; > > > } > > > > > > - pte = kmap(page); > > > - if (pte) { > > > - clear_page(pte); > > > - __flush_page_to_ram(pte); > > > - flush_tlb_kernel_page(pte); > > > - nocache_page(pte); > > > - } > > > - kunmap(page); > > > + pte = page_address(page); > > > + clear_page(pte); > > > + __flush_page_to_ram(pte); > > > + flush_tlb_kernel_page(pte); > > > + nocache_page(pte); > > > > See how it does the nocache dance ^ > > > So either, alloc_one() shouldn't either, or it's all buggered. > > Damn, we weren't going to touch coldfire! :-)) > > So now I found the coldfire docs, and it looks like this thing is a > software tlb-miss arch, so there is no reason what so ever for this to > be nocache. I'll 'fix' that. Does that mean we can drop the GFP_DMA too? If so, this all ends up looking very similar to the sun3 code wrt alloc/free and they could probably use the same implementation (since the generic code doesn't like out pgtable_t definition). Will