From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935075Ab1JEQzc (ORCPT ); Wed, 5 Oct 2011 12:55:32 -0400 Received: from mga14.intel.com ([143.182.124.37]:52172 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934948Ab1JEQzb (ORCPT ); Wed, 5 Oct 2011 12:55:31 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.68,492,1312182000"; d="scan'208";a="23558365" From: "Fenghua Yu" To: "Ingo Molnar" , "Thomas Gleixner" , "H Peter Anvin" , "Zwane Mwaikambo" , "Tony Luck" , "Asit K Mallick" , "Suresh B Siddha" , "Len Brown" Cc: "linux-kernel" , "Fenghua Yu" Subject: [PATCH 1/8] x86, apic.c: Disable irq0 if CPU enables ARAT for local apic timer Date: Wed, 5 Oct 2011 09:39:12 -0700 Message-Id: <1317832759-10223-2-git-send-email-fenghua.yu@intel.com> X-Mailer: git-send-email 1.7.2 In-Reply-To: <1317832759-10223-1-git-send-email-fenghua.yu@intel.com> References: <1317832759-10223-1-git-send-email-fenghua.yu@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fenghua Yu irq0 won't generate any interrupt after local apic timers is enabled and ARAT is enabled. Disable irq0 in this case. Thus irq0 won't block BSP offline. Signed-off-by: Fenghua Yu --- arch/x86/kernel/apic/apic.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 52fa563..8813acf 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -506,6 +506,7 @@ static DEFINE_PER_CPU(struct clock_event_device, lapic_events); static void __cpuinit setup_APIC_timer(void) { struct clock_event_device *levt = &__get_cpu_var(lapic_events); + int cpu = smp_processor_id(); if (this_cpu_has(X86_FEATURE_ARAT)) { lapic_clockevent.features &= ~CLOCK_EVT_FEAT_C3STOP; @@ -517,6 +518,10 @@ static void __cpuinit setup_APIC_timer(void) levt->cpumask = cpumask_of(smp_processor_id()); clockevents_register_device(levt); + + /* irq0 won't be used any more if CPU supports ARAT feature. */ + if (cpu == 0 && this_cpu_has(X86_FEATURE_ARAT)) + disable_irq(0); } /* -- 1.6.0.3