Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2693610ybg; Thu, 24 Oct 2019 13:40:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzo+4GqdWM7dUJm0jYtmimMox2kmvZKzEXLfpv+xDQWSvIGHKIi4XAixNzy5nTO6fkuUQCg X-Received: by 2002:a50:f096:: with SMTP id v22mr92155edl.149.1571949646846; Thu, 24 Oct 2019 13:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571949646; cv=none; d=google.com; s=arc-20160816; b=rjD8SQt80pA+BdOJryJL1LsRK1Wp8k3Z36q3QMlrL6O3WZTEZpGtYPbUjQDN43PvBe K6nw1oprJMVirsoFVXxFgQSs72wrSXi9OXazR+mXE6gA4NruO5/xA5pEs8IgQp/Pfy8L 7IxaErEbBWR91eB8dCWCS4Ltwdh13ReXoNSfLXsnO0SHfopkL+Up9+K3p/dJKm6Z8UVY yfPappUFPww2KCb5kIUracx+LjjoaTXhr9t3BhH0V/52IsyDpqZjwujST2HR9HY7xA/A vplaMH2LzP3ebpd/4LYi+2bXHxy6JwPp0N73FI91qdX/z5PV52V/Uz0xz6aX/rSYgxBZ ObaA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=tRBdt2c4LqMdqwahzYHo3feHRUqav4bqrVfQ7Csoimc=; b=xuGpMYWPG6xsWsJLTXC9tOmm6ChphBR0pKBJF9Dymb3oZsmhCZqXOkqadMYJDE1G63 ieJNZJ0EPu1Ivxhy3ffiiL7ShbvWY7vGG3VEToBLXnpkutsQl0dNNMZvb4BEruMBnArN uoDweUflzJffWfJUvOnbt2HrAl3anSS48HFH59QM4sth7ixhFNUxXu1dITSxucYbk3wW cQjw346QebbwvXJ7ef+PbEZSTbrt/K29fFZDyTnxZunpAx3zQsc7BqiseNZlryCVpuHe mPBfMsViRyBQDf7tX2455GMDJSFdmOZe1Wphv9ban1/PynKom32FYDfJgQ35qZzB6XUs fEUg== 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 i10si17875912ede.101.2019.10.24.13.40.20; Thu, 24 Oct 2019 13:40:46 -0700 (PDT) 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 S2408533AbfJXGXP (ORCPT + 99 others); Thu, 24 Oct 2019 02:23:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:34470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727750AbfJXGXO (ORCPT ); Thu, 24 Oct 2019 02:23:14 -0400 Received: from [10.44.0.22] (unknown [103.48.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C14921655; Thu, 24 Oct 2019 06:23:06 +0000 (UTC) Subject: Re: [PATCH 04/12] m68k: nommu: use pgtable-nopud instead of 4level-fixup To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , Anton Ivanov , Arnd Bergmann , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Helge Deller , "James E.J. Bottomley" , Jeff Dike , "Kirill A. Shutemov" , Linus Torvalds , Mark Salter , Matt Turner , Michal Simek , Richard Weinberger , Russell King , Sam Creasey , Vincent Chen , Vineet Gupta , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-parisc@vger.kernel.org, linux-um@lists.infradead.org, sparclinux@vger.kernel.org, Mike Rapoport References: <1571822941-29776-1-git-send-email-rppt@kernel.org> <1571822941-29776-5-git-send-email-rppt@kernel.org> <20191024053533.GA12281@rapoport-lnx> From: Greg Ungerer Message-ID: <24454c38-184a-b5fe-e534-aad3713c157e@linux-m68k.org> Date: Thu, 24 Oct 2019 16:23:04 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191024053533.GA12281@rapoport-lnx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, On 24/10/19 3:35 pm, Mike Rapoport wrote: > Hi Greg, > > On Thu, Oct 24, 2019 at 02:09:01PM +1000, Greg Ungerer wrote: >> Hi Mike, >> >> On 23/10/19 7:28 pm, Mike Rapoport wrote: >>> From: Mike Rapoport >>> >>> The generic nommu implementation of page table manipulation takes care of >>> folding of the upper levels and does not require fixups. >>> >>> Simply replace of include/asm-generic/4level-fixup.h with >>> include/asm-generic/pgtable-nopud.h. >>> >>> Signed-off-by: Mike Rapoport >>> --- >>> arch/m68k/include/asm/pgtable_no.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h >>> index c18165b..ccc4568 100644 >>> --- a/arch/m68k/include/asm/pgtable_no.h >>> +++ b/arch/m68k/include/asm/pgtable_no.h >>> @@ -2,7 +2,7 @@ >>> #ifndef _M68KNOMMU_PGTABLE_H >>> #define _M68KNOMMU_PGTABLE_H >>> -#include >>> +#include >>> /* >>> * (C) Copyright 2000-2002, Greg Ungerer >> >> This fails to compile for me (targeting m5208evb_defconfig): >> >> CC init/main.o >> In file included from ./arch/m68k/include/asm/pgtable_no.h:56:0, >> from ./arch/m68k/include/asm/pgtable.h:3, >> from ./include/linux/mm.h:99, >> from ./include/linux/ring_buffer.h:5, >> from ./include/linux/trace_events.h:6, >> from ./include/trace/syscall.h:7, >> from ./include/linux/syscalls.h:85, >> from init/main.c:21: >> ./include/asm-generic/pgtable.h:738:34: error: unknown type name ‘pmd_t’ >> static inline int pmd_soft_dirty(pmd_t pmd) >> ^ > > ... > >> scripts/Makefile.build:265: recipe for target 'init/main.o' failed >> make[1]: *** [init/main.o] Error 1 >> Makefile:1649: recipe for target 'init' failed >> make: *** [init] Error 2 > > The hunk below fixes the build. > > diff --git a/arch/m68k/include/asm/page.h b/arch/m68k/include/asm/page.h > index c00b67a..05e1e1e 100644 > --- a/arch/m68k/include/asm/page.h > +++ b/arch/m68k/include/asm/page.h > @@ -21,7 +21,7 @@ > /* > * These are used to make use of C type-checking.. > */ > -#if CONFIG_PGTABLE_LEVELS == 3 > +#if !defined(CONFIG_MMU) || CONFIG_PGTABLE_LEVELS == 3 > typedef struct { unsigned long pmd[16]; } pmd_t; > #define pmd_val(x) ((&x)->pmd[0]) > #define __pmd(x) ((pmd_t) { { (x) }, }) That looks better. Thanks. Tested and working on m68knommu. For the combined patches: Acked-by: Greg Ungerer Regards Greg