Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932912AbdDEL5y (ORCPT ); Wed, 5 Apr 2017 07:57:54 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:60157 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753535AbdDEL4w (ORCPT ); Wed, 5 Apr 2017 07:56:52 -0400 Date: Wed, 5 Apr 2017 13:56:48 +0200 (CEST) From: Thomas Gleixner To: Dou Liyang cc: x86@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, ebiederm@xmission.com, bhe@redhat.com, hpa@zytor.com, izumi.taku@jp.fujitsu.com Subject: Re: [RFC PATCH 3/6] x86/apic: Extract APIC timer related code from apic_bsp_setup() In-Reply-To: <1490799333-18242-4-git-send-email-douly.fnst@cn.fujitsu.com> Message-ID: References: <1490799333-18242-1-git-send-email-douly.fnst@cn.fujitsu.com> <1490799333-18242-4-git-send-email-douly.fnst@cn.fujitsu.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 663 Lines: 25 On Wed, 29 Mar 2017, Dou Liyang wrote: > +/* Setup local APIC timer and get the Id*/ > +static int __init apic_bsp_timer_setup(void) This does not make sense. The id and the timers have nothing to do with each other. > +{ > + int id; > + > + if (x2apic_mode) > + id = apic_read(APIC_LDR); > + else > + id = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR)); > + > + if (!skip_ioapic_setup && nr_ioapics && nr_legacy_irqs()) > + check_timer(); Why are you moving this to the APIC? check_timer() has absolutely nothing to do with the apic timer. It's a IOAPIC only issue and required to test that the IRQ0 interrupt delivery works through the IOAPIC. Thanks, tglx