From patchwork Wed Feb 13 13:27:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 158228 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp72353jaa; Wed, 13 Feb 2019 05:28:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IYVrNf/ocTwawMYEyut+xIHCLbUaN/rcJWpR5sMPWQ4zZLjJ3DTmd+CNAlRmgC5Ptkt8Ofj X-Received: by 2002:a17:902:9a81:: with SMTP id w1mr528405plp.19.1550064523106; Wed, 13 Feb 2019 05:28:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550064523; cv=none; d=google.com; s=arc-20160816; b=BJGJYtQ8S4PKWZ6TsJbm5DiaXwLRuA4yOqknbhXS5hlgAdYm2UU3nxvslgytM3qmUf lr2Dz98byMj6MwKGjC/CJXADW7dKlKPZZ1saAEolpSRP5yaqAO5hD3IJlpf5nx1DO5zK ZGkic+emQyLcsuRvMMG2xrEI+WtkyS4XLxHJPYt8UbdESts4j27LifDFIwvqA90csvXa RlBy3Lej8ouROMlBucHl3oA6snf1eaMVo2XIq3JtQZFko7uzw9ZJf8F3qsAsLNCt+rXO OVAZmMW9ptH1jEoZu4UzJ+Te2UMEIxxHNXtG3yqdQpYe2Rw0yQ5T5i+EtBd78IbdAoNG IYDA== 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=Pcq+KlYpunIsRMvl5N8urLfnQtGhYRhha0Fk42l8s1s=; b=QUAwhkpf3RIC/ByKLGQ7oR3CfcT6j3sSnZDEhSIBDu5w+T/a3cH5XKUtRLsDSpF/MV 8i75vd7Y/nzUg0WOmQCb7fGgRmsQMULU8ZQe3Ea+L96YpDDzCNZZvKi42bFQcHVtxWJS q2kVb+mcCPBCLr2U1/ieHrtJb3P7JZcL1cw0dxvvWQElhSyq6ruTalnMWOfYKVMKm2GL X/1RnhmFwt7dlYO6aiBCC9fQdluk5EkdsPk7TmReiCEdgXsY7jRAj9BftxVsL88pNYkf tJON5ZhfGjSQpoi0IiQ6TGRBLLEo5fVvAmdSPVmUDLQzMuVIT4cOIah6Om1nnoMipP6l j56A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XaRXIc7e; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 g10si16074205plq.371.2019.02.13.05.28.42; Wed, 13 Feb 2019 05:28:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=XaRXIc7e; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 S1731659AbfBMN2k (ORCPT + 3 others); Wed, 13 Feb 2019 08:28:40 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40408 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730035AbfBMN2k (ORCPT ); Wed, 13 Feb 2019 08:28:40 -0500 Received: by mail-wm1-f66.google.com with SMTP id q21so2405736wmc.5 for ; Wed, 13 Feb 2019 05:28:37 -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=Pcq+KlYpunIsRMvl5N8urLfnQtGhYRhha0Fk42l8s1s=; b=XaRXIc7epzKjHIVTj6gNKn5+cxg7Ghkp8lZNxiYHbAyxUEaVN56j4iYJwSBGp4aE5+ 3QtsoOGwtDEjEIWOIxO1KELBeSJsoPvpZMWwAUZuWkbyE4hL/iaEYYytZI7LdiWJNp4F zBvvY+Cg6ZwoATNYw5MH5Bol6+5YIWz5bpQgSbmH95qUuNmW47KjjSJBZ0yhPWl3/7yh JPpMXlDJW78MtIMTb8ofOkCuN+g+myvHgWJD1FWwJfHAHrXvU72K/0lO18i4HwWZEBWN qH2ecbpVXEo0QXCAaOEjBKcKuOPjgBjuJN9UtejMwy8ysfzsSZ0ljex08BxoljXBg7NW WNCQ== 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=Pcq+KlYpunIsRMvl5N8urLfnQtGhYRhha0Fk42l8s1s=; b=MgVWtqUnV0TSJpLBgucCpyYpoohp2iK/QhYH67RUES7yPI2IWt1Au/ftaUcL8JG6Ty EWUYZUFMk58lLFeGi9gJFpmNE0KytWD3b07UsxEUKiSqST6DowUhN3isBkM6G2Ahk2kY +ru2vtdp937isltTp8tpUGnrWaP93gWZvexpqLIpvoLjCijh15rB91oK38JY1mJFD8zc /9xGWAL5nRbalB3OiKvN5nxg6udzksU4XQIMcmdyhSsIcPExHj8bIXfE5oL9Iys3JxCq PeAitjNI6THqQtN8381rglsRFcmShQPWcq9kIw81DHubPBHejAWCECVvHYcnlReYRo+Z tRhg== X-Gm-Message-State: AHQUAuYhI1fq6u5xbgcAt2UXXkLxXRJosJulZxNCrDc6sbINryZ9949p Ua3wtIgUlRos07nGPNM4phcmm8KGZUA= X-Received: by 2002:a7b:cb4a:: with SMTP id v10mr339024wmj.1.1550064516723; Wed, 13 Feb 2019 05:28:36 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-27-200.w90-86.abo.wanadoo.fr. [90.86.252.200]) by smtp.gmail.com with ESMTPSA id x3sm22841195wrd.19.2019.02.13.05.28.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 05:28:35 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Catalin Marinas , Will Deacon , Andrew Morton , Marc Zyngier , James Morse , linux-mm@kvack.org Subject: [PATCH 1/2] arm64: account for GICv3 LPI tables in static memblock reserve table Date: Wed, 13 Feb 2019 14:27:37 +0100 Message-Id: <20190213132738.10294-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213132738.10294-1-ard.biesheuvel@linaro.org> References: <20190213132738.10294-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@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. 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 Acked-by: Mike Rapoport Acked-by: Will Deacon Acked-by: Marc Zyngier diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index e1ec947e7c0c..7e2b13cdd970 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, 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) +#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 Wed Feb 13 13:27:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 158227 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp72344jaa; Wed, 13 Feb 2019 05:28:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IZnWlXA6OMcKQjnY9IM4q+CiMWrsF/9fRTyh7B52A0MR+o8KX0T0DAydGnDt4NNwBaDHuUU X-Received: by 2002:a63:460a:: with SMTP id t10mr508534pga.284.1550064522515; Wed, 13 Feb 2019 05:28:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550064522; cv=none; d=google.com; s=arc-20160816; b=xqKmqjGxNvfyC1v1bLsoyxjxv/DUQTcPk5zLAf0Qbf5ujlCCy4IuzHVBsPjpANgXtc RXT/ZxZA5BcrokdglE555ygoeARX++sX2XOmOUtFeFNzsrIZXcn3n8syirc3RF+uM3n+ 2R9h8DS+A4Q48IJsGfuvRO5jXng0tJXxp+LlwYnW3JZI1Gc4nJka1UgZKhAi1xC68FYS 0kaIhZbqVEcjiCK8A42l7A3xj+3SB/VNd/jIFKchHlA8g10aKrKs+q2rFFxK5tJL/Q4I wq0F5uyHznDmrvtGhocrNA5vHi4NFXN+FqL2FabUIos7SUjENBkaJt88g18kbdR5h7Ec 88Uw== 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=SvFSLn76SFJDwEu/S0bVHnKlVxmVyL4jfmZ7pu7W45E=; b=zSU9FEI2hwyT5A36PTrVzaZPoUPeN1mQKimX3nJD5SUmhNJ3LKJyvM7txRhSvv2Y7x cEK9AoI2TYfGMx6uTyH5TLJ1YX9PXNgTTJEmqxDwR3g8UP2skKJ6Ktf9UBmzK5jdkoaP dSz4E23xXv9vob3D0iNWXzI5bZG8+GDROi66MNre3FHvBJDnCsg7saPTpfDwQoKp78/l 6iPnSa9YckO/KYdQUgN08yrErNE+oUeBV25jJ5rGsFV+hRLJzHO3Lpc9SkqvczmiELMu XBSOZ/h2lCS4GWHrZwXLQgIERgXtx9UOffhVREq6L2s0qQKKwpyOd/62IABccbkjSfnf odxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nYNHnr2Z; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 g10si16074205plq.371.2019.02.13.05.28.42; Wed, 13 Feb 2019 05:28:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=nYNHnr2Z; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 S1730035AbfBMN2l (ORCPT + 3 others); Wed, 13 Feb 2019 08:28:41 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43870 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729862AbfBMN2k (ORCPT ); Wed, 13 Feb 2019 08:28:40 -0500 Received: by mail-wr1-f68.google.com with SMTP id r2so2461793wrv.10 for ; Wed, 13 Feb 2019 05:28:39 -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=SvFSLn76SFJDwEu/S0bVHnKlVxmVyL4jfmZ7pu7W45E=; b=nYNHnr2Zsxh+UaDXNN6yzU0ly6IkH762vDdfRfYhFGRyB9VVEUhGSKXoIhjVWQ29Bt l2yS5gAG5bivhvIuH0KftYXcDIWlzChYzt8+KrCFslMDBc9AieVDkLJ84502Gr6BKIUv 74QqC+GSpz2LRAsaf+0fS+l0UCI4NBnbriNKoblA6yN2j4sTfAZYqAxr7bkQ+Pc6a7z6 wc6XYmVEWEcK/Yo+ukBHyLnIlHl8bULoeyucuYm8aaN4NS4MdkhKx0wukq6yCP/kZcZL 2eZLLQzFUC3BFc9hN1aD2HD1GE2dpll2qP3LLEGP6wmqJfLJeYp5NXI0lhY5YG7sV3sb Wt7w== 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=SvFSLn76SFJDwEu/S0bVHnKlVxmVyL4jfmZ7pu7W45E=; b=H6NWB7UVwC5BLC7/qT5e+sEAEs8wc+FUSgRxOBCBKA0sfWsJCdMOnDC1TY2q2J+bWK tVij1/EU5otCxDYSV3y/Spt/EcBHnFueIcYtsTzUJgoSICeu47+8e5cxfyHklXsUdO82 eH12o5UuZvafeyojdLPVUz8QlF4YXNPHr4rYYbuTwvdzFxL+XPRHZxNbZiEI1H1S1IKJ pXFO/OGT0joE/uQvxnBSArpWjH+Oah+pMtjGAsda2Ij7rr8pgL7KsFu6JHRVf87jwxgh kpWUZ7x6EdS230CwOkwUPXOiKRrNzTTsxRYWhJO57lVe66zhYpz9x1qPJZkd75/Uksfy joRw== X-Gm-Message-State: AHQUAuZ6NIzZOp3pl9QLqqRK181i52PDHMrz/Mwi6P30L2bICgYf9Y5o V31rf8qc2Z3/s68FCiW8BKU6dh2laKI= X-Received: by 2002:adf:fa0d:: with SMTP id m13mr402593wrr.93.1550064518026; Wed, 13 Feb 2019 05:28:38 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-27-200.w90-86.abo.wanadoo.fr. [90.86.252.200]) by smtp.gmail.com with ESMTPSA id x3sm22841195wrd.19.2019.02.13.05.28.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 05:28:37 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Catalin Marinas , Will Deacon , Andrew Morton , Marc Zyngier , James Morse , linux-mm@kvack.org Subject: [PATCH 2/2] efi/arm: Revert "Defer persistent reservations until after paging_init()" Date: Wed, 13 Feb 2019 14:27:38 +0100 Message-Id: <20190213132738.10294-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213132738.10294-1-ard.biesheuvel@linaro.org> References: <20190213132738.10294-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@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. 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);