Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp732660ybg; Wed, 3 Jun 2020 12:07:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXw10besjh31QYDzeQOvYZZNk8eixSYZYhPMeKe1P+gHNypYT0ixl3PN/dKMHpZO5iVn0Z X-Received: by 2002:a05:6402:b8a:: with SMTP id cf10mr924077edb.138.1591211276204; Wed, 03 Jun 2020 12:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591211276; cv=none; d=google.com; s=arc-20160816; b=aN6jpby4zr0gtFmEYNzK7ca0srrR6joqBkHP29fSGUiOEWrAZ59VY9KjBWSEW0s5U8 TgtxuVgmJ6AgXrVlRSgzGjIFNLalFsM52m4avpMa5Poda1LGZHQfozd8rBReRGjQ8CwF VvWQL3IF10H2+3IOBqhpcmOXZWz9nbaO/1lu0TMifVt1L8EcebfxfTzwJaActdCuLH43 qckGacYfjW8hbRJlowmV3FlI0ju+6fJ0KraQPTjmmw4cpCp93jZe7ARk3ep8BBYVJYCE 53u+S+Ra/MxevIR2ZgTovQndYCdpzcvGWfdRrX48paUYd04eZD3VQGSRZagmumTrMWBk 5XWA== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=CX5wCk3D8u34QYtL0IzQm8DigwIfXlSBBicAm1p8MXI=; b=lmKQorrZgyF5iWD7FDQI+iMV4cTNJsYQ+MMYsJY3lpFgG4oA3N0jPq8L3fHogWZzAh OPHaXzq+QFtlgpW/X275paQOtQxYrh4v660LeMrg0mnAcKJoh4KKLRTQG6MqlUFHwmvF SY4igoDm+6Yc+lvxep1ds6ex7jkYA/EsVZpZR5//MpVy7anvFjyojR9FfhT/S8C8cLNH cB1TEYIRFfkZgSx9gDfgTKvL7ootpJRO22kz4dP5JZqWukFm4QKYSa7bqrldOXd9eGYY Wo2c9UZnK6eLKeUJJbNmQEv7/+/g1DYvpLdqFBuRgxM8soICLF+7FSI4L4VpZmD3iBtq yQew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r0JH+r6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si276414edr.214.2020.06.03.12.07.32; Wed, 03 Jun 2020 12:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r0JH+r6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725985AbgFCTF0 (ORCPT + 99 others); Wed, 3 Jun 2020 15:05:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:35062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgFCTFZ (ORCPT ); Wed, 3 Jun 2020 15:05:25 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 E2BA820663; Wed, 3 Jun 2020 19:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591211124; bh=Q/m5m0oN16XVkE9B8qyre3sjNLjlsvtMr3faOM5/GEY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r0JH+r6+eneNzPkKh10OQRnG/QlntwU5Ile5RdgUbb4S95xZcMJwqqczR44dEoW5/ dXJbJhSARnLrJiGeqA21ANe/57CLpUdIlqiMBG6WT4nQbXPfCWGsOTxjBMHqOIWaG6 YrNwC3X4+y9pXx6gFBNVV3K2D741HNKSuj4FGwes= Date: Wed, 3 Jun 2020 12:05:22 -0700 From: Andrew Morton To: Mike Rapoport Cc: Arnd Bergmann , Benjamin Herrenschmidt , Brian Cain , Catalin Marinas , Christophe Leroy , Fenghua Yu , Geert Uytterhoeven , Guan Xuetao , James Morse , Jonas Bonn , Julien Thierry , Ley Foon Tan , Marc Zyngier , Michael Ellerman , Paul Mackerras , Rich Felker , Russell King , Stafford Horne , Stefan Kristiansson , Suzuki K Poulose , Tony Luck , Will Deacon , Yoshinori Sato , kvmarm@lists.cs.columbia.edu, kvm-ppc@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, uclinux-h8-devel@lists.sourceforge.jp, Mike Rapoport Subject: Re: [PATCH v4 08/14] powerpc: add support for folded p4d page tables Message-Id: <20200603120522.7646d56a23088416a7d3fc1a@linux-foundation.org> In-Reply-To: <20200414153455.21744-9-rppt@kernel.org> References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-9-rppt@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Apr 2020 18:34:49 +0300 Mike Rapoport wrote: > Implement primitives necessary for the 4th level folding, add walks of p4d > level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. A bunch of new material just landed in linux-next/powerpc. The timing is awkward! I trust this will be going into mainline during this merge window? If not, please drop it and repull after -rc1. arch/powerpc/mm/ptdump/ptdump.c:walk_pagetables() was a problem. Here's what I ended up with - please check. static void walk_pagetables(struct pg_state *st) { unsigned int i; unsigned long addr = st->start_address & PGDIR_MASK; pgd_t *pgd = pgd_offset_k(addr); /* * Traverse the linux pagetable structure and dump pages that are in * the hash pagetable. */ for (i = pgd_index(addr); i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) { p4d_t *p4d = p4d_offset(pgd, 0); if (pgd_none(*pgd) || pgd_is_leaf(*pgd)) note_page(st, addr, 1, p4d_val(*p4d), PGDIR_SIZE); else if (is_hugepd(__hugepd(p4d_val(*p4d)))) walk_hugepd(st, (hugepd_t *)pgd, addr, PGDIR_SHIFT, 1); else /* pgd exists */ walk_pud(st, p4d, addr); } } Mike's series "mm: consolidate definitions of page table accessors" took quite a lot of damage as well. Patches which needed rework as a result of this were: powerpc-add-support-for-folded-p4d-page-tables-fix.patch mm-introduce-include-linux-pgtableh.patch mm-reorder-includes-after-introduction-of-linux-pgtableh.patch mm-pgtable-add-shortcuts-for-accessing-kernel-pmd-and-pte.patch mm-pgtable-add-shortcuts-for-accessing-kernel-pmd-and-pte-fix-2.patch mm-consolidate-pte_index-and-pte_offset_-definitions.patch mm-consolidate-pmd_index-and-pmd_offset-definitions.patch mm-consolidate-pud_index-and-pud_offset-definitions.patch mm-consolidate-pgd_index-and-pgd_offset_k-definitions.patch