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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 14B3BFC6194 for ; Fri, 8 Nov 2019 08:35:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE36A2178F for ; Fri, 8 Nov 2019 08:35:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uu+vdnsa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE36A2178F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FE/37zpuxeUs0JNUkAju6fGTNUVoCyxdsLAlpyTPfEY=; b=uu+vdnsaQlWHX3 tv2EEuHyE9Ubb2hW5KjVlAZpfS4+tHtsJbAlR2zSOuuw0jeBtHPxUg2FV8DNheIuVZiwNOaJjn4Tg SEA5D50wnH120uRXRFo62HngP1DmCbCZV11YV/U+w5M/SxF7EmLJkrIlXjGofY758upFvMkrgTKLU qgOjOf83dr4dYdVqHCvRbaLLIC7PcM37wJ/JvO+xI2YCmkVHc3ChDnSJNjsp8wA1rwA51FvIfFomE q9prUqP/FlFiNye97bgj/EaNP6lMp+5xRwGRJyQ0hNXFQ8Nfj78aSFERakeWiE+efHXLMibjoff4A t8Uj6MwKM3f0OMvAE4Aw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSzkA-00013Y-9f; Fri, 08 Nov 2019 08:35:46 +0000 Received: from mail-oi1-f195.google.com ([209.85.167.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSzk7-00012Y-OI; Fri, 08 Nov 2019 08:35:45 +0000 Received: by mail-oi1-f195.google.com with SMTP id j7so4573524oib.3; Fri, 08 Nov 2019 00:35:43 -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; bh=h1uMs1sJfEiNP+XnwLWOA56bVLhvU2oQuJJbSb2fF04=; b=Sz6KZezBOjTRatGfiicNwQahFEoIX3zz1GB0o65VSoEIS3gtWX0E+/l+J2v0otXYZX x9j1wzcYBOjhD6RunDqhcLEDkiYm3laoeJudW9Cfgqj18Q9CCe0y+J6jBuvslqUgfz8S nnh8+mU1o0EwOUgqj5xOiKDaAXx9jagMyPdu1Qt0VR4dL9yZOh5cgFFklbno3BKw/a8U I0hDCDTeA3VfL8yqkkGpZ7sRP2AUXI8wuk7to35fXzs3UgBmhdODSNo4LV5jYNwhzMRx /doApqBTct1R4IOxtUxEgeIKlEvK29o1fJ0wJTbdrH2XeechxgBOkV2KXQYbAY99V9Sc 6wuA== X-Gm-Message-State: APjAAAVcyVsUoeoO8mEBzD/0Z2qYxm4PvkTUjeQ3n/xhnikR8fZFjkUC M6R7bQ1xxb9mS/83fuoVp1nvSS09RvMtx/TjB4U= X-Google-Smtp-Source: APXvYqxOUOr/TBH5H/Et++6eJWrvXzscFQJINZxRtWaYCdbXL4E/D5dDGUqtPMP+MwKaU6AtU89yWbI44eh67jVJ2zk= X-Received: by 2002:aca:3a86:: with SMTP id h128mr8105952oia.131.1573202142533; Fri, 08 Nov 2019 00:35:42 -0800 (PST) MIME-Version: 1.0 References: <1572938135-31886-1-git-send-email-rppt@kernel.org> <1572938135-31886-6-git-send-email-rppt@kernel.org> In-Reply-To: <1572938135-31886-6-git-send-email-rppt@kernel.org> From: Geert Uytterhoeven Date: Fri, 8 Nov 2019 09:35:31 +0100 Message-ID: Subject: Re: [PATCH v4 05/13] m68k: mm: use pgtable-nopXd instead of 4level-fixup To: Mike Rapoport X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191108_003543_790328_8794FF5C X-CRM114-Status: GOOD ( 13.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "James E.J. Bottomley" , Linux MM , sparclinux , Rolf Eike Beer , Vincent Chen , Greg Ungerer , Anton Ivanov , Linux-Arch , linux-c6x-dev@linux-c6x.org, Richard Weinberger , Helge Deller , Russell King , Mike Rapoport , Mark Salter , Matt Turner , Vineet Gupta , Sam Creasey , Arnd Bergmann , Jeff Dike , linux-um@lists.infradead.org, linux-m68k , Greentime Hu , "Kirill A. Shutemov" , Linux ARM , Michal Simek , Parisc List , Linux Kernel Mailing List , "David S. Miller" , alpha , Andrew Morton , Linus Torvalds , Peter Rosin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mike, On Tue, Nov 5, 2019 at 8:16 AM Mike Rapoport wrote: > From: Mike Rapoport > > m68k has two or three levels of page tables and can use appropriate > pgtable-nopXd and folding of the upper layers. > > Replace usage of include/asm-generic/4level-fixup.h and explicit > definitions of __PAGETABLE_PxD_FOLDED in m68k with > include/asm-generic/pgtable-nopmd.h for two-level configurations and with > include/asm-generic/pgtable-nopud.h for three-lelve configurations and > adjust page table manipulation macros and functions accordingly. > > Signed-off-by: Mike Rapoport > Acked-by: Greg Ungerer Acked-by: Geert Uytterhoeven One forgotten error message update below. > --- a/arch/m68k/mm/kmap.c > +++ b/arch/m68k/mm/kmap.c > @@ -258,18 +265,23 @@ void __iounmap(void *addr, unsigned long size) > { > unsigned long virtaddr = (unsigned long)addr; > pgd_t *pgd_dir; > + p4d_t *p4d_dir; > + pud_t *pud_dir; > pmd_t *pmd_dir; > pte_t *pte_dir; > > while ((long)size > 0) { > pgd_dir = pgd_offset_k(virtaddr); > - if (pgd_bad(*pgd_dir)) { > - printk("iounmap: bad pgd(%08lx)\n", pgd_val(*pgd_dir)); > - pgd_clear(pgd_dir); > + p4d_dir = p4d_offset(pgd_dir, virtaddr); > + pud_dir = pud_offset(p4d_dir, virtaddr); > + if (pud_bad(*pud_dir)) { > + printk("iounmap: bad pgd(%08lx)\n", pud_val(*pud_dir)); bad pud > + pud_clear(pud_dir); > return; > } > - pmd_dir = pmd_offset(pgd_dir, virtaddr); > + pmd_dir = pmd_offset(pud_dir, virtaddr); > > +#if CONFIG_PGTABLE_LEVELS == 3 > if (CPU_IS_020_OR_030) { > int pmd_off = (virtaddr/PTRTREESIZE) & 15; > int pmd_type = pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK; 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel