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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 64DB6CA9ECF for ; Thu, 31 Oct 2019 14:36:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 24EB020873 for ; Thu, 31 Oct 2019 14:36:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24EB020873 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CC0CC6B0270; Thu, 31 Oct 2019 10:36:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C70CE6B0271; Thu, 31 Oct 2019 10:36:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B87E96B0272; Thu, 31 Oct 2019 10:36:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id 980AB6B0270 for ; Thu, 31 Oct 2019 10:36:07 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 60B8E611F for ; Thu, 31 Oct 2019 14:36:07 +0000 (UTC) X-FDA: 76104329574.18.dime89_527d01ec46246 X-HE-Tag: dime89_527d01ec46246 X-Filterd-Recvd-Size: 2643 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Thu, 31 Oct 2019 14:36:06 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C0C111F1; Thu, 31 Oct 2019 07:36:05 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.197.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6ADB53F71E; Thu, 31 Oct 2019 07:36:03 -0700 (PDT) Date: Thu, 31 Oct 2019 14:36:01 +0000 From: Catalin Marinas To: Steven Price Cc: Andy Lutomirski , Borislav Petkov , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mark Rutland , Arnd Bergmann , Ard Biesheuvel , =?iso-8859-1?B?Suly9G1l?= Glisse , "H . Peter Anvin" , James Morse , Andrew Morton Subject: Re: [PATCH] mm: ptdump: Reduce level numbers by 1 in note_page() Message-ID: <20191031143600.GD39590@arrakis.emea.arm.com> References: <40956d62-241c-6685-72f1-bfc01183141e@arm.com> <20191031133322.3239-1-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031133322.3239-1-steven.price@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Oct 31, 2019 at 01:33:22PM +0000, Steven Price wrote: > Rather than having to increment the 'depth' number by 1 in > ptdump_hole(), let's change the meaning of 'level' in note_page() since > that makes the code simplier. > > Note that for x86, the level numbers were previously increased by 1 in > commit 45dcd2091363 ("x86/mm/dump_pagetables: Fix printout of p4d level") > and the comment "Bit 7 has a different meaning" was not updated, so this > change also makes the code match the comment again. > > Signed-off-by: Steven Price > --- > arch/arm64/mm/dump.c | 6 +++--- > arch/x86/mm/dump_pagetables.c | 19 ++++++++++--------- > include/linux/ptdump.h | 1 + > mm/ptdump.c | 16 ++++++++-------- For the arm64 part: Reviewed-by: Catalin Marinas