From patchwork Fri Feb 2 21:39:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126767 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1013874ljc; Fri, 2 Feb 2018 13:41:29 -0800 (PST) X-Google-Smtp-Source: AH8x226npjWF7Y5TuJhSqa99nGld8Im34SveXtSwkxadBLMdxikd94tMeFotIXcHnM2IUq7bcwl1 X-Received: by 2002:a17:902:d905:: with SMTP id c5-v6mr35489249plz.225.1517607688976; Fri, 02 Feb 2018 13:41:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517607688; cv=none; d=google.com; s=arc-20160816; b=gw/xm7ISuXUnrQUJWSb2AYx3rw5G6Ni6KmXY4GX1IzjQLCGIuyOVDdkU9UcUR0zwxE JzHFuEVHBxtHnwLGnkep8ApiuhNqEX2VKez0adtQvwO3a8FHt88F81YllF4y0TJXCmis XfRa5rV9+EYC/zXgLjVpp0NpSbphldYGzr+g5fxcnklvR1uorpW3He3G7hDOO2vTUTFd W84Ih5DNaqsO9yhSFMh6WCOZwnN3+E6MakEIjdCIZZ5WDAdByGE2eqyYwAQnx/epR248 //zDQ0NNKno1So6fPu/4M0bj11Luaw4LVRzu8FZFzYt/FUQIR21NdX2b0DlCXXtuMfYS ygjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=VF2cVLY7RIZ0qzQAOg3Qcc6uQsXCXa03B2gUGLkzOLE=; b=L1Zm3oJJ8sG08DHtq3J7Mn/I8xWKIqbMeDyWQyGM1wAzpK32Ys7dB/tr7LHm0wuIaQ rCj4XqA8GmKLhjkCfOAOh7huVQZgq+xoaTUc1BYGTEgNyYtcFh+St66ByN/iyyQwJfhu j7bcmU1aBa9TUXdu1RUobSiZOzivlaroV123L1IKeFtZY6H9gXrLWYBbg5gqpraHsWu3 e2FLsYE+HjXxyohVTf/ZAJS7nxNJCF18ty4z0woDfvNVuOOuJBUn8Aix/64VejTQjMbQ BBPBN3ep59AnJAC44c6DbIQ/AQVDf1XOZgTasJqm6UKf0Nvyh7V5IlQbCq2nTIMX0xCQ CqhQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si1897416pgf.382.2018.02.02.13.41.28; Fri, 02 Feb 2018 13:41:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbeBBVlX (ORCPT + 28 others); Fri, 2 Feb 2018 16:41:23 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:64324 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbeBBVlT (ORCPT ); Fri, 2 Feb 2018 16:41:19 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M7Jry-1eu9Za0wKM-00x0XG; Fri, 02 Feb 2018 22:40:04 +0100 From: Arnd Bergmann To: Thomas Gleixner , David Woodhouse Cc: Arnd Bergmann , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andy Lutomirski , Borislav Petkov , Thomas Garnier , Ricardo Neri , linux-kernel@vger.kernel.org Subject: [PATCH] x86/pti: mark constant arrays as __initconst Date: Fri, 2 Feb 2018 22:39:23 +0100 Message-Id: <20180202213959.611210-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:m4GIYtw6XtgeCXtsJbwN85wSnXgkv1RPmudxYTlGZyM9DcbInPT TVV2fX76GwPEudTn+17woi0Kf7IpVCfr/ALoGZsuGzP2SFTT6sapQMPE5MK1SKLeud+4drS +v0fJ5NNFtd32uti8ApJiTEZAaaqN4b9xILPpKWbNi5Fl5n3wBRo04NHvbnF48CurY0NO6j VkGj8tM1CmVdcNV433AYA== X-UI-Out-Filterresults: notjunk:1; V01:K0:1dKBqAaUn7g=:VCmDtQRbRTcR0ChFjLEO4t CDBVzKB1YrLdK0405FJBgZLFiqEUW0LjzkyeCMOUCWsBmtK2zAitPhud5DBCsPmal0PSEAiDM MbpEwSefdABDcq/bpin9VlaRiVU4lwfuVMN7J/RD4u6YdLS9V1HPXYcFnEGfeNavOyN3bWn7H 7CsVis0a83rjGcAtwRwUw6HuV/LSxjxbOu9yQEgG5a39gFp40OJZIcN9EWpDfXrYf4ySgXZCx 2lpizFoo7e7K/x/HnBIQI5FO6IHatGwQvvJY17PyMjnhgrHGBFvbQakLz/LTTLX9QcB8QPqvc Gd4opYYkwdYIAIZ0eYmHJ0BXXTU4lVAjkWpxK8H0OYv490YDZ5dxg5FSrhj1LHQHr8qFW5rsW FxYVJFy+5iP6TCig1WU8aH/g4jWn+W26yALxp9iXJ0ZVzRC6lTCVDGPTfccZKdyPwSYTlBVrS STMqDuTLXK4OR07vM1cp+V6CPET1ZX/txaXq/rx37pAAkWnEzF5i37/wLEHQdVidK2Wsk4CjN QDLqFaMqQrm4e7z/LAvcwVoMvjP4Q3iej/aqnsv9SOcpOJAD8ZYHDT5Hb201cXcaw5rlB/MKG wtXtzaH3xIie6Z7W60d4Tj+bVziDeR0eF81U4RdoAR29q+lrzsnGDG/7t/TelERzNUnaW4QZ7 Tors2iCXfBDZ7lcBW0JAdsKhAeWEG8Ls4q8cq+YTTBD89TpGNO89OxpHabKlOVMcA++wjQocD wxXyBpWAFZK/oZKbhQMWkZqfxG9Pokxn/0VjBg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm seeing build failures from the two newly introduced arrays that are marked 'const' and '__initdata', which are mutually exclusive: arch/x86/kernel/cpu/common.c:882:43: error: 'cpu_no_speculation' causes a section type conflict with 'e820_table_firmware_init' arch/x86/kernel/cpu/common.c:895:43: error: 'cpu_no_meltdown' causes a section type conflict with 'e820_table_firmware_init' The correct annotation is __initconst. Fixes: fec9434a12f3 ("x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown") Signed-off-by: Arnd Bergmann --- arch/x86/kernel/cpu/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index c7c996a692fd..4c3887a09822 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -879,7 +879,7 @@ static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c) #endif } -static const __initdata struct x86_cpu_id cpu_no_speculation[] = { +static const __initconst struct x86_cpu_id cpu_no_speculation[] = { { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CEDARVIEW, X86_FEATURE_ANY }, { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CLOVERVIEW, X86_FEATURE_ANY }, { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_LINCROFT, X86_FEATURE_ANY }, @@ -892,7 +892,7 @@ static const __initdata struct x86_cpu_id cpu_no_speculation[] = { {} }; -static const __initdata struct x86_cpu_id cpu_no_meltdown[] = { +static const __initconst struct x86_cpu_id cpu_no_meltdown[] = { { X86_VENDOR_AMD }, {} };