From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934778AbZLGMTg (ORCPT ); Mon, 7 Dec 2009 07:19:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934723AbZLGMTe (ORCPT ); Mon, 7 Dec 2009 07:19:34 -0500 Received: from hera.kernel.org ([140.211.167.34]:37191 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934721AbZLGMTb (ORCPT ); Mon, 7 Dec 2009 07:19:31 -0500 Date: Mon, 7 Dec 2009 12:18:37 GMT From: tip-bot for Thomas Gleixner Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, gorcunov@openvz.org, tglx@linutronix.de, mingo@elte.hu Reply-To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, gorcunov@openvz.org, tglx@linutronix.de, mingo@elte.hu In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86: Fix bogus warning in apic_noop.apic_write() Message-ID: Git-Commit-ID: a946d8f11f0da9cfc714248036fcfd3a794d1e27 X-Mailer: tip-git-log-daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a946d8f11f0da9cfc714248036fcfd3a794d1e27 Gitweb: http://git.kernel.org/tip/a946d8f11f0da9cfc714248036fcfd3a794d1e27 Author: Thomas Gleixner AuthorDate: Mon, 7 Dec 2009 12:59:46 +0100 Committer: Ingo Molnar CommitDate: Mon, 7 Dec 2009 13:16:37 +0100 x86: Fix bogus warning in apic_noop.apic_write() apic_noop is used to provide dummy apic functions. It's installed when the CPU has no APIC or when the APIC is disabled on the kernel command line. The apic_noop implementation of apic_write() warns when the CPU has an APIC or when the APIC is not disabled. That's bogus. The warning should only happen when the CPU has an APIC _AND_ the APIC is not disabled. apic_noop.apic_read() has the correct check. Signed-off-by: Thomas Gleixner Cc: Cyrill Gorcunov Cc: # in <= .32 this typo resides in native_apic_write_dummy() LKML-Reference: Signed-off-by: Ingo Molnar --- arch/x86/kernel/apic/apic_noop.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/apic/apic_noop.c b/arch/x86/kernel/apic/apic_noop.c index d9acc3b..e31b9ff 100644 --- a/arch/x86/kernel/apic/apic_noop.c +++ b/arch/x86/kernel/apic/apic_noop.c @@ -127,7 +127,7 @@ static u32 noop_apic_read(u32 reg) static void noop_apic_write(u32 reg, u32 v) { - WARN_ON_ONCE((cpu_has_apic || !disable_apic)); + WARN_ON_ONCE(cpu_has_apic && !disable_apic); } struct apic apic_noop = {