From patchwork Mon Jul 28 18:03:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 34406 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 77DA9202A1 for ; Mon, 28 Jul 2014 18:04:32 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rl12sf56173288iec.9 for ; Mon, 28 Jul 2014 11:04:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=r/EJQsJHh1qXngly5xi8zrEbvLp7FW/WN8q8gcwUG88=; b=PT3Jnj0DA7IMwImoEUVS+ZPrvel2Kx4qmMosk60ENoumA8SXJ7Vi4UlNqcZdvJmAtR ekxcGa9BCsQ67rVmWOxTOkwN0dVmhLCdFnkHtEN/tZiVaFS72Z5Ihkfr6Dc3mH8dPLIc J3FwGygzwQqiEtXWNdt4d/+YiUm9Vl32ORMKsj7r6fxBLmO670B6unDuPXadM+fWf4P0 nrG0GUBbZn5ZKWIwSUVvk/kCbJ4ortfYP2E2Db4D69vzCud5K9i68Sa86wDv0eEFqZcW fACscHVkAJcITLn70iNBDJCX271O6KHsO++gIOkDR/JMN4dOFChTA1oyfgHp+IDGUtjV VcQQ== X-Gm-Message-State: ALoCoQlWVBoSZYSLsKNeUSqcH8ADx/pGxA/p1Xj1/zPruvoWd18MkSQQMBnM4rS2J+2u/lMsei+Z X-Received: by 10.50.117.10 with SMTP id ka10mr11413309igb.1.1406570671734; Mon, 28 Jul 2014 11:04:31 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.85 with SMTP id s79ls807477qgd.22.gmail; Mon, 28 Jul 2014 11:04:31 -0700 (PDT) X-Received: by 10.52.148.2 with SMTP id to2mr39924904vdb.38.1406570671601; Mon, 28 Jul 2014 11:04:31 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id yn9si12972496vdb.75.2014.07.28.11.04.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 11:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so11691140vcb.41 for ; Mon, 28 Jul 2014 11:04:31 -0700 (PDT) X-Received: by 10.52.129.165 with SMTP id nx5mr17945309vdb.25.1406570671520; Mon, 28 Jul 2014 11:04:31 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp186599vcb; Mon, 28 Jul 2014 11:04:31 -0700 (PDT) X-Received: by 10.70.0.76 with SMTP id 12mr40752337pdc.44.1406570670681; Mon, 28 Jul 2014 11:04:30 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id vq10si18611863pab.121.2014.07.28.11.04.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jul 2014 11:04:30 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1XBpGg-0002Dq-HV; Mon, 28 Jul 2014 18:03:26 +0000 Received: from mail-we0-f174.google.com ([74.125.82.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XBpGd-0001tf-4L for linux-arm-kernel@lists.infradead.org; Mon, 28 Jul 2014 18:03:23 +0000 Received: by mail-we0-f174.google.com with SMTP id x48so7904191wes.33 for ; Mon, 28 Jul 2014 11:02:58 -0700 (PDT) X-Received: by 10.194.237.135 with SMTP id vc7mr53432974wjc.86.1406570578139; Mon, 28 Jul 2014 11:02:58 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id h3sm51175762wjn.10.2014.07.28.11.02.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jul 2014 11:02:57 -0700 (PDT) From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org, msalter@redhat.com, catalin.marinas@arm.com Subject: [PATCH] arm64: ignore DT memreserve entries when booting in UEFI mode Date: Mon, 28 Jul 2014 19:03:03 +0100 Message-Id: <1406570583-22848-1-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140728_110323_319896_CB8C176D X-CRM114-Status: GOOD ( 11.21 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.174 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.174 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: mark.rutland@arm.com, linux-efi@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 UEFI provides its own method for marking regions to reserve, via the memory map which is also used to initialise memblock. So when using the UEFI memory map, ignore any memreserve entries present in the DT. Reported-by: Mark Rutland Signed-off-by: Leif Lindholm Reviewed-by: Mark Rutland Acked-by: Catalin Marinas --- arch/arm64/kernel/efi.c | 2 ++ arch/arm64/mm/init.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 14db1f6..7ad17b2 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -188,6 +188,8 @@ static __init void reserve_regions(void) if (uefi_debug) pr_cont("\n"); } + + set_bit(EFI_MEMMAP, &efi.flags); } diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index e90c542..58dbf2e 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -151,7 +152,8 @@ void __init arm64_memblock_init(void) memblock_reserve(__pa(swapper_pg_dir), SWAPPER_DIR_SIZE); memblock_reserve(__pa(idmap_pg_dir), IDMAP_DIR_SIZE); - early_init_fdt_scan_reserved_mem(); + if (!efi_enabled(EFI_MEMMAP)) + early_init_fdt_scan_reserved_mem(); /* 4GB maximum for 32-bit only capable devices */ if (IS_ENABLED(CONFIG_ZONE_DMA))