Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp384356imm; Sat, 22 Sep 2018 02:16:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV62eKKfrKEhObl1KKTagwi7eaKxdlJ+gM0EpiSWKrIANzQ4w12vYP+S9rbQ8ltvykrOH2kMv X-Received: by 2002:a17:902:b682:: with SMTP id c2-v6mr253274pls.171.1537607792207; Sat, 22 Sep 2018 02:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537607792; cv=none; d=google.com; s=arc-20160816; b=E/laAobBD6wXEh+t8+fU9taTlhoVkGEGjVFxpCeQvEzT+f0MNQP1n5h9H49DPYLRwj 0web5j7ldxPf7xU98ic9RP//nk2K8VYfYcFf70GyQIWhCJuB+nr/YiLFYlj8IGolxffp DnFJPKTRFIIP6kvxPlhsK0jqSjL35mJwMHKlxgUardSlJoBCwznNyFqPv6tT+fFTDGeO KjYxj7l/NTUIQ08W9MNGnGf/VfQAc17ykx1f+OKMYACbOajv26/THFO0c+eT/bkgQxdw zbGgd+xFjVyBZMpOoXlsSCd8fc+lP1j/vF59RKJOzMkseZ0jozix491svkuOMDZkYFaV qzbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=knCMEuNVLwqk0cqNsBqPQ9gDD1CDPtBTwFYgkYgDIg8=; b=DD504LQzd6sXZJ8rAkD6jgwyq4q/b7y1PxXJ6cJyZKZgBADSBk7doURbafJFcUYQwf MBgznBkyoPXmypc+JwrgRWS39KMrKgyiiig2ait9zoQQTmEZvHTfprCmNeR2hH5Gj1D5 QEDmuL9NuSSJ9e+jx2OWo6G7pJPMmw4NF9hhHkIJl48FmsgT2HzteGaMZ3s4/Hummre7 rSrarPBRw9lId8aoiy32l6mdbaf1PwpvQU9m081yF6r9JDpGW1AJ3xBUF2aXeCIrEQ4J EdP5pPBiQl8k2laIigKe9qc1QTIXoTHKlMXXJ4dIeplUHRK9rZ5m0/SGqHU3k+P/pBEt VP6g== 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 w3-v6si21064153pgl.159.2018.09.22.02.16.16; Sat, 22 Sep 2018 02:16:32 -0700 (PDT) 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 S1727026AbeIVPJE (ORCPT + 99 others); Sat, 22 Sep 2018 11:09:04 -0400 Received: from terminus.zytor.com ([198.137.202.136]:43723 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbeIVPJE (ORCPT ); Sat, 22 Sep 2018 11:09:04 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w8M9FrKU2272348 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 22 Sep 2018 02:15:53 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w8M9Fq962272345; Sat, 22 Sep 2018 02:15:52 -0700 Date: Sat, 22 Sep 2018 02:15:52 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for zhong jiang Message-ID: Cc: tglx@linutronix.de, konrad.wilk@oracle.com, zhongjiang@huawei.com, mingo@kernel.org, bp@suse.de, hpa@zytor.com, x86@kernel.org, dwmw@amazon.co.uk, linux-kernel@vger.kernel.org, luto@kernel.org, pasha.tatashin@oracle.com Reply-To: pasha.tatashin@oracle.com, luto@kernel.org, linux-kernel@vger.kernel.org, dwmw@amazon.co.uk, x86@kernel.org, hpa@zytor.com, bp@suse.de, mingo@kernel.org, zhongjiang@huawei.com, tglx@linutronix.de, konrad.wilk@oracle.com In-Reply-To: <1536806985-24197-1-git-send-email-zhongjiang@huawei.com> References: <1536806985-24197-1-git-send-email-zhongjiang@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/CPU: Fix unused variable warning when !CONFIG_IA32_EMULATION Git-Commit-ID: 8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb Gitweb: https://git.kernel.org/tip/8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb Author: zhong jiang AuthorDate: Thu, 13 Sep 2018 10:49:45 +0800 Committer: Borislav Petkov CommitDate: Sat, 15 Sep 2018 14:57:05 +0200 x86/CPU: Fix unused variable warning when !CONFIG_IA32_EMULATION Get rid of local @cpu variable which is unused in the !CONFIG_IA32_EMULATION case. Signed-off-by: zhong jiang Cc: Andy Lutomirski Cc: David Woodhouse Cc: Konrad Rzeszutek Wilk Cc: Pavel Tatashin Cc: x86-ml Link: http://lkml.kernel.org/r/1536806985-24197-1-git-send-email-zhongjiang@huawei.com [ Clean up commit message. ] Signed-off-by: Borislav Petkov --- arch/x86/kernel/cpu/common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 2d5b1fa5f9c6..8bffeae9bac2 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1531,8 +1531,6 @@ EXPORT_PER_CPU_SYMBOL(__preempt_count); /* May not be marked __init: used by software suspend */ void syscall_init(void) { - int __maybe_unused cpu = smp_processor_id(); - wrmsr(MSR_STAR, 0, (__USER32_CS << 16) | __KERNEL_CS); wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); @@ -1545,7 +1543,8 @@ void syscall_init(void) * AMD doesn't allow SYSENTER in long mode (either 32- or 64-bit). */ wrmsrl_safe(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS); - wrmsrl_safe(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_entry_stack(cpu) + 1)); + wrmsrl_safe(MSR_IA32_SYSENTER_ESP, + (unsigned long)(cpu_entry_stack(smp_processor_id()) + 1)); wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)entry_SYSENTER_compat); #else wrmsrl(MSR_CSTAR, (unsigned long)ignore_sysret);