From patchwork Wed Jun 29 00:57:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Chen X-Patchwork-Id: 9204163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA02560757 for ; Wed, 29 Jun 2016 00:58:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABC352862D for ; Wed, 29 Jun 2016 00:58:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FB1F28632; Wed, 29 Jun 2016 00:58:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E479F2862D for ; Wed, 29 Jun 2016 00:58:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752449AbcF2A6Z (ORCPT ); Tue, 28 Jun 2016 20:58:25 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:45526 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbcF2A6K convert rfc822-to-8bit (ORCPT ); Tue, 28 Jun 2016 20:58:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=S0HyKtsg1avzu13AMewLp9wS8Xw5vq516oP/XW47MKs=; b=BE5nvC9QWF92nfFMTTnEThW+2WkA0zKqPvRS5BEG6FeiWV0oZ4ub+ylUVX5BMs8BxIayLnncBxQhngiIJM1fT3Xi5HIlkki2vWOnwWDk71MApSYHIz+qMUnXprcCzFg/Q0v5OMv7ulJ38VmIn/DLF45tfYxHzkUfdHuOEN3rSUo= Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3lrp0075.outbound.protection.outlook.com [213.199.154.75]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-43-1XkILGjLPBKM1BeHsoHaMw-1; Wed, 29 Jun 2016 01:57:51 +0100 Received: from AM3PR08CA0058.eurprd08.prod.outlook.com (10.163.23.154) by DB5PR08MB0759.eurprd08.prod.outlook.com (10.164.42.145) with Microsoft SMTP Server (TLS) id 15.1.528.16; Wed, 29 Jun 2016 00:57:50 +0000 Received: from AM1FFO11FD019.protection.gbl (2a01:111:f400:7e00::189) by AM3PR08CA0058.outlook.office365.com (2a01:111:e400:8854::26) with Microsoft SMTP Server (TLS) id 15.1.528.16 via Frontend Transport; Wed, 29 Jun 2016 00:57:50 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD019.mail.protection.outlook.com (10.174.64.208) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Wed, 29 Jun 2016 00:57:49 +0000 Received: from dennis-ws.asiapac.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Wed, 29 Jun 2016 01:57:47 +0100 From: Dennis Chen To: CC: , Dennis Chen , Catalin Marinas , Steve Capper , "Ard Biesheuvel" , Will Deacon , Mark Rutland , "Rafael J . Wysocki" , Matt Fleming , , , Subject: [PATCH v5 1/3] mm: memblock enhence the memblock debugfs output Date: Wed, 29 Jun 2016 08:57:33 +0800 Message-ID: <1467161855-10010-1-git-send-email-dennis.chen@arm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(586003)(5003940100001)(8936002)(5003600100003)(305945005)(356003)(7696003)(50226002)(92566002)(189998001)(4326007)(47776003)(2906002)(77096005)(246002)(104016004)(26826002)(7846002)(50986999)(8676002)(6806005)(33646002)(19580395003)(110136002)(87936001)(2351001)(11100500001)(86362001)(575784001)(229853001)(50466002)(106466001)(19580405001)(36756003)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR08MB0759; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD019; 1:FFc551wYoyS+D+ZKZ/4vcO7myNrMPsljl1Ty0dVhB6USoSnYLAHoO+ya0Z19bWG7/aRAX3FnAktShU8nug0c4r4lCTOEbvL+/9x0O4XlCbZUOy33gKt60PI5ydGZ+VEWiZJFD6ZVFcR2weGwOHgsF2ufVTg1DGgWuugSzo1lc+WC9c3UqyUcmHqiTeLHLwzRxWPyxvfjqYK96V3vKUZ8Jpz5VqabxDsv/1xx9DcMd03otNwlxSzTwiIwzJxvRNLSj3R26lrlZ8rkiez9V9ZxHnPL/fKC80rQpD+AdUynW+xdkvwkjwjI5X8hZQEcb9sT5ktB6iBoF8OcBCrpfu1UqcsSOxGyB2nyD85kJCIIpzry6//TwwjQyUfkkJVidHnTw03MZWjGFj6GDJjnvygJ5e9IQhGROy3UML8xtjZdR38/D14o+gbBhtLnUNhtw/jIFDLYZVs8nJAupQyNrmvpec2NYeZ8jPU7rs7f6My/eao2U3/6ZT5jG0VrQQvW1DVROkaT/6ZRla+e3wcbrln/das2V5tDvtA7D6rtDsPNhjrMP1CS2cn35tYVxlZKdgs2usY660hzVvVGb7l+aMbwVyyj6LE37/DY4nJCD2yiDR3x9Jzyck2DAfcZKJWuL2MqjxL+yL9khioPrds6rHqGig== X-MS-Office365-Filtering-Correlation-Id: 4008b425-8f0d-4e0c-47c0-08d39fb864bb X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0759; 2:JidbiynNSnZpcNqKP3Lh+FZsGgtJDgqeoI6Xt5gkj1whZjC8ZNaQcVOvEJaznrPDqK7w5RgpCIZpQDPSKQ9yfwmWnbiZWKM349OOA8cfdD2bbUE3FvE8/qGnOYlgJPqSK/g/lauWeFjEaq+SN+5d4rTWCkl8oZeyGIsGywVh4+7GBHwG99KBbrEO05Mwf158; 3:ydYdJkDitfQ0yxufK8Ddvf4TnriQ5lFv8IC2/l95t064CP0SQQs7I4GsrNVEXPlovOsBc52nHunfdrHOVHwFrRuxMtnmE7dKIRABh/muzWL9NEtlYg1qp9pgQkcewlg763vLOMA7h8Lt2REaNRM3vV+s4grn4BZK13OQX29VzsiIVvf8q6AdXn2EPd518Mh8SchqJ/VKxJKQNIy7Vpb0VyX2jTcVt9i5nR3ZUxebKxFca6NSKERED11c/FcTZB529h+TP8m25xSm/XmeEpgy8A== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:DB5PR08MB0759; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0759; 25:O1VQn9rAaj9Zr6xkls674sBPhdEGRT9hEvSlzIZyvQ9Zr5l6HK2etwu43ZILjeo92KC7JWJDd/cVq5zQoJzjlmpdSCZtVAYPblJ7wrIm8DwgkeOKictOSOos8Rp4Do9gEhn12MVXyzDNCGfHqHZhRHrp4ZRuKVm7PDhZhnhfdmDL7QS/k9kf5G56d2bFk3Q5TBBTfThcH/mmskbqlClHvBR5w/94Zs/xrIpeOqlFpHCSNvEzcAXGWYQargMTDjhOU0ZaHBknwo+ZiLQi3i96bV7MXCB5uvVSVmFrFKQQ+xGRkZp4xF9qBKM+0B+OyYVe7qMC4rNThFXk3Eui9p3rc2ab1KY+9ZfjycbFr6w5Qd6bgFJBeabJ0PkXfiMumARXFyyTXqx3IXGEU5iR9sReOlG3DAfqdqgn99pqi43dZ527SCWBlwTFLkl19Vju88REcJECpSrlUT+FZARLcnTxgPwLxLNEqC9mVwjGeicrI+xTTNjDvJm+JeHcixf8NZLHkET8Daf8nIbTkZuIzxtyK/JRUUPE/E60cgUGkOZw8qPS9WNCL7rMmKrnJr6diJ7lyYqcxHWCRX9jUgwx4HHcZUOi+/YAqDMxzcZMSiM/wsARUOc2aJh7Sr5vahakL57851dPIELBLP7rka+s03WqNlM8CYpeRxwsuQPRbIU0MbDnQUcNyyTJMVftKaVp1m/ywZr8TFy5bymsKQBbLcsnYlby2wfMd8JA4Rw3Zv0jmpqdfMG1d8cVN+4PR1N8w1USe6dTTFas/u5zkOVoOgLBexnCaxT/DPKf0bpEiBiKXOk= X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0759; 31:2xPTNfpHvnY5hD8xc72KQiBAEq1k5Y1X0234OK18tRuWUgeocUI2GrMzKmflmla10jQKwL6UH3UOGhr/KGFuRpIMvQhaNhay4Oh7kiukCykVzGNJXj+sQ8mCC77aCimGZ9IzZVz+MrqbS3q0/aV275vKek8zQav6hh0ebGgdKk1f09wQwKr+JgVIJDHqB/B9+XMspXOuA0ryAS0yBGpP2g==; 20:EBHOy5rHFlJC3/Z5VzHeLnnDxAe4wonnuFgeT5lpmtkzcrijyMCrsFuYvg3ri96Q6nGdKVuzlm9FIQl+PGRZ69R3Qs+lDw50Frj8Ywr+j8KfzLHWmafD2ncuqWSAigY4BWeu6YvTJ5YJmTZOv03YlLCb9U8r1ATS0Joosg4nej60s5S8XDF44apJ5ovJhrh9eiSMoKCvxVuCe91npIGcqQGWy8hPnJBlyARoPYVKntL+DEjobj8w/elYSlpFqt0z NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(9452136761055)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13013025)(13020025)(13024025)(13023025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DB5PR08MB0759; BCL:0; PCL:0; RULEID:; SRVR:DB5PR08MB0759; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0759; 4:jE6wUvmX71+JBj0J6U+I2IJg2ZW0Hegllb0w4B+CcRVOmmxr9b2WgNv65XDvnJTwLmWQHYfQyZky9WV+3Y23G2eR/7vI1A4TxQmv9VGrZfz1mADBQ0Yf2O2cIRWvSv0yX6rVk2vr+ZbyMl8IoS0OsNtaUKPluw9f//XOSBhqBTXFKjsqNja6zxdKizf9wiMxeHLMNuYt8+pz939xxCxQcASXFuN9GlXA00UA7dToTL9yoJkKj/OUv6MluL9tGihgdk6gWSbpaaev+3TGkOGiPv/WCq5QRlS/eTbVe1cFI+4XwqD0XJJniqPqyCFUoN0wsbIwYQota+lz6fqO1SUj213lnbvvS1kamtlZglpzP/uCVp3hyY0RKumFQHPXujVAtxVMoo7VDN3lCqdMLYDbMWeglbUuQK6GO7NQMgpGYCOFDWmGSs8Gyjxc6WLS4lqcsZmtYys0HHniM0+ZpMLMLsvHXGTdcr5ei5La90EPTsBw8gVyt5bUa/ZBRvGZzsJmUPKkwXlX6prC7sM0SkPdZb/cn7ZcY2/zOUzBFiAxJgaF09+R0RDswkqib8PHEDvq X-Forefront-PRVS: 09888BC01D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR08MB0759; 23:Z4CkI3KGi93VD48QZsjnIk2V6YY4aECjkTDPlFMK1?= =?us-ascii?Q?kHVU0ja6C5uuB0VFMWckN89OFTYIUmrqOkyjSLmULX7Op6SVBwLt4oUzGnlJ?= =?us-ascii?Q?goNCyLQZTEstsioM9o93hm3Tr/vZZTqh6YFxHbRdMosyX/7Vkkz2t8A8PVsY?= =?us-ascii?Q?Q8tVEUpFFa82zuWiW0piXwVUkbfIW5dYpZtN0mmVJclaHiC6nWMpNLVmdnC1?= =?us-ascii?Q?1GqV8KcZ9b8fufUllftXqit+1TLWK1OtN/WpIs/WHobKskftmw9GGbExzoHr?= =?us-ascii?Q?FNazh2SXX9hwtiHI2A2xw1zk+Uq73dTNViNAq/2/0OX9ZcIYtqpMwegEkWiC?= =?us-ascii?Q?GZkvX6/0pkXA5w52ms5qe1jJAMQbSCMItJWI4nVHZ9OhwS7K5RqZahdeWJDa?= =?us-ascii?Q?kLs80WsvR8uYqQjLnz1/VvVHmPQfywBM4WkSqGzOt6dT2W4/di95FSx936s8?= =?us-ascii?Q?0hu48Ho2+eOifqXQzW7oxjNY3R2uY4E3/48KJsFI6aepllM21czD5eJvYN2X?= =?us-ascii?Q?cMtUCT/PqQKEWWjD5jvCPtOqh+iyiFy/QT+ny6jqyXWqoWt3B90S0ox09NGs?= =?us-ascii?Q?ivswolQtFGXO+3UPxDcXahSfM+0cHin/yd8MzL2DHuKGfEmm8fGHD/UsuExv?= =?us-ascii?Q?8Vd83NNiOFGdchk8cxr0bCAsYopqXzy/vahCS40tNx3jd/Oes/DuIWQF0Sik?= =?us-ascii?Q?OgsvcwvhBNn4mPUtygcnXn88wUshFPtQHMbKRzyBYiRHEilw9CNE6FJSb9/l?= =?us-ascii?Q?npOCEP4QGDNDgBY4tYrIDEC1LP8gFcSi7uOPf1o1CMJ3i390ofeNTibRKv3J?= =?us-ascii?Q?nR7az9I3dFYmLoAmJYLuwgoM7RhlXccBpEnGXY/Cp3YaBh3dE5wQHxeN2Mup?= =?us-ascii?Q?81qczCXzSw0iTTkPS+hwFUH74aDD3Hneb4/2iLTxNjCIfsF/zRFOOTP603iu?= =?us-ascii?Q?gp+m2myB9ddNaOPtTxercXYUIStvD+ukcqB/NtqHkhGK6wgdsN66vdWpKF0J?= =?us-ascii?Q?VaRPeqJClR06KDymzjpfJjg5HaQA9pZ8yrUw1P+IogZ/A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0759; 6:mbEIhDRgxRwbizLST52OmW/Ng2exICEcbT1aViL2dxfvRV7k6D6es+MVEVn+oc3eDDJ6Gpin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Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2016 00:57:49.9825 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0759 X-MC-Unique: 1XkILGjLPBKM1BeHsoHaMw-1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Current memblock debugfs output doesn't make the debug convenient enough, for example, lack of the 'flag' of the corresponding memblock region result in it's difficult to known whether the region has been mapped to the kernel linear map zone or not. This patch is trying to ease the dubug effort by adding 'size' and 'flag' output. The '/sys/kernel/debug/memblock/memory' output looks like before: 0: 0x0000008000000000..0x0000008001e7ffff 1: 0x0000008001e80000..0x00000083ff184fff 2: 0x00000083ff185000..0x00000083ff1c2fff 3: 0x00000083ff1c3000..0x00000083ff222fff 4: 0x00000083ff223000..0x00000083ffe42fff 5: 0x00000083ffe43000..0x00000083ffffffff After applied: 0: 0x0000008000000000..0x0000008001e7ffff 0x0000000001e80000 0x4 1: 0x0000008001e80000..0x00000083ff184fff 0x00000003fd305000 0x0 2: 0x00000083ff185000..0x00000083ff1c2fff 0x000000000003e000 0x4 3: 0x00000083ff1c3000..0x00000083ff222fff 0x0000000000060000 0x0 4: 0x00000083ff223000..0x00000083ffe42fff 0x0000000000c20000 0x4 5: 0x00000083ffe43000..0x00000083ffffffff 0x00000000001bd000 0x0 Signed-off-by: Dennis Chen Cc: Catalin Marinas Cc: Steve Capper Cc: Ard Biesheuvel Cc: Will Deacon Cc: Mark Rutland Cc: Rafael J. Wysocki Cc: Matt Fleming Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: linux-efi@vger.kernel.org --- mm/memblock.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index ca09915..0fc0fa1 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1677,13 +1677,15 @@ static int memblock_debug_show(struct seq_file *m, void *private) reg = &type->regions[i]; seq_printf(m, "%4d: ", i); if (sizeof(phys_addr_t) == 4) - seq_printf(m, "0x%08lx..0x%08lx\n", + seq_printf(m, "0x%08lx..0x%08lx 0x%08lx 0x%lx\n", (unsigned long)reg->base, - (unsigned long)(reg->base + reg->size - 1)); + (unsigned long)(reg->base + reg->size - 1), + (unsigned long)reg->size, reg->flags); else - seq_printf(m, "0x%016llx..0x%016llx\n", + seq_printf(m, "0x%016llx..0x%016llx 0x%016llx 0x%lx\n", (unsigned long long)reg->base, - (unsigned long long)(reg->base + reg->size - 1)); + (unsigned long long)(reg->base + reg->size - 1), + (unsigned long long)reg->size, reg->flags); } return 0;