From patchwork Tue Feb 19 19:03:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 158727 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4015629jaa; Tue, 19 Feb 2019 11:03:21 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibnd8n/1T31l94KZTTN4i6tYY+hrMy0jxxEPXOO29AUJulGn09CMExyN/quPjDq/GaQUgL1 X-Received: by 2002:a63:cc4e:: with SMTP id q14mr28963252pgi.291.1550603001573; Tue, 19 Feb 2019 11:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550603001; cv=none; d=google.com; s=arc-20160816; b=A4CL9tc6JbhG0GTsXEBNxgsR3wRPl+l2x3Q16L29BXZaCoJCWsOA53hfKe8/ECNPjF HsnZGEx2vewohw/rL7sTc9djN0NINr5iPzyfkahy+FLooJv1OjxiMA2+T3AS2u9yilke Ngbca//Hbsrbc6TKqbMV3KnJUYuwdg1FQ/aw9RNgNt7ae/CLrC1fmK3yTe0kl8Rub6nP Zw1SP/8fVLZfvlAPi6XA/ExG+PKAsYRfANRhPdaqNnNgodF1iq4vogvKiHAeM1HX1qT3 /BDuhKatSuNBy4Sd7X1EsYgS0DKFXjvZzj3fSHAYA+GRdt5iKRoxYrGYsRpAeqkrFUqA ISUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tkr/wbBrEViZnOnohK1gaoso6Gti40p0yTOgCrFXvI8=; b=GfCXsm7fkPX78SMIglxreMQ7shCSlOYmukQFDCzmRoBsgzRKAniIKorqDE1GzTvyAP 4/24m6PQ2oE1ndAnQGhYZVL3Aio5bQReU5/xMmq7V8jUJ9OvgjikQsCJ/5ZeW70AG5rJ 6T4EJcRvvfH83YHae+UVYDa1HULUCqT2UjMAH8lgX8yEz0sFS1uL/qcilWYfnmMO8w/g i5ir8lk2R/j5TId2ez2pmtnmd8BySccb5Pl5DoLHR8rvHrKOY0zFuwnZUviekRfnZJrE nmGMXLiPrpDglJEBuFsRIkYew21v7AkLtDZb4gIlb8wkbV3IAAA1NZXcQtFctUXPcYRS lfkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iKBG7Xaw; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si17550516plf.398.2019.02.19.11.03.21; Tue, 19 Feb 2019 11:03:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iKBG7Xaw; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728667AbfBSTDU (ORCPT + 15 others); Tue, 19 Feb 2019 14:03:20 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38555 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725963AbfBSTDU (ORCPT ); Tue, 19 Feb 2019 14:03:20 -0500 Received: by mail-wr1-f67.google.com with SMTP id v13so23180098wrw.5 for ; Tue, 19 Feb 2019 11:03:18 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=tkr/wbBrEViZnOnohK1gaoso6Gti40p0yTOgCrFXvI8=; b=iKBG7XawCQCLNXIsuRPyW47VWDvAE69bNMPsEULG/f/X/aRjBzenqxE+CnOpnf8bNu L0E+jyp6uWSSnPYiOZIvzHcTsZzrURNORG5GizLd6wa1HSD5xatAkDlzLcgJQxcTyM37 LxVquM+mxs8yl6W9F/s2VD8cpdvNsM6OkB/jLwPlW1x4MmRZyz1kTRHGrGT9PsR2tqZ5 LWiGBV13tjla9+cAJrHJ79qkE1t9nBkCaBXqa51+ymj8uuoQ+FC+oFqG7zzTfV6l9Azu 0AR1HgOcj+60hRJQIMj9TA+KTPINuiBwt7ITlPLWyTihyGVlMu4MIq5MLJAy3AqFJQ0o 2uKA== 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:mime-version:content-transfer-encoding; bh=tkr/wbBrEViZnOnohK1gaoso6Gti40p0yTOgCrFXvI8=; b=Pt+K6EHQUZhF3gg8hyS82M9u1lMt0LlWhLAqwLQdMZPyG66PD25N08Sj1Mn4bUiqOC INQTLuHR5RnUpytv1LI+lflPKIgS1QWvORKwu9szkJ2+fIqwlsqvne8Hbk4Kag4o5WTu 8zC09eyzchnJOIBoc4JfDi0uj1VIWtIcwwMsDlJCmIBTuj2z/idFCbfxc3DxQmbRP8SZ r8c9dMq69BBxiOVJA52RUq35IjQ9DRZvuinWXR+LH29+nbausaz51ksx3frd1qJ28QIn wY4LRw/9SFo+MXa7NKtUvRdwI68Q8om2VjL4EXi7F7/S6F4t9yMQJi2hxdAIM8oZdPvy cs4A== X-Gm-Message-State: AHQUAuYentiIX+4xqZ60SM4TNIT3fiWjpAV5r+GiE+F3tcSNQOMIz1Fd 9Z4XjtATJrEdMAP90/7QWkS5BM6HKKg= X-Received: by 2002:adf:dd8a:: with SMTP id x10mr16448815wrl.117.1550602997939; Tue, 19 Feb 2019 11:03:17 -0800 (PST) Received: from sudo.home ([2a01:cb1d:112:6f00:99c6:fb2:8598:fb86]) by smtp.gmail.com with ESMTPSA id f7sm14778334wru.3.2019.02.19.11.03.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 11:03:16 -0800 (PST) From: Ard Biesheuvel To: stable@vger.kernel.org Cc: Ard Biesheuvel Subject: [PATCH 1/2] arm64, mm, efi: Account for GICv3 LPI tables in static memblock reserve table Date: Tue, 19 Feb 2019 20:03:12 +0100 Message-Id: <20190219190313.2477-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190219190313.2477-1-ard.biesheuvel@linaro.org> References: <20190219190313.2477-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Commit 8a5b403d71affa098009cc3dff1b2c45113021ad upstream. In the irqchip and EFI code, we have what basically amounts to a quirk to work around a peculiarity in the GICv3 architecture, which permits the system memory address of LPI tables to be programmable only once after a CPU reset. This means kexec kernels must use the same memory as the first kernel, and thus ensure that this memory has not been given out for other purposes by the time the ITS init code runs, which is not very early for secondary CPUs. On systems with many CPUs, these reservations could overflow the memblock reservation table, and this was addressed in commit: eff896288872 ("efi/arm: Defer persistent reservations until after paging_init()") However, this turns out to have made things worse, since the allocation of page tables and heap space for the resized memblock reservation table itself may overwrite the regions we are attempting to reserve, which may cause all kinds of corruption, also considering that the ITS will still be poking bits into that memory in response to incoming MSIs. So instead, let's grow the static memblock reservation table on such systems so it can accommodate these reservations at an earlier time. This will permit us to revert the above commit in a subsequent patch. [ mingo: Minor cleanups. ] Signed-off-by: Ard Biesheuvel Acked-by: Mike Rapoport Acked-by: Will Deacon Acked-by: Marc Zyngier Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20190215123333.21209-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar [ ardb: Double the size of the slack to account for the lack of an optimization that was introduced in mainline after the release of v4.20. ] Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/memory.h | 11 +++++++++++ include/linux/memblock.h | 3 --- mm/memblock.c | 11 +++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index 778af0b7f7fd..c67081301035 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -303,6 +303,17 @@ static inline void *phys_to_virt(phys_addr_t x) #define virt_addr_valid(kaddr) (_virt_addr_is_linear(kaddr) && \ _virt_addr_valid(kaddr)) +/* + * Given that the GIC architecture permits ITS implementations that can only be + * configured with a LPI table address once, GICv3 systems with many CPUs may + * end up reserving a lot of different regions after a kexec for their LPI + * tables (one per CPU), as we are forced to reuse the same memory after kexec + * (and thus reserve it persistently with EFI beforehand) + */ +#if defined(CONFIG_EFI) && defined(CONFIG_ARM_GIC_V3_ITS) +# define INIT_MEMBLOCK_RESERVED_REGIONS (INIT_MEMBLOCK_REGIONS + 2*(NR_CPUS + 1)) +#endif + #include #endif diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 3ef3086ed52f..ecff64ff365d 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -29,9 +29,6 @@ extern unsigned long max_pfn; */ extern unsigned long long max_possible_pfn; -#define INIT_MEMBLOCK_REGIONS 128 -#define INIT_PHYSMEM_REGIONS 4 - /** * enum memblock_flags - definition of memory region attributes * @MEMBLOCK_NONE: no special request diff --git a/mm/memblock.c b/mm/memblock.c index f45a049532fe..74ac4f89018a 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -26,6 +26,13 @@ #include "internal.h" +#define INIT_MEMBLOCK_REGIONS 128 +#define INIT_PHYSMEM_REGIONS 4 + +#ifndef INIT_MEMBLOCK_RESERVED_REGIONS +# define INIT_MEMBLOCK_RESERVED_REGIONS INIT_MEMBLOCK_REGIONS +#endif + /** * DOC: memblock overview * @@ -92,7 +99,7 @@ unsigned long max_pfn; unsigned long long max_possible_pfn; static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock; -static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock; +static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_RESERVED_REGIONS] __initdata_memblock; #ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP static struct memblock_region memblock_physmem_init_regions[INIT_PHYSMEM_REGIONS] __initdata_memblock; #endif @@ -105,7 +112,7 @@ struct memblock memblock __initdata_memblock = { .reserved.regions = memblock_reserved_init_regions, .reserved.cnt = 1, /* empty dummy entry */ - .reserved.max = INIT_MEMBLOCK_REGIONS, + .reserved.max = INIT_MEMBLOCK_RESERVED_REGIONS, .reserved.name = "reserved", #ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP From patchwork Tue Feb 19 19:03:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 158728 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4015646jaa; Tue, 19 Feb 2019 11:03:22 -0800 (PST) X-Google-Smtp-Source: AHgI3IYPj0zUzPZClV129YVVyvsPyTzZtxsIdVBdkh6Lc7GKR9ZV/HdUZvxqwN86T5sevhlHqb9y X-Received: by 2002:a65:6658:: with SMTP id z24mr29281576pgv.189.1550603002521; Tue, 19 Feb 2019 11:03:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550603002; cv=none; d=google.com; s=arc-20160816; b=zt+uLu5O08zf1J83hmbmGesUgHYExGHoPUOqau69PT2WlYcNW3ONim8ezqiz8KKRuu kB6iKuuFLhXU46rCxSSlowuTZ4Mstp0+QNzuhwY/fYKWNuh7FjvSdfH+lA9W51qwKqs9 JDlDAzdrWnIVO1NQ33TZuZOy5vK5RLHIsLhFwqKlW06N1WOcFcI1N0EMUox4MW52Qj8r jFKNG5PRwEnXKFpG5sQU2jvGl0+w933E9oEnvlhiw5LcZPy+AQkgWMVQsOuJtMXXZf9w WV46D/hpozj2aS0F4yC887ZzaWKXd31+jX43mRZrClnJag36kkx6ggcBT59W9927euoO nnzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hHBuDxz65iJoIlQu4JTLeWcyTuxRlLgTcYQBnteqhXM=; b=LTFM7fao5V7NHfzwNhm6a8Bi/wHzQVUfnA0+BZ7HkAJAEb9mPbA7rM08jGLXyCHHmY h7j+DsjZUPt3gk7lWCiP1hho7hn16MdQkWWXRogq+H0+KvokkCLhdEUAqWqtLZFOtWCm cgxsQyR/zt3HsVxO5fcG/q1Pa9bT1HbUN24ZduPBNLORCKntY+iOFDpf2x0sDB1qPzDS QUU2aN5P0MyjSm4qozsylQ/L19GUMGPI9SEyOzVBO++BDM+7YPxQ9b0az9YidjVCUibm J+BlQH8fjKx9wuA6WdGC9hqkxDczHbKnZVC6UxhsYGcR57JKGW0hNWsLQiU2DcKnL1zk cuaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+LI1CEP; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si17550516plf.398.2019.02.19.11.03.22; Tue, 19 Feb 2019 11:03:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+LI1CEP; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725963AbfBSTDV (ORCPT + 15 others); Tue, 19 Feb 2019 14:03:21 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:32801 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbfBSTDV (ORCPT ); Tue, 19 Feb 2019 14:03:21 -0500 Received: by mail-wr1-f68.google.com with SMTP id i12so23270829wrw.0 for ; Tue, 19 Feb 2019 11:03:20 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=hHBuDxz65iJoIlQu4JTLeWcyTuxRlLgTcYQBnteqhXM=; b=Z+LI1CEPR6mPEP1uLhjKXVPPX5rCTBsk8UxnLOkS3o8e9d/v8qeCOCxp48LemoTyzW BlV8+Yn21T3eFGdXHRfKXV0NTjyax0F0oS4oKWQVdO1ePOXzrc5Jh9r4XcAs8y+f2+4R 0Gtiqy5xx5l1D8/6uHHvXWbqMewli1Nkdc6pupq5SVNDZ7dVMUM0RIRIpMWbXr1FwTD7 C+hDhGK05WMpCbAkJUOY0Df8nBBtabCwbYBGnJPdxe4uDzMUyrnhPnBKUNYotgfS0tfH gY++Ys1lksjJuwbI1+GDU6d0pT+fYxB2XMzOxYoXioKgYKfa+OSheMEl8+7Zt6R4c1vH bM6g== 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:mime-version:content-transfer-encoding; bh=hHBuDxz65iJoIlQu4JTLeWcyTuxRlLgTcYQBnteqhXM=; b=aNCQGzH4Z7KSJffupz7URVLgEfxDnhPWNLXGUNVGwhkVtlzZAzBeUtNGBxWmtfhq7m UVCM9bMBkmS6NjKjSTULidpL6731Q+4h86EYEaQVt4jCs27Nj7niQ7lZ8C2177wIdxAy fZthQVjwn44v+6fL/m8nrUfwoHC1d5LBvWCD1yBI9c0G37w4fyfmMiTvOmeqQIbasFmT nFEyF+YCn2cexwNmHd7rQCF6CietAQrh+gCdMnxwfPcg726Qnh9gDAinSQ97obWcwPEI 7vGIPlYyE92Y4qCsTuxBbTILX/8VMlWE3/yk45UjQ50SN5cup2BilHBSiLX+o4J/qjRY wM1A== X-Gm-Message-State: AHQUAuY/bCpRWI80X1kJtRYnEAtuMvIAwlK+aIGvVBH33hYqh97xwMhq hvSSCAtKk1jzv5jgFkVq2HkDn8xLe2Y= X-Received: by 2002:adf:dfca:: with SMTP id q10mr22555868wrn.45.1550602999412; Tue, 19 Feb 2019 11:03:19 -0800 (PST) Received: from sudo.home ([2a01:cb1d:112:6f00:99c6:fb2:8598:fb86]) by smtp.gmail.com with ESMTPSA id f7sm14778334wru.3.2019.02.19.11.03.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 11:03:18 -0800 (PST) From: Ard Biesheuvel To: stable@vger.kernel.org Cc: Ard Biesheuvel Subject: [PATCH 2/2] efi/arm: Revert "Defer persistent reservations until after paging_init()" Date: Tue, 19 Feb 2019 20:03:13 +0100 Message-Id: <20190219190313.2477-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190219190313.2477-1-ard.biesheuvel@linaro.org> References: <20190219190313.2477-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Commit 582a32e708823e5957fd73ccd78dc4a9e49d21ea upstream. This reverts commit eff896288872d687d9662000ec9ae11b6d61766f, which deferred the processing of persistent memory reservations to a point where the memory may have already been allocated and overwritten, defeating the purpose. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Cc: Linus Torvalds Cc: Marc Zyngier Cc: Mike Rapoport Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20190215123333.21209-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/setup.c | 1 - drivers/firmware/efi/efi.c | 4 ---- drivers/firmware/efi/libstub/arm-stub.c | 3 --- include/linux/efi.h | 7 ------- 4 files changed, 15 deletions(-) -- 2.20.1 diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index f4fc1e0544b7..953e316521fc 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -313,7 +313,6 @@ void __init setup_arch(char **cmdline_p) arm64_memblock_init(); paging_init(); - efi_apply_persistent_mem_reservations(); acpi_table_upgrade(); diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 415849bab233..bde3822cf539 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -592,11 +592,7 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz, early_memunmap(tbl, sizeof(*tbl)); } - return 0; -} -int __init efi_apply_persistent_mem_reservations(void) -{ if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) { unsigned long prsv = efi.mem_reserve; diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 3d36142cf812..30ac0c975f8a 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -75,9 +75,6 @@ void install_memreserve_table(efi_system_table_t *sys_table_arg) efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID; efi_status_t status; - if (IS_ENABLED(CONFIG_ARM)) - return; - status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), (void **)&rsv); if (status != EFI_SUCCESS) { diff --git a/include/linux/efi.h b/include/linux/efi.h index 100ce4a4aff6..845174e113ce 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1167,8 +1167,6 @@ static inline bool efi_enabled(int feature) extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); extern bool efi_is_table_address(unsigned long phys_addr); - -extern int efi_apply_persistent_mem_reservations(void); #else static inline bool efi_enabled(int feature) { @@ -1187,11 +1185,6 @@ static inline bool efi_is_table_address(unsigned long phys_addr) { return false; } - -static inline int efi_apply_persistent_mem_reservations(void) -{ - return 0; -} #endif extern int efi_status_to_err(efi_status_t status);