All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: penberg@kernel.org
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
	mingo@elte.hu, levinsasha928@gmail.com, asias.hejun@gmail.com,
	prasadjoshi124@gmail.com, kvm@vger.kernel.org
Subject: Re: [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices
Date: Sat, 07 May 2011 18:59:28 +0400	[thread overview]
Message-ID: <4DC55E50.4070504@gmail.com> (raw)
In-Reply-To: <20110507145636.384301162@gmail.com>

On 05/07/2011 06:55 PM, Cyrill Gorcunov wrote:
> The kernel expects srcbusirq follows MP specification and consists
> a tuple of PCI device number with pin encoded. Make it so, otherwise
> the kernel reports kind of "buggy MP table" found.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>  tools/kvm/mptable.c |   10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6.git/tools/kvm/mptable.c
> =====================================================================
> --- linux-2.6.git.orig/tools/kvm/mptable.c
> +++ linux-2.6.git/tools/kvm/mptable.c
> @@ -191,12 +191,16 @@ void mptable_setup(struct kvm *kvm, unsi
>  
>  	for (pci_tree = irq__get_pci_tree(); pci_tree; pci_tree = rb_next(pci_tree)) {
>  		struct pci_dev *dev = rb_entry(pci_tree, struct pci_dev, node);
> -		struct irq_line *tmp;
> +		struct irq_line *irq_line;
> +
> +		list_for_each_entry(irq_line, &dev->lines, node) {
> +			unsigned char srcbusirq;
> +
> +			srcbusirq = (dev->id << 2) | (dev->pin - 1);
>  
> -		list_for_each_entry(tmp, &dev->lines, node) {
>  			mpc_intsrc = last_addr;
>  
> -			mptable_add_irq_src(mpc_intsrc, pcibusid, dev->pin, ioapicid, tmp->line);
> +			mptable_add_irq_src(mpc_intsrc, pcibusid, dev->pin, ioapicid, irq_line->line);
>  			last_addr = (void *)&mpc_intsrc[1];
>  			nentries++;
>  		}
> 

Crap, forgot to update quilt. Pekka drop this series please.

-- 
Thanks,
  Cyrill

  reply	other threads:[~2011-05-07 14:59 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 ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification Cyrill Gorcunov
2011-05-07 15:03   ` 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 [this message]
2011-05-07 15:02 [patch 0/2] kvm tools, minor nits fixes, updated Cyrill Gorcunov
2011-05-07 15:02 ` [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices 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=4DC55E50.4070504@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 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.