From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "M. Nunberg" <mnunberg@haskalah.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: pvops acpi and xen 4 issues
Date: Mon, 8 Mar 2010 15:02:26 -0500 [thread overview]
Message-ID: <20100308200226.GA16759@phenom.dumpdata.com> (raw)
In-Reply-To: <1267740285.10743.4.camel@debmed>
[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]
> make sure it was indeed being called. I think this might have something
> to do with what Jeremy mentioned about my SCI being on 9 and not 20, but
> honestly, I haven't a clue. I have the full log if you need more.
I am attaching a debug patch that will help in troubleshooting this and
potentially fix this.
Couple of things:
1). Turn the Enable ACPI SCI in the BIOS to Enable.
2). Compile your Linux kernel with the attached patch and these two options:
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_DEBUG_FUNC_TRACE=y
Do use your old .config that was triggering the failure in the first
case.
3). Edit your kernel line to have:
debug initcall_debug acpi.debug_level=0xffffffff acpi.debug_layer=0x2 xen_sci=fun
4). Boot your kernel. You should see something like this:
... snip..
[ 0.000000] acpi_sci_ioapic_setup: 0 -> 9 (3, 1)
...
[ 1.483956] xen_setup_pirqs: FADT.SCI: 9 ACPI.SCI:9. Using 9 IRQ,
[ 1.490025] xen_setup_pirqs: SCI override: trigger: level->level,
polarity: high->high
[ 1.497824] xen: registering gsi 9 triggering 0 polarity 0
[ 1.503282] xen_allocate_pirq: returning irq 9 for gsi 9
[ 1.508572] xen: --> irq=9
[ 1.511254] Already setup the GSI :9
.. and then later:
[ 3.058890] ACPI: Core revision 20090903
[ 3.084701] acpi_early_init: FADT.SCI = 9
.. and then lots of ACPI debug stuff.
Thought in your case, the IRQ that should show up is 20 and the 'Already
setup the GSI :20' might not show up.
Please e-mail the full serial log (even if it does work).
> I used Xen 4-rc4 : xen/stable 2.6.32.9 - latest git from today.
[-- Attachment #2: debug-apic-sci.patch --]
[-- Type: text/plain, Size: 3948 bytes --]
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 21fc029..128ae25 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -344,7 +344,9 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
* stash over-ride to indicate we've been here
* and for later update of acpi_gbl_FADT
*/
+ printk(KERN_INFO "%s: %d -> %d (%d, %d)\n", __FUNCTION__, acpi_sci_override_gsi, gsi, trigger, polarity);
acpi_sci_override_gsi = gsi;
+
return;
}
diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
index f999ad8..4cee777 100644
--- a/arch/x86/xen/pci.c
+++ b/arch/x86/xen/pci.c
@@ -69,7 +69,41 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
}
return irq;
}
+static int xen_sci_override = 0;
+static int xen_sci_trigger = ACPI_ACTIVE_LOW;
+static int xen_sci_polarity = ACPI_EDGE_SENSITIVE;
+static int __init
+xen_sci_override_func(char *str)
+{
+ int val;
+
+ while (*str) {
+ if (!strncmp(str, "level", 5)) {
+ xen_sci_trigger = ACPI_LEVEL_SENSITIVE;
+ str+=5;
+ }
+ if (!strncmp(str, "edge", 4)) {
+ xen_sci_trigger = ACPI_EDGE_SENSITIVE;
+ str+=4;
+ }
+ if (!strncmp(str, "high", 4)) {
+ xen_sci_polarity = ACPI_ACTIVE_HIGH;
+ str+=4;
+ }
+ if (!strncmp(str, "low", 3)) {
+ xen_sci_polarity = ACPI_ACTIVE_LOW;
+ str+=3;
+ }
+ str = strpbrk(str, ",");
+ if (!str)
+ break;
+ str++; /* skip ',' */
+ }
+ xen_sci_override = 1;
+ return 0;
+}
+__setup("xen_sci=", xen_sci_override_func);
void __init xen_setup_pirqs(void)
{
int irq;
@@ -84,13 +118,56 @@ void __init xen_setup_pirqs(void)
for (irq = 0; irq < NR_IRQS_LEGACY; irq++) {
int trigger, polarity;
- if (acpi_get_override_irq(irq, &trigger, &polarity) == -1)
+ if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) {
+ printk(KERN_INFO "%s: skipping %d\n", __FUNCTION__, irq);
continue;
+ }
+ xen_register_gsi(irq,
+ trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE,
+ polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH);
+ }
+ /* For SCI that is above NR_IRQS_LEGACY or xen_sci_override is turned on*/
+ if ((acpi_gbl_FADT.sci_interrupt > NR_IRQS_LEGACY) ||
+ (acpi_sci_override_gsi > NR_IRQS_LEGACY) ||
+ (xen_sci_override)) {
+
+ int trigger, polarity;
+
+ irq = acpi_gbl_FADT.sci_interrupt;
+
+ if ((acpi_sci_override_gsi > NR_IRQS_LEGACY) &&
+ (acpi_gbl_FADT.sci_interrupt <= NR_IRQS_LEGACY))
+ irq = acpi_sci_override_gsi;
+
+ if ((acpi_sci_override_gsi <= NR_IRQS_LEGACY) &&
+ (acpi_gbl_FADT.sci_interrupt > NR_IRQS_LEGACY))
+ irq = acpi_gbl_FADT.sci_interrupt;
+ printk(KERN_INFO "%s: FADT.SCI: %d ACPI.SCI:%d. Using IRQ %d.\n",
+ __FUNCTION__,
+ acpi_gbl_FADT.sci_interrupt, acpi_sci_override_gsi, irq);
+
+ if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) {
+ printk(KERN_INFO "%s: acpi_get_override_irq fails for %d. \n", __FUNCTION__, irq);
+ }
+ if (xen_sci_override) {
+#define trig2str(x) (x == ACPI_LEVEL_SENSITIVE) ? "level" : "edge"
+#define pol2str(x) (x == ACPI_ACTIVE_LOW) ? "low" : "high"
+ printk(KERN_INFO "%s: SCI override: trigger: %s->%s, polarity: %s->%s\n",
+ __FUNCTION__,
+ trig2str(trigger), trig2str(xen_sci_trigger),
+ pol2str(polarity), pol2str(xen_sci_polarity));
+#undef trig2str
+#undef pol2str
+ trigger = xen_sci_trigger;
+ polarity = xen_sci_polarity;
+ }
xen_register_gsi(irq,
trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE,
polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH);
+
}
+
}
#ifdef CONFIG_PCI_MSI
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 7411915..82d60a4 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -688,6 +688,7 @@ void __init acpi_early_init(void)
* update it with result from INT_SRC_OVR parsing
*/
acpi_gbl_FADT.sci_interrupt = acpi_sci_override_gsi;
+ printk(KERN_INFO "%s: FADT.SCI = %d\n", __FUNCTION__,acpi_sci_override_gsi);
}
#endif
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-03-08 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 20:33 pvops acpi and xen 4 issues M. Nunberg
2010-02-26 23:23 ` Jeremy Fitzhardinge
2010-02-27 2:22 ` M. Nunberg
2010-03-01 16:13 ` Konrad Rzeszutek Wilk
2010-03-04 22:04 ` M. Nunberg
2010-03-08 20:02 ` Konrad Rzeszutek Wilk [this message]
2010-03-10 19:44 ` M. Nunberg
2010-03-10 23:48 ` Jeremy Fitzhardinge
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=20100308200226.GA16759@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=mnunberg@haskalah.org \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.