xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bastian Blank <waldi@debian.org>
To: xen-devel@lists.xensource.com
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Keir Fraser <keir.fraser@eu.citrix.com>
Subject: [PATCH] Allow all unused GSI to be configured via IO-APIC
Date: Wed, 24 Mar 2010 12:17:36 +0100	[thread overview]
Message-ID: <20100324111736.GA9327@wavehammer.waldi.eu.org> (raw)

Currently Xen disallows setting up any GSI < 16. This makes it
impossible by the kernel to use any PCI devices without ACPI override
but a mapping to this interrupts via IO-APIC.

The patch allows all unused interrupts to be setup via IO-APIC.

Signed-off-by: Bastian Blank <waldi@debian.org>

diff -r 7b63f677f245 xen/arch/x86/mpparse.c
--- a/xen/arch/x86/mpparse.c	Thu Mar 18 11:03:07 2010 +0000
+++ b/xen/arch/x86/mpparse.c	Wed Mar 24 12:13:11 2010 +0100
@@ -1103,6 +1103,7 @@
 	int			ioapic = -1;
 	int			ioapic_pin = 0;
 	int			idx, bit = 0;
+
 	/*
 	 * Mapping between Global System Interrups, which
 	 * represent all possible interrupts, and IRQs
@@ -1126,6 +1127,9 @@
 	if (ioapic_renumber_irq)
 		gsi = ioapic_renumber_irq(ioapic, gsi);
 
+	if (!(irq_to_desc(gsi)->status & IRQ_DISABLED))
+		return -EEXIST;
+
 	/* 
 	 * Avoid pin reprogramming.  PRTs typically include entries  
 	 * with redundant pin->gsi mappings (but unique PCI devices);
diff -r 7b63f677f245 xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c	Thu Mar 18 11:03:07 2010 +0000
+++ b/xen/arch/x86/physdev.c	Wed Mar 24 12:13:11 2010 +0100
@@ -476,12 +476,8 @@
         ret = -EINVAL;
         if ( setup_gsi.gsi < 0 || setup_gsi.gsi >= nr_irqs_gsi )
             break;
-        /* GSI < 16 has been setup by hypervisor */
-        if ( setup_gsi.gsi >= 16 )
-            ret = mp_register_gsi(setup_gsi.gsi, setup_gsi.triggering,
+        ret = mp_register_gsi(setup_gsi.gsi, setup_gsi.triggering,
                             setup_gsi.polarity);
-        else 
-            ret = -EEXIST;
         break; 
     }
     default:
-- 
Hailing frequencies open, Captain.

                 reply	other threads:[~2010-03-24 11:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100324111736.GA9327@wavehammer.waldi.eu.org \
    --to=waldi@debian.org \
    --cc=jeremy@goop.org \
    --cc=keir.fraser@eu.citrix.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).