From patchwork Tue Jan 31 13:21:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 92989 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1924092qgi; Tue, 31 Jan 2017 05:28:35 -0800 (PST) X-Received: by 10.98.74.84 with SMTP id x81mr29018875pfa.172.1485869315264; Tue, 31 Jan 2017 05:28:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72si15952408pfj.150.2017.01.31.05.28.35; Tue, 31 Jan 2017 05:28:35 -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=neutral (body hash did not verify) header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752551AbdAaN2d (ORCPT + 2 others); Tue, 31 Jan 2017 08:28:33 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:34974 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752098AbdAaN0A (ORCPT ); Tue, 31 Jan 2017 08:26:00 -0500 Received: by mail-wm0-f47.google.com with SMTP id b65so79135430wmf.0 for ; Tue, 31 Jan 2017 05:25:56 -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=b06rMXHp1y6ZUDivhdmHbFIS4N95db+VGoEDNKADRnk=; b=BjsvDWFuTzWrCaeRw6WFaQnwGeoSPJAUvU9Oj4H+F0D8d8ZBg0MZq6Ddu+1OHLTbxJ cB75DTS6vHZjOYY9A/D0bDwQ8zY2jVtq+FCrVbZ8Uk7AfLJpICz98EciovCkj/tjXFFj 7XoxN9jWFOE954OxTfAaJ3Qx13qT9igYPgnL4= 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=b06rMXHp1y6ZUDivhdmHbFIS4N95db+VGoEDNKADRnk=; b=qqU/Uc39n0ytu1n48BbUfIXuqHu+JdxEn1A9xhkrGpeksmdmKX7DSJY6tc9s1g2M64 O/LXePcHOR3dvcefvinHjcW4TH4FehE5iwUgM5LcucnTgvOYTVEusVl6NJ4JpqQGe7dC lzASR7oM/i826LCjr67+ZlxUjN2KrqxyPcIBetffzerErEARu/xMH58bGbokZeb7Kn1w KKU0vWhJcO63JwlREq7o3C88qOLY5nFa+/h4QSRCRxOp0BpEv+d4113D3eB3upSdIrII 7Hq2rq+RfSeBtesheWVN1NVklOP5MhbTKnvyAQznFQmiZRZTu4OJYZ64mH80P97R147A YwJQ== X-Gm-Message-State: AIkVDXLpXixQFqNYxUutMqcWb4sRRjhw4CNGfG9FemoDSgASXuQ7jnhD/I+Vibn8CnYdGa2C X-Received: by 10.223.176.142 with SMTP id i14mr28198820wra.4.1485869155424; Tue, 31 Jan 2017 05:25:55 -0800 (PST) Received: from localhost.localdomain ([105.130.17.13]) by smtp.gmail.com with ESMTPSA id i73sm23961714wmd.11.2017.01.31.05.25.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Jan 2017 05:25:53 -0800 (PST) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Sai Praneeth , Ard Biesheuvel , linux-efi@vger.kernel.org, Borislav Petkov , Ricardo Neri , Ravi Shankar , Fenghua Yu , Matt Fleming Subject: [PATCH 03/10] efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures Date: Tue, 31 Jan 2017 13:21:35 +0000 Message-Id: <1485868902-20401-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485868902-20401-1-git-send-email-ard.biesheuvel@linaro.org> References: <1485868902-20401-1-git-send-email-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 Since EFI_PROPERTIES_TABLE and EFI_MEMORY_ATTRIBUTES_TABLE deal with updating memory region attributes, it makes sense to call EFI_MEMORY_ATTRIBUTES_TABLE initialization function from the same place as EFI_PROPERTIES_TABLE. This also moves the EFI_MEMORY_ATTRIBUTES_TABLE initialization code to a more generic efi initialization path rather than ARM specific efi initialization. This is important because EFI_MEMORY_ATTRIBUTES_TABLE will be supported by x86 as well. Signed-off-by: Sai Praneeth Prakhya Reviewed-by: "Lee, Chun-Yi" Cc: Borislav Petkov Cc: Ricardo Neri Cc: Ard Biesheuvel Cc: Ravi Shankar Cc: Fenghua Yu Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/arm-init.c | 1 - drivers/firmware/efi/efi.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index f853ad2c4ca0..1027d7b44358 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -250,7 +250,6 @@ void __init efi_init(void) } reserve_regions(); - efi_memattr_init(); efi_esrt_init(); efi_memmap_unmap(); diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 92914801e388..e7d404059b73 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -529,6 +529,8 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz, } } + efi_memattr_init(); + /* Parse the EFI Properties table if it exists */ if (efi.properties_table != EFI_INVALID_TABLE_ADDR) { efi_properties_table_t *tbl;