Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp413784imm; Sat, 22 Sep 2018 03:00:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV60HWiwNzwYKctD3irQ4XUth/jSHXOR5yAWvyyZ/XEs7NNhdAqFtY6jtAePqFHhsGwi3gjvq X-Received: by 2002:a63:444d:: with SMTP id t13-v6mr1699465pgk.102.1537610420773; Sat, 22 Sep 2018 03:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537610420; cv=none; d=google.com; s=arc-20160816; b=A96eXvXPP/Y84q0WmSesg1HMMpxoDk0dnsFF+7N5mPfUKNqvM8yG9wfpdHlJEXs3oS yDfW3EYfcZIcR1xXVb6CFGZjAykVUPTup2ng15ARjkdidgzrltx0z6TqGcOBhb3+XjHF QhueUJrwNzkQW4rZ9kvD3HusjPDtYCL0jrhdhW6ivpXy7AURQamP6yOy3AiwofN4V13L qjVlPEYU1q8+nZBa8/a6QdxR7z9Er+2mGy9bYQ92N4nwPYbmkOxs3Yc3/TeYZo0F3aKw 7uGKJuBsDLBIUctilCQkB2NiBTeJKej/SJ9KzcCxUDvUN8iNNbKG5rts2kEFK9Sjifi9 4m8w== 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=Q1SJVhybk4WRDASwbuZXajxBO2Z2JlVzMD7HBQ5PlAU=; b=bUoPA7ye+7mUD/VazA4Ec0yBUsGnRnYHT5zG2wZRjF1fvgb9f6z95I8sstXhh5umaV Ik5VcQEu7HxPS52J1Shf385atWwCOzMcRDOU1yg8WI/JcSPdnZlA2zA1IpAXxLM4CIY4 TB2AzIo4sCoyqKTBadZ0F1+Ka3kMGJEB5LsYy4OHmgRDUFht4tKk0MRGzdH5su/ceHcT slx56xa6UARuPizSFNDhpu6hnuNS+pXpkqKkuNX+Uj9hzxKNUgP6i+AO8kmsW5+Sv8hP ECy0/fKlD4HoLlIRP0/7pdAu4jI7EVdzGhYXckVd0vQYVWl7ilVVw+SoBnOep6RIJatJ BSHQ== 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 f21-v6si29351252pgk.418.2018.09.22.03.00.04; Sat, 22 Sep 2018 03:00:20 -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 S1728073AbeIVPvn (ORCPT + 99 others); Sat, 22 Sep 2018 11:51:43 -0400 Received: from terminus.zytor.com ([198.137.202.136]:36515 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbeIVPvn (ORCPT ); Sat, 22 Sep 2018 11:51:43 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w8M9vrKu2281087 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 22 Sep 2018 02:57:53 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w8M9vqPE2281084; Sat, 22 Sep 2018 02:57:52 -0700 Date: Sat, 22 Sep 2018 02:57:52 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Matthew Whitehead Message-ID: Cc: qianyue.zj@alibaba-inc.com, mingo@kernel.org, tglx@linutronix.de, luto@amacapital.net, hpa@zytor.com, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, bp@suse.de, pombredanne@nexb.com, peterz@infradead.org, tedheadster@gmail.com Reply-To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, tedheadster@gmail.com, pombredanne@nexb.com, peterz@infradead.org, bp@suse.de, hpa@zytor.com, qianyue.zj@alibaba-inc.com, mingo@kernel.org, luto@amacapital.net, tglx@linutronix.de In-Reply-To: <20180921212041.13096-2-tedheadster@gmail.com> References: <20180921212041.13096-2-tedheadster@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cpu] x86/CPU: Use correct macros for Cyrix calls Git-Commit-ID: 03b099bdcdf7125d4a63dc9ddeefdd454e05123d 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: 03b099bdcdf7125d4a63dc9ddeefdd454e05123d Gitweb: https://git.kernel.org/tip/03b099bdcdf7125d4a63dc9ddeefdd454e05123d Author: Matthew Whitehead AuthorDate: Fri, 21 Sep 2018 17:20:40 -0400 Committer: Borislav Petkov CommitDate: Sat, 22 Sep 2018 11:46:56 +0200 x86/CPU: Use correct macros for Cyrix calls There are comments in processor-cyrix.h advising you to _not_ make calls using the deprecated macros in this style: setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80); This is because it expands the macro into a non-functioning calling sequence. The calling order must be: outb(CX86_CCR2, 0x22); inb(0x23); From the comments: * When using the old macros a line like * setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88); * gets expanded to: * do { * outb((CX86_CCR2), 0x22); * outb((({ * outb((CX86_CCR2), 0x22); * inb(0x23); * }) | 0x88), 0x23); * } while (0); The new macros fix this problem, so use them instead. Signed-off-by: Matthew Whitehead Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jia Zhang Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180921212041.13096-2-tedheadster@gmail.com --- arch/x86/kernel/cpu/cyrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c index 8949b7ae6d92..d12226f60168 100644 --- a/arch/x86/kernel/cpu/cyrix.c +++ b/arch/x86/kernel/cpu/cyrix.c @@ -437,7 +437,7 @@ static void cyrix_identify(struct cpuinfo_x86 *c) /* enable MAPEN */ setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable cpuid */ - setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80); + setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80); /* disable MAPEN */ setCx86(CX86_CCR3, ccr3); local_irq_restore(flags);