kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: penberg@kernel.org, mingo@elte.hu
Cc: levinsasha928@gmail.com, asias.hejun@gmail.com,
	prasadjoshi124@gmail.com, kvm@vger.kernel.org,
	Cyrill Gorcunov <gorcunov@gmail.com>
Subject: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification
Date: Sat, 07 May 2011 18:55:15 +0400	[thread overview]
Message-ID: <20110507145636.099751964@gmail.com> (raw)
In-Reply-To: 20110507145514.476517775@gmail.com

[-- Attachment #1: kvm-tools-irq-pins --]
[-- Type: text/plain, Size: 1051 bytes --]

Only 4 pins are allowed for every PCI compilant device. Mutlifunctional
devices can use up to all INTA#,B#,C#,D# pins, for our sindle function
devices pin INTA# is enough.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 tools/kvm/irq.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6.git/tools/kvm/irq.c
=====================================================================
--- linux-2.6.git.orig/tools/kvm/irq.c
+++ linux-2.6.git/tools/kvm/irq.c
@@ -7,7 +7,6 @@
 #include <stddef.h>
 #include <stdlib.h>
 
-static u8		next_pin	= 1;
 static u8		next_line	= 3;
 static u8		next_dev	= 1;
 static struct rb_root	pci_tree	= RB_ROOT;
@@ -71,7 +70,13 @@ int irq__register_device(u32 dev, u8 *nu
 
 		*node = (struct pci_dev) {
 			.id	= dev,
-			.pin	= next_pin++,
+			/*
+			 * PCI supports only INTA#,B#,C#,D# per device.
+			 * B#,C#,D# are allowed for multifunctional
+			 * devices so stick with INTA# for our single
+			 * function devices.
+			 */
+			.pin	= 1,
 		};
 
 		INIT_LIST_HEAD(&node->lines);


  reply	other threads:[~2011-05-07 14:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-07 14:55 [patch 0/2] small fixes for PCI devices in mptable Cyrill Gorcunov
2011-05-07 14:55 ` Cyrill Gorcunov [this message]
2011-05-07 15:03   ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification Ingo Molnar
2011-05-07 15:07     ` Cyrill Gorcunov
2011-05-07 15:08       ` Ingo Molnar
2011-05-07 15:10         ` Cyrill Gorcunov
2011-05-07 15:07     ` Ingo Molnar
2011-05-07 15:05   ` Pekka Enberg
2011-05-07 15:09     ` Cyrill Gorcunov
2011-05-07 14:55 ` [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices Cyrill Gorcunov
2011-05-07 14:59   ` Cyrill Gorcunov
  -- strict thread matches above, loose matches on Subject: below --
2011-05-07 15:02 [patch 0/2] kvm tools, minor nits fixes, updated Cyrill Gorcunov
2011-05-07 15:02 ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 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=20110507145636.099751964@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=prasadjoshi124@gmail.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).