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: 10809837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F34611399 for ; Wed, 13 Feb 2019 13:30:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DABA02CF51 for ; Wed, 13 Feb 2019 13:30:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C96532CF60; Wed, 13 Feb 2019 13:30:01 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 5E7502CF51 for ; Wed, 13 Feb 2019 13:30:01 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=YaJlNOcfmdOP6FMZi6bKaBuJVMzu2y0UY8ncf7Saiq0=; b=RCnxZRwMtDPyzq Mza2UmVQSO3EUMpKXICVq/O4Cqs0iFLhNDmj/YuueJUAET3CEHm04lXInWcQOy6QQBf9uu97RWGnK +es4dx4hfo5yBoV8b31q8+eWFx968x5mGN2ZGnzHhqLkHEVMkTlHQ+VY9tfOtoe0VxlgMIsaqHDle /hbsUlTR6SS1Fjag99GRxOFKWgmYsxZ69b+Gxu/gwZ1LjUgDMdekOqlOK2DKvMa5wJY6wbcjN6wHR AHcw73+Z3h0LGgEwCOEYhfadFdnUpWRH0vit12ZLuUR0OKTXikRhBpHFeEu8ZvTZ3Lqo+qDH7cz+Q QBQmu3mOkZmiRCvcTYaA==; 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 1gtubq-0006yO-MG; Wed, 13 Feb 2019 13:29:54 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtuac-0005Pk-7q for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2019 13:29:09 +0000 Received: by mail-wm1-x344.google.com with SMTP id d15so2450039wmb.3 for ; Wed, 13 Feb 2019 05:28:38 -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=Iy87esLJV4ZHoAuzU4xGNBRdvw12SHxp3tCX1O8xaws1UP+FAMBeSA1pk5XhS1MU+p +s4w9A4lBbFr5cI74RLozaR95jVvYLhg5MTuEVjHGpn6RdJi0uAWd18YEQxi4AToDzPV hl1UJwckTDbCnGripOAyuwlN2jm5qe918GLGVn7GF02G34NkNb0xU99O6gyh1mvzhVEQ dw/MKmjq9hbLRrnxu2tKurxlIYQUSrlc9qxNF6EBHKhAsrCeWxWowHqUBSqh9oRErXFC wMH+/rBCPhnNJDdPuZQjPeQTa6BvnBZ0cnmD8IljYJsMeZmMJ+mp1aTJyBQZXJZ9v+pG HBrA== X-Gm-Message-State: AHQUAubvgRbwTSyxL+mPtYYxpSu/fnf18sCFu4XxJYrB/Uig3AlE+iFG 29Ud/FNLHnF62f7LuI5coKn/Cw== X-Google-Smtp-Source: AHgI3IY0TrtAJNeV0o2sh6HPQrmepOLdzsvm4n2ugw3Q2kVjsFtdv4NzUra2Yf3t/+68plO2RUDw5A== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190213_052838_856792_BE1C9603 X-CRM114-Status: GOOD ( 17.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , linux-mm@kvack.org, James Morse , Andrew Morton , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Mike Rapoport Acked-by: Will Deacon Acked-by: Marc Zyngier --- arch/arm64/include/asm/memory.h | 11 +++++++++++ include/linux/memblock.h | 3 --- mm/memblock.c | 10 ++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) 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: 10809835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 283E86C2 for ; Wed, 13 Feb 2019 13:29:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 143642CF14 for ; Wed, 13 Feb 2019 13:29:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08A6B2CF33; Wed, 13 Feb 2019 13:29: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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 AD8E82CF14 for ; Wed, 13 Feb 2019 13:29: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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=9b0WQ2pNKY49M5O1cmyqXP2lNe3nzyH1iRrGNTCJFDk=; b=ODzfroYLBDDZQT qeHt5xQOe7CGH2Gm0xpwzwG6yDCR8jsMx/cOl7+HRur2ca0vnPUVp7I4hbk5aYfxnKYO2oR2Ir6n1 uF2O/p06EHIi8UpW3XbKRq8aA9DcBV7HsUzz7ztyyod3wnI/smzsD1PlDfnoS0KmHf7jdXPXpZaDY xGU7J84VUea1DKPro36jFA83WOrpdvPY3ySHCFupocjrHk2wAL2pLpzpCyBVuayOsCeD6pSE/0R41 iMw2HOL5+t+M4LwdwoQGBg2Skg8h6I41xElixodTyvgEbb0TNbpEyjBbfje7LgrqoH9AIpxM/8jls gsL32gZoRDLUlGeSTTxg==; 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 1gtube-0006jA-AK; Wed, 13 Feb 2019 13:29:42 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtuad-0005RU-R4 for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2019 13:29:09 +0000 Received: by mail-wr1-x443.google.com with SMTP id l5so1409559wrw.6 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=QlanOSN7UY+Xbp+1mwaLUgeZ21CarPP63YXL3pUxBa5oC44IzHqT1x18kptv3Bbp1n besAhU2Q1mG5NIFeYdaCXGZTnKM9jylBY0/ld8dW99eZMWfaSCYBuIIJlqBdNTbUq+8L H1yNbWDhXFyykV5oE550jGkrS+awBcXu2xrGjvz7/tY/gxd/i21DeSv87Ur2TFxc9lEO 3p9x2ml5TmjVou0Zc3Px4V07zOMCL44vrY7/dt7w5mP3Jvam0aOPrEPSuK/5qCX6Vzoi m6QaSMvjynegt0+/Fty1Wnjfga4rvnAscWMMWxfgVn1gTbSekSzLvVBpOlgm46kCsscU lsdA== X-Gm-Message-State: AHQUAuYiwrZhoyYWulNl33NglCKBMyituc5QEs0+hKh0MX1cVIpP2jiX VYJ04GMCdhNqie7OLfrphvZ/tA83X3I= X-Google-Smtp-Source: AHgI3IZVubh1ey1AnRQ8u+x4lnSZlgsf8/ratFtS4LSrAz+twyaMAqm54+WCe3g/zrNVCc7jXNwozg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190213_052840_362702_5AACF5F8 X-CRM114-Status: GOOD ( 12.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , linux-mm@kvack.org, James Morse , Andrew Morton , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);