All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com, M A Young <m.a.young@durham.ac.uk>
Subject: Re: Re: Continuing problems booting
Date: Wed, 11 Mar 2009 11:33:58 +0100	[thread overview]
Message-ID: <49B79396.4050401@redhat.com> (raw)
In-Reply-To: <49B6EDD2.4070300@goop.org>

[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]

Jeremy Fitzhardinge wrote:
> Gerd Hoffmann wrote:
>> Ok.  So the old code should be fine and we just need the additional loop
>> to handle the ioapic-less case.  Will send updated patches tomorrow.
>>   
> 
> OK.  I already applied them as-is just to check nothing breaks.  I'll
> replace them when you repost.

Here we go.  Fixed ioapic loop as discussed, also updated names to be
more descriptive, looks like this now:

[root@xeni ~]# grep pirq /proc/interrupts
  1:          2          0          0          0  xen-pirq-ioapic-edge
i8042
  3:          3          0          0          0  xen-pirq-ioapic-edge
  4:          3          0          0          0  xen-pirq-ioapic-edge
  7:          0          0          0          0  xen-pirq-ioapic-edge
parport0
  8:          1          0          0          0  xen-pirq-ioapic-edge  rtc0
  9:          0          0          0          0  xen-pirq-ioapic-level
 acpi
 12:          4          0          0          0  xen-pirq-ioapic-edge
i8042
 16:          0          0          0          0  xen-pirq-ioapic-level
 uhci_hcd:usb3, uhci_hcd:usb8
 18:          0          0          0          0  xen-pirq-ioapic-level
 uhci_hcd:usb5
 19:       5288          0          0          0  xen-pirq-ioapic-level
 ehci_hcd:usb1, uhci_hcd:usb7, ahci
 20:        524          0          0          0  xen-pirq-ioapic-level
 eth0
 21:          0          0          0          0  xen-pirq-ioapic-level
 uhci_hcd:usb4
 22:        242          0          0          0  xen-pirq-ioapic-level
 HDA Intel
 23:          0          0          0          0  xen-pirq-ioapic-level
 ehci_hcd:usb2, uhci_hcd:usb6

[root@zen ~]# grep pirq /proc/interrupts
  1:          8  xen-pirq-xt-pic    i8042
  3:          5  xen-pirq-xt-pic
  4:          1  xen-pirq-xt-pic
  5:          0  xen-pirq-xt-pic    Intel 440MX, Intel 440MX Modem
  6:          1  xen-pirq-xt-pic
  7:          1  xen-pirq-xt-pic
  8:          1  xen-pirq-xt-pic    rtc0
 10:     200002  xen-pirq-xt-pic    yenta, firewire_ohci
 11:        196  xen-pirq-xt-pic    uhci_hcd:usb1, eth0
 12:        107  xen-pirq-xt-pic    i8042
 14:       2840  xen-pirq-xt-pic    ata_piix
 15:          0  xen-pirq-xt-pic    ata_piix

cheers,
  Gerd

[-- Attachment #2: 0001-xen-set-pirq-name-to-something-useful.patch --]
[-- Type: text/plain, Size: 2251 bytes --]

From 1d7cf28e81e5ed2f7649186ab7a040aaa57a9b40 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@xeni.home.kraxel.org>
Date: Mon, 9 Mar 2009 14:23:56 +0100
Subject: [PATCH 1/2] xen: set pirq name to something useful.


Signed-off-by: Gerd Hoffmann <kraxel@xeni.home.kraxel.org>
---
 arch/x86/xen/pci.c   |    3 ++-
 drivers/xen/events.c |    4 ++--
 include/xen/events.h |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
index 502ff5f..fb3ada9 100644
--- a/arch/x86/xen/pci.c
+++ b/arch/x86/xen/pci.c
@@ -48,7 +48,8 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
 	printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n",
 	       gsi, triggering, polarity);
 
-	irq = xen_allocate_pirq(gsi);
+	irq = xen_allocate_pirq(gsi, (triggering == ACPI_EDGE_SENSITIVE)
+				     ? "ioapic-edge" : "ioapic-level");
 
 	printk(KERN_DEBUG "xen: --> irq=%d\n", irq);
 
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 6098fca..3888e2c 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -533,7 +533,7 @@ static int find_irq_by_gsi(unsigned gsi)
  * event channel until the irq actually started up.  Return an
  * existing irq if we've already got one for the gsi.
  */
-int xen_allocate_pirq(unsigned gsi)
+int xen_allocate_pirq(unsigned gsi, char *name)
 {
 	int irq;
 	struct physdev_irq irq_op;
@@ -555,7 +555,7 @@ int xen_allocate_pirq(unsigned gsi)
 		irq = find_unbound_irq();
 
 	set_irq_chip_and_handler_name(irq, &xen_pirq_chip,
-				      handle_level_irq, "pirq");
+				      handle_level_irq, name);
 
 	irq_op.irq = irq;
 	if (HYPERVISOR_physdev_op(PHYSDEVOP_alloc_irq_vector, &irq_op)) {
diff --git a/include/xen/events.h b/include/xen/events.h
index 2cdb0de..0814763 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -67,7 +67,7 @@ unsigned irq_from_evtchn(unsigned int evtchn);
 /* Allocate an irq for a physical interrupt, given a gsi.  "Legacy"
    GSIs are identity mapped; others are dynamically allocated as
    usual. */
-int xen_allocate_pirq(unsigned gsi);
+int xen_allocate_pirq(unsigned gsi, char *name);
 
 /* Return vector allocated to pirq */
 int xen_vector_from_irq(unsigned pirq);
-- 
1.6.1.3


[-- Attachment #3: 0002-xen-fix-legacy-irq-setup-make-ioapic-less-machines.patch --]
[-- Type: text/plain, Size: 832 bytes --]

From 0aea878c27395a3c61843816f4dfab8486a0c804 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@xeni.home.kraxel.org>
Date: Tue, 10 Mar 2009 10:12:30 +0100
Subject: [PATCH 2/2] xen: fix legacy irq setup, make ioapic-less machines work.


Signed-off-by: Gerd Hoffmann <kraxel@xeni.home.kraxel.org>
---
 arch/x86/xen/pci.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
index fb3ada9..69b475b 100644
--- a/arch/x86/xen/pci.c
+++ b/arch/x86/xen/pci.c
@@ -65,6 +65,12 @@ void __init xen_setup_pirqs(void)
 {
 	int irq;
 
+	if (0 == nr_ioapics) {
+		for (irq=0; irq < NR_IRQS_LEGACY; irq++)
+			xen_allocate_pirq(irq, "xt-pic");
+		return;
+	}
+
 	/* Pre-allocate legacy irqs */
 	for (irq=0; irq < NR_IRQS_LEGACY; irq++) {
 		int trigger, polarity;
-- 
1.6.1.3


[-- Attachment #4: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2009-03-11 10:33 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 12:50 Continuing problems booting M A Young
2009-02-20 16:19 ` M A Young
2009-02-21 12:34   ` M A Young
2009-02-21 15:43     ` Jeremy Fitzhardinge
2009-02-21 15:52       ` M A Young
2009-02-21 22:26       ` M A Young
2009-02-22  6:54     ` Jeremy Fitzhardinge
2009-02-22  9:38       ` M A Young
2009-02-22 14:58         ` M A Young
2009-02-22 17:13           ` Jeremy Fitzhardinge
2009-02-22 23:02             ` M A Young
2009-02-22 23:19               ` Jeremy Fitzhardinge
2009-02-23  0:20                 ` M A Young
2009-02-23  6:27                   ` Jeremy Fitzhardinge
2009-02-25  0:56                     ` M A Young
2009-02-27 23:27                       ` M A Young
2009-02-28  1:18                         ` Jeremy Fitzhardinge
2009-03-02 10:05                           ` Gerd Hoffmann
2009-03-02 10:38                             ` M A Young
2009-03-02 10:56                               ` Gerd Hoffmann
2009-03-05  5:15                             ` Jeremy Fitzhardinge
2009-03-05  7:35                               ` Gerd Hoffmann
2009-03-05 11:01                                 ` Gerd Hoffmann
2009-03-05 18:56                                   ` Jeremy Fitzhardinge
2009-03-06 14:15                                     ` Gerd Hoffmann
2009-03-06 14:56                                       ` Gerd Hoffmann
2009-03-06 15:21                                         ` Jeremy Fitzhardinge
2009-03-09 15:38                                           ` Gerd Hoffmann
2009-03-09 15:56                                             ` Gerd Hoffmann
2009-03-09 16:35                                               ` Jeremy Fitzhardinge
2009-03-06 15:20                                       ` Jeremy Fitzhardinge
2009-03-06 15:34                                         ` Gerd Hoffmann
2009-03-06 16:08                                           ` Jeremy Fitzhardinge
2009-03-09  8:02                                             ` Gerd Hoffmann
2009-03-09 13:20                                             ` Gerd Hoffmann
2009-03-09 16:24                                               ` Jeremy Fitzhardinge
2009-03-10  9:39                                                 ` Gerd Hoffmann
2009-03-10 17:13                                                   ` Jeremy Fitzhardinge
2009-03-10 22:00                                                     ` Gerd Hoffmann
2009-03-10 22:46                                                       ` Jeremy Fitzhardinge
2009-03-11 10:33                                                         ` Gerd Hoffmann [this message]
2009-03-05 15:57                                 ` Pasi Kärkkäinen
2009-03-05  1:52                         ` Jeremy Fitzhardinge
2009-03-05 20:23                           ` M A Young
2009-03-05 20:34                             ` Jeremy Fitzhardinge
2009-03-06  1:07                               ` M A Young
     [not found]                               ` <49B0BF8B.9070002@zytor.com>
2009-03-06 19:35                                 ` M A Young
  -- strict thread matches above, loose matches on Subject: below --
2009-02-21 22:59 Jeremy Fitzhardinge
2009-02-21 23:57 ` M A Young
2009-02-22  4:47 ` Keir Fraser

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=49B79396.4050401@redhat.com \
    --to=kraxel@redhat.com \
    --cc=jeremy@goop.org \
    --cc=m.a.young@durham.ac.uk \
    --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.