public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	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
Date: Mon, 11 May 2009 22:05:21 +0400	[thread overview]
Message-ID: <20090511180521.GL4624@lenovo> (raw)
In-Reply-To: <4A0863C5.9070206@kernel.org>

[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 <gorcunov@openvz.org>
| >> ---
| >>  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 <yinghai@kernel.org>
| Cc: Cyrill Gorcunov <gorcunov@openvz.org>
| 

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)

	-- Cyrill

  reply	other threads:[~2009-05-11 18:05 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090430084145.GD21699@elte.hu>
2009-05-02  4:48 ` [PATCH] x86: read apic id if it is not acpi_lapic Yinghai Lu
2009-05-02  7:02   ` Cyrill Gorcunov
2009-05-02 17:40     ` [PATCH] x86: read apic id if it is not acpi_lapic -v2 Yinghai Lu
     [not found]       ` <20090502184108.GC4791@lenovo>
     [not found]         ` <49FC9BFC.4040904@kernel.org>
     [not found]           ` <20090502192441.GE4791@lenovo>
     [not found]             ` <49FC9F28.2070802@kernel.org>
     [not found]               ` <20090502193203.GG4791@lenovo>
2009-05-02 22:27                 ` [PATCH] x86: change apic_version array to bsp apic ver only Yinghai Lu
2009-05-11  9:20       ` [PATCH] x86: read apic id if it is not acpi_lapic -v2 Ingo Molnar
2009-05-11  9:26       ` Ingo Molnar
2009-05-11  9:40         ` Cyrill Gorcunov
2009-05-11 11:06           ` Ingo Molnar
2009-05-11  9:53       ` [tip:x86/apic] x86: read apic ID in the !acpi_lapic case tip-bot for Yinghai Lu
2009-05-11 11:02         ` Ingo Molnar
2009-05-11 13:41           ` Cyrill Gorcunov
2009-05-11 13:49             ` Ingo Molnar
2009-05-11 17:43               ` Yinghai Lu
2009-05-11 18:05                 ` Cyrill Gorcunov [this message]
2009-05-11 20:01                   ` Ingo Molnar
2009-05-11 20:05                     ` Cyrill Gorcunov
2009-05-11 20:14                     ` Yinghai Lu
2009-05-11 13:54             ` [tip:x86/apic] x86: apic: Fixmap apic address even if apic disabled tip-bot for Cyrill Gorcunov
2009-05-11 16:11           ` [tip:x86/apic] x86: read apic ID in the !acpi_lapic case Yinghai Lu
2009-05-12 10:36       ` [tip:irq/numa] " tip-bot for Yinghai Lu
2009-05-12 11:22         ` Ingo Molnar
2009-05-12 14:51           ` Cyrill Gorcunov
2009-05-12 14:58             ` Ingo Molnar
2009-05-12 15:00               ` Cyrill Gorcunov
2009-05-12 15:04               ` Yinghai Lu
2009-05-12 15:06                 ` Ingo Molnar
2009-05-12 16:46                   ` Ingo Molnar
2009-05-12 17:02                     ` Cyrill Gorcunov
2009-05-12 17:12                       ` Yinghai Lu
2009-05-12 17:27                         ` Cyrill Gorcunov
2009-05-12 18:31                     ` Yinghai Lu
2009-05-12 18:33                       ` Ingo Molnar
2009-05-12 18:35                         ` Yinghai Lu
2009-05-12 19:05                           ` Ingo Molnar
2009-05-12 19:23                             ` Yinghai Lu
2009-05-13 13:14                               ` Ingo Molnar
2009-05-13 16:41                                 ` Yinghai Lu
2009-05-18  7:39                               ` [tip:irq/numa] x86: don't call read_apic_id if !cpu_has_apic tip-bot for Yinghai Lu
2009-05-12 16:48             ` [tip:irq/numa] x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector(), fix tip-bot for Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090511180521.GL4624@lenovo \
    --to=gorcunov@gmail.com \
    --cc=eswierk@aristanetworks.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox