public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Yinghai Lu <yinghai@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	yinghai@kernel.org, suresh.b.siddha@intel.com,
	tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:x86/apic] x86, apic: Add probe() for apic_flat
Date: Fri, 23 Dec 2011 12:10:42 -0800	[thread overview]
Message-ID: <tip-e8524b2f43ab6747518aef81c709d104c478b1cd@git.kernel.org> (raw)
In-Reply-To: <20111222014632.484984298@sbsiddha-desk.sc.intel.com>

Commit-ID:  e8524b2f43ab6747518aef81c709d104c478b1cd
Gitweb:     http://git.kernel.org/tip/e8524b2f43ab6747518aef81c709d104c478b1cd
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Wed, 21 Dec 2011 17:45:15 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 23 Dec 2011 11:00:45 -0800

x86, apic: Add probe() for apic_flat

Currently we start with the default apic_flat mode and switch to some other
apic model depending on the apic drivers acpi_madt_oem_check() routines and
later followed by the apic drivers probe() routines.

Once we selected non flat mode there was no case where we fall back to
flat mode again.

Upcoming changes allow bios-enabled x2apic mode to be disabled by the OS
if interrupt-remapping etc is not setup properly by the bios.

We now has a case for the apic to fall back to legacy flat mode during
apic driver probe() seqeuence. Add a simple flat_probe() which allows
the apic_flat mode to be the last fallback option.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/20111222014632.484984298@sbsiddha-desk.sc.intel.com
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/kernel/apic/apic_flat_64.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
index 57c1f41..8c3cdde 100644
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -171,9 +171,14 @@ static int flat_phys_pkg_id(int initial_apic_id, int index_msb)
 	return initial_apic_id >> index_msb;
 }
 
+static int flat_probe(void)
+{
+	return 1;
+}
+
 static struct apic apic_flat =  {
 	.name				= "flat",
-	.probe				= NULL,
+	.probe				= flat_probe,
 	.acpi_madt_oem_check		= flat_acpi_madt_oem_check,
 	.apic_id_registered		= flat_apic_id_registered,
 

  reply	other threads:[~2011-12-23 20:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22  1:45 [patch 0/5] x86: allow pre-enabled x2apic mode to be disabled Suresh Siddha
2011-12-22  1:45 ` [patch 1/5] x86, apic: add probe() for apic_flat Suresh Siddha
2011-12-23 20:10   ` tip-bot for Yinghai Lu [this message]
2011-12-22  1:45 ` [patch 2/5] x86, acpi: skip acpi x2apic entries if the x2apic feature is not present Suresh Siddha
2011-12-23 20:11   ` [tip:x86/apic] x86, acpi: Skip " tip-bot for Yinghai Lu
2011-12-22  1:45 ` [patch 3/5] x86, x2apic: fallback to xapic when bios doesnt setup interrupt-remapping Suresh Siddha
2011-12-23 20:12   ` [tip:x86/apic] x86, x2apic: Fallback to xapic when BIOS doesn' t " tip-bot for Yinghai Lu
2011-12-22  1:45 ` [patch 4/5] x86, x2apic: allow "nox2apic" to disable x2apic mode setup by bios Suresh Siddha
2011-12-22  7:24   ` Yinghai Lu
2011-12-23 19:01     ` Suresh Siddha
2011-12-23 20:13     ` [tip:x86/apic] x86, x2apic: Allow "nox2apic" to disable x2apic mode setup by BIOS tip-bot for Yinghai Lu
2011-12-22  1:45 ` [patch 5/5] x86: skip cpus with apic-ids >= 255 in !x2apic_mode Suresh Siddha
2011-12-23 20:13   ` [tip:x86/apic] x86: Skip " tip-bot for Suresh Siddha

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=tip-e8524b2f43ab6747518aef81c709d104c478b1cd@git.kernel.org \
    --to=yinghai@kernel.org \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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