From patchwork Sat Feb 2 09:41:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 157327 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1509795jaa; Sat, 2 Feb 2019 01:41:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN599C6FKP+HOU+rvYQ4tH2vw6PP+Hgds8uFbnXNMkxdhKC+0PuRBW/Q14va3L68afstOr2q X-Received: by 2002:a17:902:7c05:: with SMTP id x5mr42442702pll.273.1549100492702; Sat, 02 Feb 2019 01:41:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549100492; cv=none; d=google.com; s=arc-20160816; b=dJ7fKBoXYx772aPLC7NU77Ss+2LxPgjgPCD+FHIpkeb0JtUjGeYrnFSMXUf10CdQG2 PSMpIWHG6v0XXvUeO4gr0jaq55odQbxyWAnJ70DVGiodnJigg53V6EHk7vDQu9zZNpVV 9qmGnAWl8czHljGlM2HffKUrlOa+TclSLH0Q3wffnzacpHxjfNstQKgm6HDEJZjp0iNa CAq0Vv4lmJ5PkEDQiIvr15xttpczmhEY3GdMPizBivckm9z47d6U6PU0MK6d0FlQRuTr ABHUKmCNmD7bJ7NK0g6mLYELM96J7XSQF5WPgRssfsEAO+s80rNj7kcZPWg7z6NMj6ny 6xsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=5ao+30GUUv3JmbT29dbzmjqtVn+kpmSTNQBPMeuNpw0=; b=IZrZuPr/qoiSpOxVTzoelpXD/BQRiswDwLLT2qhZNXSv7nd5t0mILXAKf9T0IUM7M6 ZuMajhay4e7pdpPAonVLIFmsCIbrqVeNKo9i92PG7sQfqbrR84qXRUfVukYe21hOvnDs OIIdSbcShuycrLT2T9bC86A2sotBnKn2I+lT8LNdomunHUqwCn9ARk68+NXrtOUhO7+G n2Ssf8mrnzFCmd6JI0ZyosazUXWL2g3mvHAVD1NeRQGVwdCdH/Dg6W82BotzhT29NtiY ykMCawrlZJB9ieQ8FF6ZxX2c9IHt7Zg4Vw6qt99WbV8u0cYN+6BcqUu01x3mp7xpdILm ncjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QtL/btXv"; 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 b3si3545331pld.282.2019.02.02.01.41.32; Sat, 02 Feb 2019 01:41:32 -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="QtL/btXv"; 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 S1725857AbfBBJla (ORCPT + 3 others); Sat, 2 Feb 2019 04:41:30 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:41322 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbfBBJla (ORCPT ); Sat, 2 Feb 2019 04:41:30 -0500 Received: by mail-ed1-f65.google.com with SMTP id a20so7453997edc.8 for ; Sat, 02 Feb 2019 01:41:29 -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; bh=5ao+30GUUv3JmbT29dbzmjqtVn+kpmSTNQBPMeuNpw0=; b=QtL/btXv+JQejhbxpnCT/+uaHPxfhK9CQdc/bjQyvOIzCvoxLQ7yjdqOPuu5mnWhG/ TnYWSMZYJv42Lf1xev1Rj0B/OBJ47rUtPxc6KdVrrsk84d2pR8OJ6lbWc5tmL6lbA/dq r/0r6OCF/p5JNkmMo/78bFLebXYKu92zd57Go= 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; bh=5ao+30GUUv3JmbT29dbzmjqtVn+kpmSTNQBPMeuNpw0=; b=gMtOedFa/s0yuXtSpyUsXxqwapT2LzM/D56jww7N78un88Jb9bQb4AhOyTq0n36eCN nO6CSqwtxEvSEBGjkS/hHStYN/SgHnco3jt+RrT6NB+4cn4ltYUcVQKv6y/+/JOEQL2J jWYrnpTd1qbN5ogGiY+05D8zN4GYpiHe+cX0aALdh5AeMj/fOxDKYN5L3/7J5e8Qee5t 8lCh3SPWvSWPF2Rv0q0SLaepMkKMHGs54jwEIDZqbS2isiu3jdIjEgztSLCCgVWIwQcm R77SKUTMBgEY9bryttYnrDIRqfz4xVpJAMW8i4WujykMlAEZzcQq/PudpGwLZr8wL5Pc iWUg== X-Gm-Message-State: AJcUukccd8SQU9Cy9IfQIp4/p724H59ixbulyV4YY3gwPsse0Tp2wqqH 3pF9HNPpPX5JPV/XmptdiNhXMyuuZvkIUQ== X-Received: by 2002:a50:c9c3:: with SMTP id c3mr42040854edi.56.1549100488380; Sat, 02 Feb 2019 01:41:28 -0800 (PST) Received: from mba13.c.hoisthospitality.com ([109.236.135.164]) by smtp.gmail.com with ESMTPSA id l41sm2608824eda.83.2019.02.02.01.41.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Feb 2019 01:41:27 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, AKASHI Takahiro , Alexander Graf , Bjorn Andersson , Borislav Petkov , Heinrich Schuchardt , Jeffrey Hugo , Lee Jones , Leif Lindholm , Linus Torvalds , Peter Jones , Peter Zijlstra , Sai Praneeth Prakhya Subject: [PATCH 01/10] x86/efi: Mark can_free_region() as an __init function Date: Sat, 2 Feb 2019 10:41:10 +0100 Message-Id: <20190202094119.13230-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190202094119.13230-1-ard.biesheuvel@linaro.org> References: <20190202094119.13230-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Sai Praneeth Prakhya can_free_region() is called only once during _boot_ by efi_reserve_boot_services(). Hence, mark it as __init function. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel --- arch/x86/platform/efi/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 17456a1d3f04..9ce85e605052 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -304,7 +304,7 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size) * - Not within any part of the kernel * - Not the BIOS reserved area (E820_TYPE_RESERVED, E820_TYPE_NVS, etc) */ -static bool can_free_region(u64 start, u64 size) +static __init bool can_free_region(u64 start, u64 size) { if (start + size > __pa_symbol(_text) && start <= __pa_symbol(_end)) return false;