Message ID | 20180615075623.13454-4-takahiro.akashi@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 5EE00603B4 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 08:03:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 506A128C7D for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 08:03:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4507E28CFA; Fri, 15 Jun 2018 08:03: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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E014428C7D for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 08:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=WaSt/oC/yKHwcKIYAayYadX3TDrmzPERpUx6RHK+7c0=; b=Gl4XtSt+Rtn6DLhqtSvoEIMnZj 1XOaK52+fz12dY5GoYH968g2DHSBVDTAvibt/+Zdjy4JsZglEG9FszyhphU+8Gv1K90tKSAH6RH1L 2iKs+KwKhuli3Ywmb8wbakhOy3eUXFv+114Qh13Ydz1PjEMxqYn3gJ6257KkYYDmUPm0JFkoiM5/E DtzS4YTrNILq3PvXwP/kXhTpshC6Wp42uPDIGRsASNr1DSgwThConLphl3Ta7h9E+F36RI/ozfsZu +d5U9S0kW4cQ8UtRo1nqJFGqSF0IICydHXFN50XCifIYmX7rRwUHmfyHwpOW5ZPjZZ5TIAZVMZ5KW 1yiWIqQA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTjhp-0001ea-Um; Fri, 15 Jun 2018 08:03:37 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTjbL-0006zU-9Z for linux-arm-kernel@lists.infradead.org; Fri, 15 Jun 2018 07:57:28 +0000 Received: by mail-pl0-x241.google.com with SMTP id 6-v6so4409334plb.0 for <linux-arm-kernel@lists.infradead.org>; Fri, 15 Jun 2018 00:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kpMEU3sh1IN0/bxn4qA0OTMbmXCEF6TENF+YzCU+lOw=; b=DDBvU4rzCp9e+l19e+pORcW+cEFywfs3fb1wjwtB8DcbVZiIj/KWS2WMhIhSSDm9Me ti+Jj+TCb7ZdaLMoEx0z4oA0I+WJD19fKOV3JNOEiNDyh0/fxx3rBVO7iaWDeYyiqmpy r0zFGt6g/zJ6D14WTbXzhgA6ggN9IjbAvowqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kpMEU3sh1IN0/bxn4qA0OTMbmXCEF6TENF+YzCU+lOw=; b=F07cWvBB22GHvn4SuqP78YZ51kSFktdqebH0bEsfwNUM9ejYo2PaGrFjNkU4a6fPp4 G68z734W0bIVOClpvKQ63Zj/RSosreJeDdNjRsPb4se3YhXoCJ3nHp77xbfn1ag7mdIF p/X+G0R1IofdX8y4yVHMBnu1ktgAQc6XTRjZyHgjy+e+YpI7GaQ9hHVK8VxOa1eKvPRZ qr5Jz57dWuwfqLVNRTt9HkD9l222fgNgQjxswgKE/NJxC4wORu+y5ptLITIs62o+9qx+ +2N+u9UmOyWNoOqBo03Xbo6hDI2hf92vLjIBQAhw8ZdpUoIEEhHi1Jc/WLIgAH3HZgNN 7IRg== X-Gm-Message-State: APt69E3/Y5FHJiyQ3RPN4/gcvaVgW86pCSumIeJSfaNKiq0aW8td2mFW iT3A4CAXUsyAmnJE08FCtHXsMw== X-Google-Smtp-Source: ADUXVKKFvcK55T+MYYv1z6RJT20I8uSXol/ZFTy7CGC6g+ThoSH7Vgy6oSz5mTXqssZbQyy8CBS2sg== X-Received: by 2002:a17:902:9048:: with SMTP id w8-v6mr788087plz.34.1529049405314; Fri, 15 Jun 2018 00:56:45 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id s2-v6sm12872638pfb.127.2018.06.15.00.56.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 00:56:44 -0700 (PDT) From: AKASHI Takahiro <takahiro.akashi@linaro.org> To: catalin.marinas@arm.com, will.deacon@arm.com, akpm@linux-foundation.org, ard.biesheuvel@linaro.org Subject: [PATCH 3/3] init: map UEFI memory map early if on arm or arm64 Date: Fri, 15 Jun 2018 16:56:23 +0900 Message-Id: <20180615075623.13454-4-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180615075623.13454-1-takahiro.akashi@linaro.org> References: <20180615075623.13454-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180615_005655_460838_877FA150 X-CRM114-Status: GOOD ( 12.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: mark.rutland@arm.com, lorenzo.pieralisi@arm.com, graeme.gregory@linaro.org, al.stone@linaro.org, bhsharma@redhat.com, tbaicar@codeaurora.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro <takahiro.akashi@linaro.org>, james.morse@arm.com, hanjun.guo@linaro.org, sudeep.holla@arm.com, dyoung@redhat.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/init/main.c b/init/main.c index 3b4ada11ed52..532fc0d02353 100644 --- a/init/main.c +++ b/init/main.c @@ -694,6 +694,9 @@ asmlinkage __visible void __init start_kernel(void) debug_objects_mem_init(); setup_per_cpu_pageset(); numa_policy_init(); + if (IS_ENABLED(CONFIG_EFI) && + (IS_ENABLED(CONFIG_ARM64) || IS_ENABLED(CONFIG_ARM))) + efi_enter_virtual_mode(); acpi_early_init(); if (late_time_init) late_time_init();
As ACPI tables may not always be properly aligned, those regions should be mapped cacheable in order to allow the kernel safe access to them. UEFI memory map contains necessary information for mappings, and we want to make sure that it should get accessible before any acpi_os_ioremap()'s. So, in this patch, efi_enter_virtual_mode(), which was previously named efi_enable_runtime_services() and invoked via early_initcall on arm/arm64, is now moved early enough as the first access will occur in acpi_load_tables() of acpi_early_init(). See a relevant commit: arm64: acpi,efi: fix alignment fault in accessing ACPI tables at kdump Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andrew Morton <akpm@linux-foundation.org> --- init/main.c | 3 +++ 1 file changed, 3 insertions(+)