From patchwork Fri Jul 13 21:53:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srivatsa S. Bhat" X-Patchwork-Id: 141948 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1276318ljj; Fri, 13 Jul 2018 14:53:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdDAeOygpdQtBuLb6U1InCpkjoeIbCQUl8RgEf/KveJ6pLl3DQsyKfYl1NN+xiqcc2NFKJX X-Received: by 2002:a62:6cc7:: with SMTP id h190-v6mr8827067pfc.113.1531518804284; Fri, 13 Jul 2018 14:53:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531518804; cv=none; d=google.com; s=arc-20160816; b=zwOgV/l55suuRzOehSftX50Hi3H24xIeGfBApq+mSC8ObLrl5LRwkE0ATTNXjKxTnl C6epxNpeXOuFPZDflL8aNEo0Lc4aE1UJEriQzQN5K07fImuqByjsjT5MwfrzH+5X4Xp7 ihHIbNGxr7UcGAzLCk7rZU/P+fEHGtm45AGbpSg4Zi5//B2lJkl3qXZAWRllshxJv+Cd zMyoqCgw5R592lxMHoyK3OWsoZKiccHlNLADclalYVIYYF4MLohhqakQK0A+lgguMLM1 OqE6o4mVGlhs0STRejrov7VFQQSL9rNdSiseBYfjQ/t5p5dZmdAQxfCgug5z42pYEmkQ /EnA== 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 :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:arc-authentication-results; bh=+F+zIkPvjVoZWO0R+/sa3vKk+VLvVCkW5r5EQ4wgnc8=; b=gM+RB3XuqmMJ86Kok14oM6eK/J6alkm+QVFyfcdjkJmTF8G4bUBdfHGIAjILWAyKFV feY6kWuni0kvVxvhkPu64w9P8IqAX6drPKzI77EN8P+CUp4d+tDdKFxmek7c8IMJFnpv dqpUTVxNtDZGVBCSx7oT2aWr8SMcSro3w8QjHXSWFxW5q2vpANNvur8tC9UVDeu4x1xb UkarRUtgCKrpu/iSf0PwGwnSS3MF6CtL24W+lat2krjvxBkgFO4rS/aaKnErTut8e6yc IrAjuk7AjaylNgOVyqJDntnzFVh2qmUJe51hT+R8+1Md4+OhWeLR7cpqSGQw7r1sWCu2 5yjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=csail.mit.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12-v6si25896144pfd.142.2018.07.13.14.53.24; Fri, 13 Jul 2018 14:53:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=csail.mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729580AbeGMWJv (ORCPT + 13 others); Fri, 13 Jul 2018 18:09:51 -0400 Received: from outgoing-stata.csail.mit.edu ([128.30.2.210]:56531 "EHLO outgoing-stata.csail.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbeGMWJv (ORCPT ); Fri, 13 Jul 2018 18:09:51 -0400 Received: from 67-148-5-85.dia.static.qwest.net ([67.148.5.85] helo=[127.0.1.1]) by outgoing-stata.csail.mit.edu with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1fe608-000OOi-OS; Fri, 13 Jul 2018 17:53:20 -0400 Subject: [PATCH 4.4.y 032/101] x86/pti: Mark constant arrays as __initconst From: "Srivatsa S. Bhat" To: gregkh@linuxfoundation.org, stable@vger.kernel.org Cc: matt.helsley@gmail.com, rostedt@goodmis.org, amakhalov@vmware.com, ganb@vmware.com, srivatsa@csail.mit.edu, srivatsab@vmware.com Date: Fri, 13 Jul 2018 14:53:18 -0700 Message-ID: <153151879869.3735.9531322024832565589.stgit@srivatsa-ubuntu> In-Reply-To: <153151823230.3735.18244399631072601187.stgit@srivatsa-ubuntu> References: <153151823230.3735.18244399631072601187.stgit@srivatsa-ubuntu> User-Agent: StGit/0.18 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann (cherry picked from commit 4bf5d56d429cbc96c23d809a08f63cd29e1a702e) 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 Signed-off-by: Thomas Gleixner Cc: Ricardo Neri Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Thomas Garnier Cc: David Woodhouse Link: https://lkml.kernel.org/r/20180202213959.611210-1-arnd@arndb.de Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman Signed-off-by: Srivatsa S. Bhat Reviewed-by: Matt Helsley (VMware) Reviewed-by: Alexey Makhalov Reviewed-by: Bo Gan --- arch/x86/kernel/cpu/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 72d7e5a..48499b4 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -817,7 +817,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 }, @@ -830,7 +830,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 }, {} };