From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758670AbZEKUCi (ORCPT ); Mon, 11 May 2009 16:02:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757609AbZEKUCT (ORCPT ); Mon, 11 May 2009 16:02:19 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:49855 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756809AbZEKUCS (ORCPT ); Mon, 11 May 2009 16:02:18 -0400 Date: Mon, 11 May 2009 22:01:43 +0200 From: Ingo Molnar To: Cyrill Gorcunov Cc: Yinghai Lu , mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, eswierk@aristanetworks.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/apic] x86: read apic ID in the !acpi_lapic case Message-ID: <20090511200143.GJ28684@elte.hu> References: <49FC85A9.2070702@kernel.org> <20090511110234.GH4648@elte.hu> <20090511134140.GH4624@lenovo> <20090511134950.GA949@elte.hu> <4A0863C5.9070206@kernel.org> <20090511180521.GL4624@lenovo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090511180521.GL4624@lenovo> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Cyrill Gorcunov wrote: > [Yinghai Lu - Mon, May 11, 2009 at 10:43:33AM -0700] > ... > | >> > | >> x86: apic - fixmap apic address even if apic disabled > | >> > | >> In case if apic were disabled by boot option > | >> we still need read_apic operation. So fixmap > | >> a fake apic area if needed. > | >> > | >> Signed-off-by: Cyrill Gorcunov > | >> --- > | >> arch/x86/kernel/apic/apic.c | 17 +++++++++-------- > | >> 1 file changed, 9 insertions(+), 8 deletions(-) > | >> > | >> Index: linux-2.6.git/arch/x86/kernel/apic/apic.c > | >> ===================================================================== > | >> --- linux-2.6.git.orig/arch/x86/kernel/apic/apic.c > | >> +++ linux-2.6.git/arch/x86/kernel/apic/apic.c > | >> @@ -1591,13 +1591,6 @@ void __init init_apic_mappings(void) > | >> } else > | >> apic_phys = mp_lapic_addr; > | >> > | >> - /* lets check if we may NOP'ify apic operations */ > | >> - if (!cpu_has_apic) { > | >> - pr_info("APIC: disable apic facility\n"); > | >> - apic_disable(); > | >> - return; > | >> - } > | >> - > | >> /* > | >> * acpi lapic path already maps that address in > | >> * acpi_register_lapic_address() > | >> @@ -1606,7 +1599,15 @@ void __init init_apic_mappings(void) > | >> set_fixmap_nocache(FIX_APIC_BASE, apic_phys); > | >> > | >> apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n", > | >> - APIC_BASE, apic_phys); > | >> + APIC_BASE, apic_phys); > | >> + > | >> + /* lets check if we may NOP'ify apic operations */ > | >> + if (!cpu_has_apic) { > | >> + pr_info("APIC: disable apic facility\n"); > | >> + apic_disable(); > | >> + return; > | >> + } > | >> + > | > > | > Will check this - thanks. > | > > | > | please check this one instead. > | > | [PATCH] x86: add native_apic_read_dummy > | > | when apic is not used ( not there, or disable_apic ), try to install > | dummy read too. > | > | could save 4k in that case. > | > | [ Impact: fix bug when try to dump APIC reg ] > | > | Signed-off-by: Yinghai Lu > | Cc: Cyrill Gorcunov > | > > Thanks Yinghai, looks really attractive! > > But would need a good testing (seems we > rely on read_apic heavily in smp environment > even if it was disabled or not supported). > > (btw comment about disable_apic now should > contain apic->read as well or should be dropped > completely since all is selfevidence from code > though this is not that important i believe) Needs a delta patch against -tip - i got this stuff stable today but i dont want to replace patches as it has a problematic track record already. Ingo