From patchwork Fri May 27 09:27:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Chen X-Patchwork-Id: 9137965 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 E27F56075C for ; Fri, 27 May 2016 09:31:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D224D28137 for ; Fri, 27 May 2016 09:31:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6FFA281AA; Fri, 27 May 2016 09:31:12 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 06B8628137 for ; Fri, 27 May 2016 09:31:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b6E53-0001bx-Ja; Fri, 27 May 2016 09:29:21 +0000 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b6E4y-0001WD-QA for linux-arm-kernel@lists.infradead.org; Fri, 27 May 2016 09:29:18 +0000 Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1lrp0013.outbound.protection.outlook.com [213.199.154.13]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-51-wYkq7bqxT_CVHYFAQBRpTA-1; Fri, 27 May 2016 10:28:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vdj/i28Y0E0LXAuOofOub7vWnhwZ3Ns9DV9RIE3E1dg=; b=C+5rsBRUeTnQjgLB2Bvgb0MtJP5MyGhIGC0cWHdw9N2yMmy+wAVDefW0yvnBPwb02KDEIu6z2XEJ95L+ecI3FzvjL1sJ4JL+sDadU4mhXQYNrCiAlpO923c645JEbrljrvt0BsBG1vuLhyrznOQ5OrZfKstVN2ri84NnVls2Fxk= Received: from VI1PR08CA0012.eurprd08.prod.outlook.com (10.164.95.22) by VI1PR08MB0910.eurprd08.prod.outlook.com (10.166.143.26) with Microsoft SMTP Server (TLS) id 15.1.506.9; Fri, 27 May 2016 09:28:49 +0000 Received: from AM1FFO11FD031.protection.gbl (2a01:111:f400:7e00::100) by VI1PR08CA0012.outlook.office365.com (2a01:111:e400:597a::22) with Microsoft SMTP Server (TLS) id 15.1.506.9 via Frontend Transport; Fri, 27 May 2016 09:28:49 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD031.mail.protection.outlook.com (10.174.64.220) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Fri, 27 May 2016 09:28:48 +0000 Received: from dennis-ws.asiapac.arm.com (10.1.2.79) by mail.arm.com (10.1.106.66) with Microsoft SMTP Server id 14.3.279.2; Fri, 27 May 2016 10:28:01 +0100 From: Dennis Chen To: Subject: [PATCH v2] arm64:efi fix the format of debug message from efi Date: Fri, 27 May 2016 17:27:24 +0800 Message-ID: <1464341244-14152-1-git-send-email-dennis.chen@arm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(87936001)(104016004)(11100500001)(6806005)(229853001)(1220700001)(50466002)(36756003)(8676002)(8936002)(48376002)(2351001)(33646002)(15650500001)(86362001)(586003)(2420400007)(5003600100002)(47776003)(5008740100001)(110136002)(19580395003)(50986999)(92566002)(189998001)(10710500007)(4326007)(2906002)(106466001)(19580405001)(50226002)(77096005)(15975445007)(5003940100001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB0910; H:nebula.arm.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD031; 1:UKpRQwG709zVLjvJAPf8Lv10Q9fYpbnD9fs7yT/fnD/93RSUDk+tsAjV1SB+RtaRT3ts3B/qvnJvT9y6G9dGHmszNhYYvSay4kbJrGUWy1CFKXQ51DmCWK2yn576Lp/0MEKQTNFUufHXnEpEfIPYQt6ZrBvBA8uxr8+ktUMvOXIaM98hofD39j1tygISRb74KtTfJwNuXcvci6YHdPHlqFgMTLn0sqHwO5a4jAFLM/9Fb6Q8cvmNyYiWRy9Ku+LKbiyeg0n/n7+5H6+q4PdwCymvycS9y1FoUsUWApoQZKbudsD034N1UYY6L9QazCeVcjrJFONIhKCilV3Ed0ZhiEXS2ngn75RKYmIcq25oaWvfh2yuwt581UKAjeGuGxZcco13O90gJHEfk0VW5e7mtDACXn1daUofXvl9rUJUBwszkUdBkvD9DA/YbuFmyqp1R3nosPxJ/+LbEtcVZ2g1YbrfWnorQwe9MElyPs9nDvjiNnmnurakPB7LKauAFia3GzJ+lmAiAVKDi5v+Ov2R0JEYNEeSzEvis7ZLl9j85Jo= X-MS-Office365-Filtering-Correlation-Id: 6e3e6af8-95f9-421d-9394-08d386114f27 X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0910; 2:ohaW2UG05FfLUCAASFZcsgSQFhXvKY3yKNP63E7I2onyxlBtM5S7gqUAr0FnqaVsUk8OrVU6VJWQE7HoOncN5rlGT75UbtQWDDX9X6vFA3trzJoJu6m6LoLyw+Jde1hYwMyItAEHO+uK0cO+HHbLFHovMrC521oFCqGnCH1eGLdVhlSL5wPYM8U3OsDbjTzg; 3:BYW6SJwYDof7gLjzeJ+BRNgtUt65y/+G518RctuyL02Rrq21d7XSe9RNzNCGBXhaR7Sa0IJqCHAIUhVtPhYEAhpI5Y2lBQnuybDSsJH4p1uKf8acXgOP6M+AyBgkv2FRhNw1lL10oriPM7q0pEHeHua+zp4AqnLCd7l/5OLnQIyh4TPITTZXhHjD4nBGnXapxlUQOEoFaMN3Tp23zFt2q7AnzMJkMffK/JzG2rHxo7tjreoXOJzUvOFdjwGj88P0ysaW5q+PHi9FSAF8AHkJsw==; 25:4QmZstTYDOHYMaWAITV0R9OJvITUJ9TMfsaVG5kbpJ1quKOJYlIZdiQFlIpHfx30IstqmizhHFv0RrDuVSTJeIeNV5D9criewQwC+0eEuv03FhxTYYT5TJIVVffkIUfHljbdLv2pMvJXQ7YQH29+cS5WyualsefukbLG4O4IWI5hXZZUfTG9JXTeEpzjSCIhVxaccUEZa91BcUKjUWsFlvONchhndBdmMJCSvqP7kNT6XF8Go6tPtaE456AjAnROR4KVtEqSVj9XojzRso5sWeX47kOc2TVceqQVV+7zO4Rk1leqP55RKtj7eZfTAJKNdyUwAOijpdCtWmyzify6pfdUzcsu2WrK7qkxLOcrBipLy8uDSKfHt8+Z7X3DrvkrmlaAeWCYOnSy1Mucs0kQERBNUV6yhsmvlO97z2Q1RrY= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:VI1PR08MB0910; NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0910; 20:hkbUC4TC3BhpEDj7KsiNpYkbaU7W1mc2OA5v5gkTdLGuTJEJ9NPpgcSBOc8qckh1sbJNSTOA+II9jOKNkk1aHospr8ZqSwyuyWErO/IwEsbLOhAD219LZtP1xEqEXkDieevK9w+DLqWZX8PxWwA3+J+PVqXyKYtVvLgb631S6RGk8N3Np55EG9aBP8HAjoPGPRAu447zCqHP1z9yHMHPEFhESSG6eUJPptM4fbY71bADXaWtS4E++wzPRW/CYxbg; 4:3uG8nlnj+PxBS1v0iP5Os1U9BrwEjjaXPYFjsPk17K8lHXXnQnxzyNjwY9sTvMyD7/SRhVCEBLxsPFD4bibbBvLEG2IdGu1hRNdEJAuWOqxGcIL4Q0UWTtVqtiL0R+zywd0uwZ0Upun+rR78ZwnnWAcX9Cg+wLodLuj5uAp+satduyMBgTHNQUMZSADoOzTqJHIIu3Mhu4UxcjuHWFKCgqiV0R6PKGC1U4ieXkB5onVvuG9VGQdmqg1y0Mx66qULqialXdpmYEKPiYFNvrum5RzOfH0RSUYJnD7KfDqI4KMRxZwe6XGs7sT+prOneegr4gUaxLK06zWX/12Nd3iLBYEOVzqUuM9GIouEThGli3ZQy1aD5I2/XMtfB/GmD/wJ4RcXWOarRb8FfviiZVhVhrnxqEuK30uiu3kAituS0g6yiicnzJEQJ2WZs6Ou8E7o/x/SeKokIo8vdrAN7qvjzaaurUB7sEBznJIIbDOUEvFBWCznTqpqgBuzm264sgg1PS+/NV7hL89YhuyDlrTdhOUVGDwpt1nyiontXPvL9+5uvzapAxMdrioR6Vi4wpkm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(9452136761055)(258649278758335); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13020025)(13024025)(13013025)(5005006)(13023025)(8121501046)(3002001)(10201501046)(6055026); SRVR:VI1PR08MB0910; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB0910; X-Forefront-PRVS: 09555FB1AD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB0910; 23:AdV2ENCFc7YLPoqbKrrfQuDazZy9d3EomFEjyym74?= =?us-ascii?Q?iB7LOd1RFTvmj4H2n9N0U+7Apb531WYN16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-ascii?Q?/CEqXfKg2vJq8iHmgVHDdm3IWKxIRFPYpaSOxj5DTc47TBeFFiM00hHot1U1?= =?us-ascii?Q?+/0Pxds3YwQCXpSaE2s4gAhJADUlsbYT5Np7tPauPVYrL/Ggf6QyXmJyiot6?= =?us-ascii?Q?S2Sp4I=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0910; 5:Rjzr7HSDBe8odf8F+7HVwxmnNMipyP6IHJXFCc5HqM7Elc2pLQoOMPHEsQN5nYq0abCKvAsmVWk+ie2yfhrzNe9hfosx0XwD87CpKApDquiAPW3sRXppowV0YAP2QbmV5Gp8gLxyBAcyYNFJ9ZkKPw==; 24:IgvIKtRuJJIdUKr+FNa9aWBy4v0/r3+CzH4mnMfi360/q6MM1uiOomQdcU8Or3QMSAVgWDsHVwqjeMM8SL7VXk3Kw8STD9StNFrCd3c8czk=; 7:tN3S9csWMR+ZVIM5NAX8omUObr3LTzyF0rFsVYCwE5GZkS9Nv9c9agVGKvG9ToX3DVRZ+bqhwZGl4kjmu/k5ERaOn7qU8KVhWN9WDWpJLJA1E2xGqxkvJdUVMIaB+MtLykSSVd9a3hFF+rrbrYcD/UXm6l9rTdtphulmpZnSTEzforuh58VKpOrMUnyIc8B0; 20:bUW+0oN0umZPYxg7elKs3x8tEer7gudzM8TEp/79NKeNtMYySdtGjifH8HMb7DuJJ9DOriEPEFQUjfq3vuQ5O15yjKkanZL1foxlTg6M57ZAPEA5h7LEjdXiUgdl6ysbKxhNlb9Io1xBUrC0P7Ettp1RBUBYujaCEgHr6xNDAQk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2016 09:28:48.7435 (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: VI1PR08MB0910 X-MC-Unique: wYkq7bqxT_CVHYFAQBRpTA-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160527_022917_352956_E2FB20E2 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-efi@vger.kernel.org, ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk, catalin.marinas@arm.com, steve.capper@arm.com, will.deacon@arm.com, Dennis Chen , nd@arm.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When enable debug of efi and memblock with 'efi=debug memblock=debug' appended to the kernel command line, the debug message output for earyly_con looks like: [ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC] [ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c [ 0.000000] * ... This patch is trying to fix the above output messed up by memblock_add(), so we can get below debug mesg looks more formally after applied: [ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC]* [ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c ... Signed-off-by: Dennis Chen Acked-by: Mark Rutland Cc: Catalin Marinas Cc: Steve Capper Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Matt Fleming Cc: linux-efi@vger.kernel.org Since v1[1]: According to the suggestion from Mark Rutland, v2 folds the pr_cont("\n") into pr_info. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-May/431233.html --- drivers/firmware/efi/arm-init.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index a850cbc..c49d50e 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -174,6 +174,7 @@ static __init void reserve_regions(void) { efi_memory_desc_t *md; u64 paddr, npages, size; + int resv; if (efi_enabled(EFI_DBG)) pr_info("Processing EFI memory map:\n"); @@ -190,12 +191,14 @@ static __init void reserve_regions(void) paddr = md->phys_addr; npages = md->num_pages; + resv = is_reserve_region(md); if (efi_enabled(EFI_DBG)) { char buf[64]; - pr_info(" 0x%012llx-0x%012llx %s", + pr_info(" 0x%012llx-0x%012llx %s%s\n", paddr, paddr + (npages << EFI_PAGE_SHIFT) - 1, - efi_md_typeattr_format(buf, sizeof(buf), md)); + efi_md_typeattr_format(buf, sizeof(buf), md), + resv ? "*" : ""); } memrange_efi_to_native(&paddr, &npages); @@ -204,14 +207,9 @@ static __init void reserve_regions(void) if (is_normal_ram(md)) early_init_dt_add_memory_arch(paddr, size); - if (is_reserve_region(md)) { + if (resv) memblock_mark_nomap(paddr, size); - if (efi_enabled(EFI_DBG)) - pr_cont("*"); - } - if (efi_enabled(EFI_DBG)) - pr_cont("\n"); } set_bit(EFI_MEMMAP, &efi.flags);