From patchwork Mon Jun 24 22:14:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxwell Bland X-Patchwork-Id: 13710195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B51EC2BD09 for ; Mon, 24 Jun 2024 22:14:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A57B26B0378; Mon, 24 Jun 2024 18:14:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A07806B0379; Mon, 24 Jun 2024 18:14:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8CFF56B037B; Mon, 24 Jun 2024 18:14:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6C3F96B0378 for ; Mon, 24 Jun 2024 18:14:28 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 251D9810F9 for ; Mon, 24 Jun 2024 22:14:28 +0000 (UTC) X-FDA: 82267187016.30.A0F67DB Received: from mx0b-00823401.pphosted.com (mx0b-00823401.pphosted.com [148.163.152.46]) by imf15.hostedemail.com (Postfix) with ESMTP id 3E79CA001B for ; Mon, 24 Jun 2024 22:14:26 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b=qLG2XGve; dmarc=pass (policy=none) header.from=motorola.com; spf=pass (imf15.hostedemail.com: domain of mbland@motorola.com designates 148.163.152.46 as permitted sender) smtp.mailfrom=mbland@motorola.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719267255; a=rsa-sha256; cv=none; b=XFf/jNi5qNBmxXKMGRlBvczHYbbuEoJhsEDr4mTWdMVWwi0GGzwk2UTodT+S7LNlQstmc9 5Mofe/cG5HPqk6MkW/zOqsmSGDu0WKYAX7Sb+oQxfnzfAwBxAhVdLUBf932LxFRyP6Suns vF88OqF/ytCrvwk1Bb0as5wVJOFtTYE= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b=qLG2XGve; dmarc=pass (policy=none) header.from=motorola.com; spf=pass (imf15.hostedemail.com: domain of mbland@motorola.com designates 148.163.152.46 as permitted sender) smtp.mailfrom=mbland@motorola.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719267255; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UiwKK45/t5jj3tMLvalGcwhelM3iqP5MoGXJmfeqrwA=; b=eCVPHlRtPc9/ztIEbAnmWyVq6W8LM/x1kcfDVdvlHIkU0Iup32wmN+GFizbo8L7v0+9DtG sJArqcSeQgZ74nqO7ck051oB5w4f8ub1nRNL9YIKAxdyiP0FHsjlk4R+2jt70bMmLdUWu1 Osu70u/fIgDF0H1kVz9ZCRriSc7uD5I= Received: from pps.filterd (m0355089.ppops.net [127.0.0.1]) by mx0b-00823401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45OECFp0020826; Mon, 24 Jun 2024 22:14:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=motorola.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=DKIM202306; bh=UiwKK45/t5jj3tMLvalGcwh elM3iqP5MoGXJmfeqrwA=; b=qLG2XGve7gX0Q3i8oHiLN/RdaUHDml4sGRQ9Pd+ uuEz12ZcyubhrXAe5Yy3dBsKslQCBLoAXxVlqe+HDHGZLhjUlbxsx2MkLdKmFU0+ iTsh91+URFRoH/t0zR+u+9uA0UCgoQp3WXWBpXIOTb60NZ/7a5wH0XkucSrG0bFY 1ceIaFh7WW3+/oxqqIO8gZ2wtHNMW+1/fxkov+npU2wTIgo8HYLa4ERxIXrHZAXC fNzp8AyK7wxFdkKEaDOcsGTmQhQJzu8JcuMbg6rIDDTLB9eDc2V+jwKiu+pawPkU ccint8utNf0RVlNLeQ5ZTOjQfSWzsRStuKUzwB3843wG8Hw== Received: from va32lpfpp03.lenovo.com ([104.232.228.23]) by mx0b-00823401.pphosted.com (PPS) with ESMTPS id 3yxb5m309d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2024 22:14:19 +0000 (GMT) Received: from va32lmmrp02.lenovo.com (va32lmmrp02.mot.com [10.62.176.191]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by va32lpfpp03.lenovo.com (Postfix) with ESMTPS id 4W7Mgv1ymdz4ygtQ; Mon, 24 Jun 2024 22:14:19 +0000 (UTC) Received: from ilclasset02 (ilclasset02.mot.com [100.64.49.13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: mbland) by va32lmmrp02.lenovo.com (Postfix) with ESMTPSA id 4W7Mgv070Zz2VbbV; Mon, 24 Jun 2024 22:14:19 +0000 (UTC) Date: Mon, 24 Jun 2024 17:14:17 -0500 From: Maxwell Bland To: linux-mm@kvack.org Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Ard Biesheuvel , Mark Rutland , Christophe Leroy , Maxwell Bland , Alexandre Ghiti , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 4/6] arm64: indent ptdump by level, aligning attributes Message-ID: References: <2bcb3htsjhepxdybpw2bwot2jnuezl3p5mnj5rhjwgitlsufe7@xzhkyntridw3> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2bcb3htsjhepxdybpw2bwot2jnuezl3p5mnj5rhjwgitlsufe7@xzhkyntridw3> X-Proofpoint-GUID: 6hlKYHvbG4vu8qcSLMuNk0BF1XTe_Bhy X-Proofpoint-ORIG-GUID: 6hlKYHvbG4vu8qcSLMuNk0BF1XTe_Bhy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-24_19,2024-06-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 phishscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 adultscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2406240177 X-Rspamd-Queue-Id: 3E79CA001B X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4edsm9cmn8tb8k7iyw5rq3a55e135xo7 X-HE-Tag: 1719267266-964362 X-HE-Meta: U2FsdGVkX1/5+voz6WMAc3l2NB8ngPvPP3R5IjR3E32akUt6/iPB3soKlZ3sBDPuU1atqfd0lCH5XH1mLKvakJMOb+ypGCdDDjhfmq7XEQBXdgfcOp0Yf6TW//TvrkXCSWg/fnryDOplcAj6gF0Q0hv4MtEGDx9Ha7IArGMmz2dAAQStbE2sItNdik86IRX2E9VudR6te8R8pST2Omy7sem2EaY/dyQw6PFcJwU/6w/SZzqOTr2nYlf8LSbNVrA37wgsRKiSoDhDBOtM3ofhfNdFWgtRYqKzOcOHVy4a7ZN+lGjU3l2oUtSN81hEk+BkXRByEm4QAHIf4mAZvaSr1L/N/vmrYskJt5wB1n3AADoF/3juHdXI+e31SkUX8w83LnctzW7AhrnaZPKtC9rVR4dg5kjvaxNsSESUt49AjWtRcy5LQOO8Yx/lCvDsDCC1p3u6SwXR8mtOUqrS5UZ5nEiVif6b1StGvMHi8eYn82zEz6wbt3j3/wErUUGAX6CF3QA8w/OGM/JzHY9OH7Z4CHmpPuAYexSoRA9Yb4RTnQFPBpOzIVYnpSsjo5h1sdC7C0CT2rDRfNxp2DVaHyCbE9jV1ZIjSAJG2iIwaI32hXx63j8pLUdDlIyxkl7jqXCV4Jocox+EWf7OXzcNna1ZdQKsf8zrse2igvqulmgiVYEBO0aeOBv2JK8uzoeEjjO67a1SdfducLr9ugKkqqH3eKPBKXB+BcAZnAbcuBBEwwgXhMaAGhxwHt2zDDF8sRbB2RlaODxq8zmby0tPHMHGgUlv5JebFuB0tQElQvFXiQH4CQkfXAIaIdKALmczS63KV/SDQaM7JXXATRLu1vy+xr6IFEeijK4VeWxfw6ljhkWeWLo5d6xSxT/8FY/yNyypg/gSsbxDSxgAlW10qTSr6E3lb4RhhQzum25P7+YWmeTWde6i32crVjW0pf9gxXhpiTamy+jMYU6v/BdAV3O jTBiTnvm QTCxxs1bijvpSYSCMWGEgfXOJCib61/d9prqwsrvXPq9QSMf62HiQ4z0jXyKDxdFwEMmJgZw9wAd4Xpy6eVA3UDiF0W3XIpWAsnkJU3P73PYke/K2UfJB4nf7sbW1v2djFdUjwJdYIVZyGgHyOqVl5woQhH/k3ERgngKnc3hnwvEYLSb/m3dnqg9kZ1wFGMLsi/bFaYR8fWfuZCTW3WKUaTPTjmh2nue6K0tWOoFkWPtQTO36cItOyWPM9U7k0dqyaT4MFFghBOB6FTMR5RhfaQgC68u1ed07eskz+RitRw3tvYW2UrGVE2DqejpNpkQvdPr7Z/he6pcJDaw= 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: List-Subscribe: List-Unsubscribe: Outputs each level of the page table with two additional spaces for parsers, distinction, and readability while maintaining the alignment of region size and attributes. Signed-off-by: Maxwell Bland --- arch/arm64/mm/ptdump.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c index 33ca6d182a6a..0660b74413a2 100644 --- a/arch/arm64/mm/ptdump.c +++ b/arch/arm64/mm/ptdump.c @@ -303,6 +303,10 @@ static void note_page(struct ptdump_state *pt_st, unsigned long addr, int level, addr >= st->marker[1].start_address) { const char *unit = units; unsigned long delta; + unsigned int i; + + for (i = 0; i < st->level; i++) + pt_dump_seq_printf(st->seq, " "); if (st->current_prot) { note_prot_uxn(st, addr); @@ -323,6 +327,10 @@ static void note_page(struct ptdump_state *pt_st, unsigned long addr, int level, st->start_address, addr); } + /* Align region information regardlesss of level */ + for (i = st->level; i < 4; i++) + pt_dump_seq_printf(st->seq, " "); + delta >>= 10; while (!(delta & 1023) && unit[1]) { delta >>= 10;