From patchwork Fri Feb 15 12:33:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 158513 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp654468jaa; Fri, 15 Feb 2019 04:35:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IaiahAuaH5AYO5V9c3HPNWXfzPEw1D3u0zSsYag7fFuTt4yXDChPPe3e3w1UDCuoaKrBprs X-Received: by 2002:a63:e553:: with SMTP id z19mr5197952pgj.331.1550234116559; Fri, 15 Feb 2019 04:35:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550234116; cv=none; d=google.com; s=arc-20160816; b=dIoEOqyIEL+VOOtTpLXicPXHxfGd+CjPAi+kIIlEE1XPZEcZL6GCLkYZumtG/doorw hHpOFuStLdZDelPpnRNdGJ/NZ+nLnhjPfktmvT6A+/uxHgX16BLFFYaz+HKz9eIV2a4N aR9WgKjx7FTl5jV+TTTc0Vgc1gnN0a2Gca3OGyNqe8Ta3cQxMYEE14RTQjcMW2aq7XOt D5ZbtvhnjBr2ChihiOJ0l3EbjVeWUZCGFpAKPV7gSUZ1K9SfhMmZVoAgSfdJ5W3grwkN TQ1RPNGVujRlSnMRebDHwpsp4Oy4f0eTfTFS1LcyzCBnoL35NVvAgZcHuxPJmXXTlK9R tI7g== 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=E9XvbP3q/Notg42vlwN25xZrwhT5Enb4lH/EsK0IncY=; b=ivOeQyECFEKBqJeqa2vr2oVW8wbt4OY1VakBNudYDb87XQfo/dDgs1dPy69YZkHe4j yiT6WKeAZQVcJeDPx/3laI7wODcEv++OZmBXIm16pjAVsc0p+p9c9zQ6EDBoiYhVy5v1 f/jcR8osEAc1H6elgdmwpfb5q5gC2Ewd3rRklxnmMyIixU4fxm0ZjOe/CJ2F9+vz/oUO 6QtldPYxe/Zn7dsMzeB7PpMf8pqwoFLFCGPrZjwPSM5UdXWnwXN1LeqV1MH8RXSsVGZp dY5jiqAgMsfZbTOGgJzuv/JGW2SfxYEashVRHg0SBs+iBCLuW53Oc44PdScxfygOOt4u pmvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Or0Bgq02; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 a7si17934plm.420.2019.02.15.04.35.16; Fri, 15 Feb 2019 04:35:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=Or0Bgq02; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S2394688AbfBOMfP (ORCPT + 31 others); Fri, 15 Feb 2019 07:35:15 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40214 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727843AbfBOMfM (ORCPT ); Fri, 15 Feb 2019 07:35:12 -0500 Received: by mail-wr1-f65.google.com with SMTP id q1so10165413wrp.7 for ; Fri, 15 Feb 2019 04:35:11 -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=E9XvbP3q/Notg42vlwN25xZrwhT5Enb4lH/EsK0IncY=; b=Or0Bgq02ZY0qWqKiUkzPKNov6a/Q4YjPvl3EGGQc5U3Kb08erVsAndV9zUC1DM2985 YRD5HtKTFwHzSw5q3yHyGONIFaq6Dvgp8tF4JVybWWSWxYDPXP3krYM62JroTbagB47j f6X8KxSUCvVJgoWHNa6+u2FdHEI1A+TezX3Tz1CTpQ2iFNKJMnJcK8lbVCz10jEexjEc I6+OJnQ69wwk8bzqdDW8WAIVldCPyCj/NgDSHIcQah4hagCExU7djTMgKFEDEl9Q/7rW eIBuIjBfkroSw0TNJTc/G+vKNoDyzYhIE+ORcH5wOp4k3BB5BuuBiQ+l1Yr3LDEjgN3c sAqw== 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=E9XvbP3q/Notg42vlwN25xZrwhT5Enb4lH/EsK0IncY=; b=hpX2ZJVc7RuisE4KGpibNqCoXdhkM5LcN8HGpR3UBkIQqRCsyMreYFo05APaExBLGR XjycNdyaYKT864x17rmkMIDWMJRmK/89WuiyP5bpaji2K+OpSKtN9LsezAjOvsn4xH0M 9LgcZcyM6lx8AbcxYcDI4wcDzoNh0wbhnfMg1GommewQJc5smTcY7DB+CwQlHUyvp9IB 4VDjar0Utkbz25AstVDNGQwFXr+kDwuyJk9AMP4niyXvtcVfv4NSHkA2dh3PvzVHObqJ heLpGxEbBCfMgvW5uvoGCVKkHFWwgqGPeSE6fEzRxEhooPOq0SNIoq6AoDeUPuj3fRDY nFgg== X-Gm-Message-State: AHQUAuZG50DgqB3J3vZz5uXRwlIq3bvGzdrligNkySW3fKMkQSTBIbqH S5KkThcCxF9UT4NVcC/KHCCdCA== X-Received: by 2002:a5d:6810:: with SMTP id w16mr6703382wru.62.1550234110537; Fri, 15 Feb 2019 04:35:10 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id y13sm636673wrw.31.2019.02.15.04.35.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 04:35:09 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Marc Zyngier , Mike Rapoport , Will Deacon Subject: [PATCH 1/2] arm64: account for GICv3 LPI tables in static memblock reserve table Date: Fri, 15 Feb 2019 13:33:32 +0100 Message-Id: <20190215123333.21209-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190215123333.21209-1-ard.biesheuvel@linaro.org> References: <20190215123333.21209-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Acked-by: Mike Rapoport Acked-by: Will Deacon Acked-by: Marc Zyngier Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/memory.h | 11 +++++++++++ include/linux/memblock.h | 3 --- mm/memblock.c | 10 ++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index e1ec947e7c0c..ada877f56551 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -332,6 +332,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 + NR_CPUS + 1) +#endif + #include #endif diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 64c41cf45590..859b55b66db2 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 022d4cbb3618..a526c3ab8390 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -26,6 +26,12 @@ #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 +98,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 +111,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 Fri Feb 15 12:33:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 158514 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp654538jaa; Fri, 15 Feb 2019 04:35:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IYr7WRHLHaee7M2+xRWL7BVmdeOwbEeoFJNdC85elm4fvECxcfVncfUTHGfZyckll/X4cEi X-Received: by 2002:a63:1143:: with SMTP id 3mr8984821pgr.447.1550234120907; Fri, 15 Feb 2019 04:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550234120; cv=none; d=google.com; s=arc-20160816; b=cP/eHldtqCyfvNs8tqLTWr1h0dZUXVxc8bWh5mmgj+BzmPx3NJ3UnQeAwQlVbvF1Qw 3VqNAMgHL+Zj0LutPgJDrS2V9zwr3Zg2wI0dHpQ0MaKrOtT7Q/Vcnc17AIDtnBMc0Ry1 X8/1208Eo4uP7Q0xd/3WlRivfT4iGwPIusHy92Y951pt+DIcqijJRh6NkjYDniSa8AUU na4HJ0QzradFjCOrfbnWkR4zb+HCctoSsdqzS5PsH14hjxPIiP8t0/2I7jxDCDJxLna4 iW7MCjkWWgLkn2WgEX1RlNXV+gp+5uECYfIUMtWIEaLmfu4SuBteb15wJsH9qKA/59qf T5uw== 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=MSWVPDeW6Y6e3BJiwHPZzYiuddTe78aLBSeVRNBTdIU=; b=dH4toHRguS9EtX/46cUN4aYop3fPImfGlrMZ3tW1O5sH3rYn/WP6KmTOF+VlKIZg5r x56GA6+o3fMlQGxVZB8pEGlp+6Wdo5kq6ZReBf0h74BAWK589I9+rQVC9ErLH9mTuZn5 Tb88ZTx9+DLFE0r7+wKtkUsHRrDnpk3KmP0hJXt+PPULstkch+rUPg75QT0Z97x4rSn4 Xm35Nm6EsvSUwaXqx79PQAHx+X308WNyJyV5oy4uJ0nuEFaS5Q9yqYIHjEDGcca3aVCJ 34D51gN2cxHn3Lvt1oESib2+r8H5uqAe/TtArNKEsJG9YIlUIuGsuekzKtF/X18PVQVf wuHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bXkaI2hD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 w21si5549151ply.143.2019.02.15.04.35.20; Fri, 15 Feb 2019 04:35:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=bXkaI2hD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S2394704AbfBOMfS (ORCPT + 31 others); Fri, 15 Feb 2019 07:35:18 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52742 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393807AbfBOMfO (ORCPT ); Fri, 15 Feb 2019 07:35:14 -0500 Received: by mail-wm1-f67.google.com with SMTP id m1so9790839wml.2 for ; Fri, 15 Feb 2019 04:35:12 -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=MSWVPDeW6Y6e3BJiwHPZzYiuddTe78aLBSeVRNBTdIU=; b=bXkaI2hDvhnNO685cjXMTl9TOoxG4WUy+qHiluxj0OGFHJq+7rZipSimJ7jrNtSG9r Sl7PaCtHqWSF0uuHMb+zLktaPsApxMDuRiyTgRBPEQ2JQTlEMA6vyJ+tkUCJ/A5i10MM tM5bx4tfQmIav9aLtYitKhxHeHMAyLc+YMqLMZ6uBxZQhFLeKA0qTjt7zwlQ03EJo+S3 vNSAA7ND7GdHMBM9pwtxcrYAj6npI9roSiQfpZTDeN4gvOAWLlR08BRoZfsuX1uZZ0Ac 5lk21fnOa7cUT31Zf27u1xdYwmGHhbkcdo0CMxCZDOa7vvkMN9WtHXan07LC+jyo/QRu 9JKA== 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=MSWVPDeW6Y6e3BJiwHPZzYiuddTe78aLBSeVRNBTdIU=; b=L1CM3d59mY+YFH5rlZn4eaw/zoudjqfTZ1MdknQRIGJJBKsYR+fL+3Yy3RyJUefuHG cvHIbt/m75Nv20F8BhNStK9k5UdEKXwgNJKFztFI3isM1vnS0WhSmhmDkEWh0aCpMGvj uCvwUkW28zvCskfOcTV0RIBNhPecADHwYQjyY8D3sidd22ys8LDnfHpzFvDQmxdwjFcs 9hUw5j0eN5AxSPmpDLqdvFx+AhkVD+vxhbbQQ0vWABDSsceEWoGiYx7UIUGnA4oaYDte kkJ3jEeNVnnuYqGEEA+K4fZu8/A3tgqsXYKhANxCUK8VevQyyFJKunqQDrVrCdMpdquJ W2Pw== X-Gm-Message-State: AHQUAubiLKhBxJdpKliFpDjPZqo/Zmg2PW9e+lhLBhmI7XS8ZNKkMYk4 cXOXyiGslvqNWwKjghR3a/gIeg== X-Received: by 2002:a1c:7510:: with SMTP id o16mr6412702wmc.38.1550234112073; Fri, 15 Feb 2019 04:35:12 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id y13sm636673wrw.31.2019.02.15.04.35.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 04:35:10 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Marc Zyngier , Mike Rapoport , Will Deacon Subject: [PATCH 2/2] efi/arm: Revert "Defer persistent reservations until after paging_init()" Date: Fri, 15 Feb 2019 13:33:33 +0100 Message-Id: <20190215123333.21209-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190215123333.21209-1-ard.biesheuvel@linaro.org> References: <20190215123333.21209-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Acked-by: Will Deacon 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 4b0e1231625c..d09ec76f08cf 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 4c46ff6f2242..55b77c576c42 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 eee42d5e25ee..c037c6c5d0b7 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 45ff763fba76..28604a8d0aa9 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1198,8 +1198,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) { @@ -1218,11 +1216,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);