From patchwork Wed Jun 29 00:57:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Chen X-Patchwork-Id: 9204167 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 40E3460757 for ; Wed, 29 Jun 2016 00:58:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 331972862B for ; Wed, 29 Jun 2016 00:58:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27CAE2862E; Wed, 29 Jun 2016 00:58:45 +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 654532862B for ; Wed, 29 Jun 2016 00:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbcF2A6b (ORCPT ); Tue, 28 Jun 2016 20:58:31 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:31421 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752495AbcF2A63 convert rfc822-to-8bit (ORCPT ); Tue, 28 Jun 2016 20:58:29 -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=+nBnLKvHTKpPuX2U0tj8ylKCrDjGmR+bTyIO2koYYWU=; b=QxGq3Iihp/6XrwisV6wDdsz+QschQOmPEuFHm2vxvN+GFMWFGf+f5yTVpk3K4eyP9KqjD/NRd5V0+vhypWWjhaHZHmaAnnysv4Z7SMJKZDgwYfjdsgazEiRT5yzKxLqXxSG2VwqZwyzaCs4owlIBqu4ufmRXo0dtXD6vra4fu20= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp0209.outbound.protection.outlook.com [213.199.154.209]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-33-SN3O0VCuNC6-NRczvLr8Iw-1; Wed, 29 Jun 2016 01:58:26 +0100 Received: from HE1PR08CA0031.eurprd08.prod.outlook.com (10.161.112.41) by DB4PR08MB0143.eurprd08.prod.outlook.com (10.161.17.27) with Microsoft SMTP Server (TLS) id 15.1.528.16; Wed, 29 Jun 2016 00:58:24 +0000 Received: from AM1FFO11FD009.protection.gbl (2a01:111:f400:7e00::197) by HE1PR08CA0031.outlook.office365.com (2a01:111:e400:5097::41) with Microsoft SMTP Server (TLS) id 15.1.528.16 via Frontend Transport; Wed, 29 Jun 2016 00:58:23 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD009.mail.protection.outlook.com (10.174.65.98) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Wed, 29 Jun 2016 00:58:23 +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:58:02 +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 3/3] arm64:acpi Fix the acpi alignment exeception when 'mem=' specified Date: Wed, 29 Jun 2016 08:57:35 +0800 Message-ID: <1467161855-10010-3-git-send-email-dennis.chen@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1467161855-10010-1-git-send-email-dennis.chen@arm.com> References: <1467161855-10010-1-git-send-email-dennis.chen@arm.com> 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)(189002)(199003)(229853001)(26826002)(33646002)(92566002)(11100500001)(106466001)(86362001)(575784001)(47776003)(87936001)(586003)(2351001)(50466002)(5003940100001)(77096005)(48376002)(4326007)(7696003)(5003600100003)(110136002)(50226002)(2906002)(8936002)(356003)(19580405001)(19580395003)(189998001)(36756003)(104016004)(76176999)(6806005)(305945005)(2950100001)(50986999)(8676002)(7846002)(246002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR08MB0143; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD009; 1:vayyFCJnFbMD5J8UcwKRHi3O/s0fvHw04Bz2AhFKDBAjcSuvAIRkbtXPAjpYI/Jrjmr9TMEawXIekTFhgUUaf1tYoVJrK29t9p5fP2igtu7Uj6CUnUjkS081eNouhZDysen02aJdnUihGgd5uMpBlm7FU4GeCMEzjS17PhM4YdBp5n7LgsGhF5YhS0xI7wC2wkE1hvcT3Q14q+L42ACpQCKB3BiKnYmSRwb2ieMjIANDm6klc/HlZTXo/wCk95XB7ZFg8GhJipxxS9Sx8gRM1mvKf5TsaXqb+nIQPFeKLnG34WmFFbkXD2mLxcAUhcqfmuYIZR8Qi7xHGxj3FquiBbi1qRamtGkYWxYg4QrD/JvlvRQRcny3ZUXxBJ+JCvYMZ5brzovWtlE0iWkc1ySQFW64lbIsSkmzBK5UCo7wn5TXe+lOsKDtOsAXrUYjH1RXO5Yx9qJhqXAUmJe5pt5JdAK5UeK/LxvyHxczczVXCmOJG7rpitNgzBISoCqauCuyCIofcLzy+0opwuTVDpZYzScpo7g0LDyRxPBZ5kj6iREzWzghvrJ5hcCeD4v6mnKGTudf5rq7m8kBAnTBYL7Gq5g1oy830ivEG5knOKDE+u0xUK07PsPL+Dnjw2ap21+0b9+dRIc6/szNAX++ydbIqw== X-MS-Office365-Filtering-Correlation-Id: a4f40463-e8a1-46ff-b9e7-08d39fb87891 X-Microsoft-Exchange-Diagnostics: 1; DB4PR08MB0143; 2:KZjVPKtKVzyl//mf8EX+pqP261paxDPbGqDe/xjfiGBtrwU0NTq222BQ5MSYQOb3/HSlDRtFHVmxMw0W/O4i+VfgdrWJHZ+eqSEct5WACSCitnn9wGZtvBFSXvtgMW+BZI5FEhR/WfxJKv2kkNtPZEzE92Tl05hStXzytiVgAYmwFSz8UaQTyie+kgTZTftr; 3:eeVhOz91mlDQPBweXaDrVXIABOlt98qUpXgQzQTf/WEfBnTEl6hFYI7TNmibWzGepDHBI8IM3BXXa/4ozmVOMydzYLcXrER1s3izrlJRncx45pL5+Sl5O5dQP0d4xH8VZJhF0acpO9bVqBCjmJdPqqJutwJTrfbzVmaC025Kd7iwPYSoOVJ83ZhglGkJ4Vnq3fTc5qxBP68TULpX59eET0ATIms00NrQVXELzRT3yp4PwYRTTfV13u9Jr6N/i+drSaAVQf/A1JCRmotE0D7ymA== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:DB4PR08MB0143; X-Microsoft-Exchange-Diagnostics: 1; DB4PR08MB0143; 25:NFd3HJMB+z8E1LwB+22O/uNOjsjNBBbG4FxHzWgTTOmM6PSlTjgVvt6MExGwdDILQFOh1NZXDQ0uGGa18R4YARkKdf4/ssdp3Q9eBNHwgTQn8yHbHQjZpO4KlKvsREQDwB792q2BucmxA/qNPnfOhOWj4+b9WXIF0nU6qdjsXaCBjAiPJTjeW0U1bBnbK9mzU7GmmVULB3OInZ67HCBFhwwgaLExF2zRSm7U5X1SOAeScLJyaIq90jsDxZAl9T09hPYVvZwaEmrfOXKm8aewFmfZrvKKg8TDO0BtYeN+wJT7QrRXjWljCfpWZI61T7FBThzVfZFgQbFjZRVb4DqoeiUFJQqkYMU8dzkRSqQCIMiLfm8t7totuEEA5FZs1mBg6TUiFBOFZgCQi00EBXIjRDA7qh1CLBvXoVcpt1+OA0qBP8pNPmqlFYGbqeX5ZQCDSYpZ+bwWPjoIG/mih4qQTgnyV3FVz1TawmMrXZbkPW4M2AxFfH9dLh9vjq3hGL9sYiTuASlGLuSlh9fL1wqc/5CxnMP6IUAbCf9mOMAAVDhGuBEqcD3IHEke2kVhKqkYLyxRTp4bMnu+rga7Vd1jtGLN0gd9KnaEIBGfw5ah0DBn0WS+ffeOI+tSzJwTxIVEfZzdIswc05ak69wlXTN4gLoZB/SYbmY4P44CYpPXwHjDdlUJC3po+0ErFX709SxBWTulj7i1DfbxJReos65Es/gsrZz9aCuGpAOlMZY5HRyWj2tlL+QIIY/mdrgRQ1X4kfU5qnYzRBF+VWtpArwJXrEsahfpmvixUpSa3rLcnoY= X-Microsoft-Exchange-Diagnostics: 1; DB4PR08MB0143; 31:3spJM3V5x4CcjhExsZk3NHPd74OPbArur26+Kz+XEZZoaKj14loMHyusnZInEW1QuCqbzUnj7c25XpqNIsOJelgLhvndztIRXRDZvx5snSBkLklbrSRa9HJzsKROuPGzI2cUvvRchRh18G+aami3WSbGWd/4DVqbbueagsqmE4CHrfAYo46K7YLrtG3Zkir1PpaWB19yvp/hGhxnvq1yCQ==; 20:qJAPtMP2zFCuS9Kcjw21WYZOMpKWbt2nYEwnxOfPzBHiRYXcP/4QASImFEpwaVRNSwAcMoqTN5hKa5gVKnGGY5IQYAlsiVw5bkCnekDwpA6OWwL7lfjQLOgESYqw7W7zzJ0Id/VTCWJDbPDkb5Ta5j7JdrvbXq1+xjuKubVay9C+ci1C6sAyocPyxUizBp6oA7ifYd3vTUHekKLvHsE1L23tBp4j0u1s1aW3ulFWAR/aCGn8obhm8+wYk96jBPR6 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)(13023025)(13024025)(13020025)(13013025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DB4PR08MB0143; BCL:0; PCL:0; RULEID:; SRVR:DB4PR08MB0143; X-Microsoft-Exchange-Diagnostics: 1; DB4PR08MB0143; 4:va+jon25zPXRsieCYPB2ERkrpI0R3ueHTRB+gktdNuzC2o7fSqNhSg+fZw4jog5gNmEwEOfwkSuhtgmK0hW8sgLGO2w89svkO34IAbhsvw3fbnMzzRMbqCRwc34CBgqbTwoMptttd4LjFzeOvlsdcGbvJkRa3NJtvymiE6NNc9HH2dz6luMdM51a3spO0re2sjFapevXQXhIIkAgTlqLiVxEId00aqkPMBZuIZXhmzfBR/7ZUQWdaM8myYy109fhmFJVmFh1OdeaFzdwBBiwdnkbh9xmtyczlFBTZ1W88VZvR4k0ub4q5E+ABrG53ZdvYVqzllR22lTYNyCxZbhLc+Lw8fp/oC75Bmlcup34ZYY5Utlwb0G0tc/Kf2IITkALzhZx+oIDJRC2HHmxqcvjlQm7VFmXCcRJD9okdqqSmt1Mm3AdZ7hBnZnSq+LJ5esLtjLbwYoznLwlOHjihd2/Ocvpmb4ouLqSgvd0a6txP0fStAKnoPRuix8yM/RVfQvZ0r9LMR5WOb4lEnHCsdH5+UWlZY6OvaEmEK8qvtaA+fwK6KnNFd1PjrDspIumkk9o X-Forefront-PRVS: 09888BC01D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR08MB0143; 23:jMYv+Bvens53klS8EACit34IdG2dJ0dugADkLX6fN?= =?us-ascii?Q?YdUxEKZgsqLuiXQG+iMF/Q0ZMSabDNvDw7o1GzczpS2BuVdElZl9OLuZZYW4?= =?us-ascii?Q?FBxw5xjbTd7u5EYarjKzG527HB2rOwVB61lmYe6AMP9rR9pRWIiqpNCyOZpS?= =?us-ascii?Q?DLKjpnXUzRrbjahL8mIXIbANmxu5gHBplV7B8HMvZ/GyJdrtoTdTxWbQ0LiA?= =?us-ascii?Q?XxLkhaw/PNdGoPZ3K0wFD6yQJ6Xpdin1lhAmCay6Fh0fANnFWSI6oWtB6cj4?= =?us-ascii?Q?L5vco/zTPfEKtc3dVwN2xoIhDMwep82+IxKQafLd8tb8MoeIz6PvXH3S21Jz?= =?us-ascii?Q?OBA7r8Sl4KxzHPRkAQifVzpbshAe7B9fejqzoZeQ8ZlQCffAOhEE19aHXoMr?= =?us-ascii?Q?NwVNNOaPnPch5sdrntiXNItvu4COdHAFilROQwdxuXWJkFDoUHjA1S1r+mrn?= =?us-ascii?Q?9g1XeeZYU9ayq+RAi6U6JDH85H+9XaB0n3GUhFcAxEELK1lPyW9Z/rMrdS2m?= =?us-ascii?Q?/d7GnoBYM5fh975vYKFBvz8+Nndf5zuVlUkw/VXbNGQ91vcV47X0VH1+q8XW?= =?us-ascii?Q?Smw4otTHlDZ2svS++TSbhDFM440RUBsm86G0GzVSAQKR8BTDOgA0/lWhy0UL?= =?us-ascii?Q?zqaov+DlDYHPVmjVNio7ifXB6BKTYlootYQo4MSHGUQe8DXldDNrbU7ZLyL9?= =?us-ascii?Q?7Pa7TzJ5/0PRF+8lN/z8TogON1W87+zZPmo5xkQeK05IhiORGpZ/FbX+aUka?= =?us-ascii?Q?yly5ONH5nXF7MKuWQg1uDTie6BnRVXVMe1hUbY9pKj8O30vPpn0IK+bm3ccK?= =?us-ascii?Q?PU5PI3XC0eXPQMQUZsHIxyG4r3SikbzoZ/QE6WjU8S71/I0jz5oVKcQT5OOf?= =?us-ascii?Q?+vFiVjGg3SLA0JfzuyD/i3B85QT2cfUo+v8zn5VrPqTgjG+kWjBnKoJU0VKf?= =?us-ascii?Q?834UHrCkUGQZnMJTwGTUaSdmdMCqcIBbTXXGik7P7nxLc5IL8l4piG+EivLp?= =?us-ascii?Q?hLx6BmQ0y2WNbdQwfXKNS6QRRq5NAHWF5Y4mrMniO/O8c5oWdReJh1bAXWN+?= =?us-ascii?Q?geCcrBOHwARyVFTw7LfNi+/VVHWbqawXDPIU3IlAzgOdV5bYQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB4PR08MB0143; 6:HPQ2SsH8x6GbTS58MY57Ch/r0Anh12i1TmsKm7ohsTeuEBjj8I2Pbe8zPYiAu79TwZh2Ap6LfLcydFqyWnnp8Pw6f3VpMRBbJW8yQYTFSkCLK3vR2ySGhrIHLp+jbVdS8KC1AgY4o+cFtD5F8E1Y5ZTMHwxXIk9U6phrY6QPQBEnATbcHLfdpUKR0t1VA/gGaY5wMlRQC8pXivpKlpYejEIyokSkPKk4J3bFOJRTbfDa73mnyY3aD+A8LeRJIzjnScZJwGObNJKXvVX0dV2lUbSi7LlI1j+X0FCHfkD221bCo3lOIx9z10qUzAePqKhAh0YhUycgyXsIeLBlY7sDOw==; 5:TSxzqtNK4EoyumY6H6tTPtlArHaVIZxNrU+Dr1C/xW6yCuiLb1AZ1V9cogqjzCG8ZqDDkXzZJvQ1UQsl+1qdFe5XHfoSPj9lEiiCm5OHlPVAA+sKh9Hh4RbsGCmCMCN23VkMqGWCmLUIceWnJl9c5g==; 24:MeSsOAIw9ACR0HWBxRGhYxH0WzXUBWbehDlpmrGbLcKxki5O14r+Mk1OkDWx8az3te+h4cS8YBhGtBwotoSbjEcDlBhhpqllSAhJS8q04Hc=; 7:YrK4al+I2gdMj79knWS96qX5IISV5jXkMs3nEP60BSbE5gmLu1yDlH5f0BN/uP9Fl6YTKTvTjLfuVU9FyDpAqzL+3V8+vKHVgtVzr/ZV0Khue817i/j3aE1qld5h7ytYhATahnk+cK6zInArHCk9BEzNfhTOZewFbemtufF88z96k0VX0JOuh8rlPrUk/Ba27lSYgITj9gp8i3qPeSirBX/xv+6rztafg+80iDKOhe1Q8m2ULhXWnHqgmnJ1suH2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR08MB0143; 20:rq8byj4HR3wuU+23lLfty9uuVo4uQHiKxXPb6pIwTQhsF5aeEQC+QdVx58hjpAT90fR6Z2HvFdfNow8n3H80bFklVjR6725czQfa4g+MqakvgktLNBuy3AL43M9ne3UT9ns9Mycq1agKdaY6XPcmPrFfZapSVYLRxZ22OpXr+8Q= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2016 00:58:23.2490 (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: DB4PR08MB0143 X-MC-Unique: SN3O0VCuNC6-NRczvLr8Iw-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 When booting an ACPI enabled kernel with 'mem=x', probably the ACPI data regions loaded by firmware will beyond the limit of the memory, in this case we need to keep those NOMAP regions above the limit while not removing them from memblock, because once a region removed from memblock, the ACPI will think that region is not normal memory and map it as device type memory accordingly. Since the ACPI core will produce non-alignment access when paring AML data stream, hence result in alignment fault upon the IO mapped memory space. For example, below is an alignment exception observed on ARM platform when booting the kernel with 'acpi=on mem=8G': ... [ 0.542475] Unable to handle kernel paging request at virtual address ffff0000080521e7 [ 0.550457] pgd = ffff000008aa0000 [ 0.553880] [ffff0000080521e7] *pgd=000000801fffe003, *pud=000000801fffd003, *pmd=000000801fffc003, *pte=00e80083ff1c1707 [ 0.564939] Internal error: Oops: 96000021 [#1] PREEMPT SMP [ 0.570553] Modules linked in: [ 0.573626] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.7.0-rc3-next-20160616+ #172 [ 0.581344] Hardware name: AMD Overdrive/Supercharger/Default string, BIOS ROD1001A 02/09/2016 [ 0.590025] task: ffff800001ef0000 ti: ffff800001ef8000 task.ti: ffff800001ef8000 [ 0.597571] PC is at acpi_ns_lookup+0x520/0x734 [ 0.602134] LR is at acpi_ns_lookup+0x4a4/0x734 [ 0.606693] pc : [] lr : [] pstate: 60000045 [ 0.614145] sp : ffff800001efb8b0 [ 0.617478] x29: ffff800001efb8c0 x28: 000000000000001b [ 0.622829] x27: 0000000000000001 x26: 0000000000000000 [ 0.628181] x25: ffff800001efb9e8 x24: ffff000008a10000 [ 0.633531] x23: 0000000000000001 x22: 0000000000000001 [ 0.638881] x21: ffff000008724000 x20: 000000000000001b [ 0.644230] x19: ffff0000080521e7 x18: 000000000000000d [ 0.649580] x17: 00000000000038ff x16: 0000000000000002 [ 0.654929] x15: 0000000000000007 x14: 0000000000007fff [ 0.660278] x13: ffffff0000000000 x12: 0000000000000018 [ 0.665627] x11: 000000001fffd200 x10: 00000000ffffff76 [ 0.670978] x9 : 000000000000005f x8 : ffff000008725fa8 [ 0.676328] x7 : ffff000008a8df70 x6 : ffff000008a8df70 [ 0.681679] x5 : ffff000008a8d000 x4 : 0000000000000010 [ 0.687027] x3 : 0000000000000010 x2 : 000000000000000c [ 0.692378] x1 : 0000000000000006 x0 : 0000000000000000 ... [ 1.262235] [] acpi_ns_lookup+0x520/0x734 [ 1.267845] [] acpi_ds_load1_begin_op+0x174/0x4fc [ 1.274156] [] acpi_ps_build_named_op+0xf8/0x220 [ 1.280380] [] acpi_ps_create_op+0x208/0x33c [ 1.286254] [] acpi_ps_parse_loop+0x204/0x838 [ 1.292215] [] acpi_ps_parse_aml+0x1bc/0x42c [ 1.298090] [] acpi_ns_one_complete_parse+0x1e8/0x22c [ 1.304753] [] acpi_ns_parse_table+0x8c/0x128 [ 1.310716] [] acpi_ns_load_table+0xc0/0x1e8 [ 1.316591] [] acpi_tb_load_namespace+0xf8/0x2e8 [ 1.322818] [] acpi_load_tables+0x7c/0x110 [ 1.328516] [] acpi_init+0x90/0x2c0 [ 1.333603] [] do_one_initcall+0x38/0x12c [ 1.339215] [] kernel_init_freeable+0x148/0x1ec [ 1.345353] [] kernel_init+0x10/0xec [ 1.350529] [] ret_from_fork+0x10/0x40 [ 1.355878] Code: b9009fbc 2a00037b 36380057 3219037b (b9400260) [ 1.362035] ---[ end trace 03381e5eb0a24de4 ]--- [ 1.366691] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b With 'efi=debug', we can see those ACPI regions loaded by firmware on that board as: [ 0.000000] efi: 0x0083ff185000-0x0083ff1b4fff [Reserved | | | | | | | | |WB|WT|WC|UC]* [ 0.000000] efi: 0x0083ff1b5000-0x0083ff1c2fff [ACPI Reclaim Memory| | | | | | | | |WB|WT|WC|UC]* [ 0.000000] efi: 0x0083ff223000-0x0083ff224fff [ACPI Memory NVS | | | | | | | | |WB|WT|WC|UC]* This patch is trying to address the above issue by only keep those NOMAP regions instead of removing all above limit from memory memblock. 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 --- arch/arm64/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 7d25b4d..9482b45 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -226,7 +226,7 @@ void __init arm64_memblock_init(void) * via the linear mapping. */ if (memory_limit != (phys_addr_t)ULLONG_MAX) { - memblock_enforce_memory_limit(memory_limit); + memblock_mem_limit_remove_map(memory_limit); memblock_add(__pa(_text), (u64)(_end - _text)); }