Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3155877ybg; Thu, 24 Oct 2019 23:14:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7pZZvODYIfkQqctFUTembCUKQeyqMOR0S4v9IeV4bvYStnm3WievM3ojFC8cz62Y0U8U8 X-Received: by 2002:a05:6402:3c7:: with SMTP id t7mr2067775edw.232.1571984048044; Thu, 24 Oct 2019 23:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571984048; cv=none; d=google.com; s=arc-20160816; b=RvrwvKtDzGTLoMLjbj5EO6sAYLNHJIsf6k2oPhFDTFPggWjp6FDl43qG8aKV7RSBqW wZOtWr9BUh1I2ZK7ghO4G5ZhcEMpdH+NgJ5B9BQZrZxeYV6m0tUywsRJ7/FxbvZh/7/b R4yEM169HvxFFyZ8IpxaPMXMg9e2D7zuhAq7qFHvBihhqNo+8dXnRMTW4Wq8C1mmMMnH vSvUp+l1E3ARJpqUtDoSqn5VAxIYhdX1qsSnwHEXeKQDCcV6XAgt/XrcIbB7SZ84lr1X LsP8pLxEfUvAhlJgNkA+W2H/z2+Tr7CRQn+IOzyOtEAPlcwaVsMK9gyZAt4+krOT8RDI JRXA== 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:date:subject:cc:to:from; bh=JBRMrRB1vcyuC+wT7PC5Yf6gYKX6/OwBzMl8GKFEMiw=; b=FLnT+VRdUaV/pIC640Oq+h7rcxEhD8fLoLl1v7p+VSnY29GvNXSxhnCuzoiYiAOfEe V9ZCAPlvZLWf+Yhu8RjvYLuqAcXA00VNJEIROftzxoIC/xLSTJIiYo+u2qu8gQQQ0BgF OrgUM2XSeiX8V5xu9Lc8du86FZK4eBk/JS035fLWxlxldVxUBosIjFFsl0SV8cfZAHbO kPV1lFmtWEzHI1mJl8IBLLYNd3un8F0P5lCcOlh0Fp4iOvNtJvRKQZyvY2fjrZPv7t3P v2eRFYC9skvQ+Rqe6d59ipWc/cLk8YfZXIzOsiHLfSAdi2iOQPBwE/4yKBOxj7hIjxAp pE2Q== 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 v27si624626ejk.63.2019.10.24.23.13.41; Thu, 24 Oct 2019 23:14:08 -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 S2408983AbfJXJis (ORCPT + 99 others); Thu, 24 Oct 2019 05:38:48 -0400 Received: from foss.arm.com ([217.140.110.172]:44940 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404005AbfJXJis (ORCPT ); Thu, 24 Oct 2019 05:38:48 -0400 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 5EA10CA3; Thu, 24 Oct 2019 02:38:32 -0700 (PDT) Received: from e112269-lin.cambridge.arm.com (e112269-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C88A73F71F; Thu, 24 Oct 2019 02:38:29 -0700 (PDT) From: Steven Price To: linux-mm@kvack.org Cc: Steven Price , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dave Hansen , Ingo Molnar , James Morse , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , "Liang, Kan" , Andrew Morton Subject: [PATCH v13 22/22] arm64: mm: Display non-present entries in ptdump Date: Thu, 24 Oct 2019 10:37:16 +0100 Message-Id: <20191024093716.49420-23-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191024093716.49420-1-steven.price@arm.com> References: <20191024093716.49420-1-steven.price@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Previously the /sys/kernel/debug/kernel_page_tables file would only show lines for entries present in the page tables. However it is useful to also show non-present entries as this makes the size and level of the holes more visible. This aligns the behaviour with x86 which also shows holes. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index 9d9b740a86d2..3203dd8e6d0a 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c @@ -269,21 +269,22 @@ static void note_page(struct ptdump_state *pt_st, unsigned long addr, int level, if (st->current_prot) { note_prot_uxn(st, addr); note_prot_wx(st, addr); - pt_dump_seq_printf(st->seq, "0x%016lx-0x%016lx ", + } + + pt_dump_seq_printf(st->seq, "0x%016lx-0x%016lx ", st->start_address, addr); - delta = (addr - st->start_address) >> 10; - while (!(delta & 1023) && unit[1]) { - delta >>= 10; - unit++; - } - pt_dump_seq_printf(st->seq, "%9lu%c %s", delta, *unit, - pg_level[st->level].name); - if (pg_level[st->level].bits) - dump_prot(st, pg_level[st->level].bits, - pg_level[st->level].num); - pt_dump_seq_puts(st->seq, "\n"); + delta = (addr - st->start_address) >> 10; + while (!(delta & 1023) && unit[1]) { + delta >>= 10; + unit++; } + pt_dump_seq_printf(st->seq, "%9lu%c %s", delta, *unit, + pg_level[st->level].name); + if (st->current_prot && pg_level[st->level].bits) + dump_prot(st, pg_level[st->level].bits, + pg_level[st->level].num); + pt_dump_seq_puts(st->seq, "\n"); if (addr >= st->marker[1].start_address) { st->marker++; -- 2.20.1