public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: "Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net>,
	linux-kernel@vger.kernel.org, tom.l.nguyen@intel.com,
	iss_storagedev@hp.com, jens.axboe@oracle.com,
	Michael Ellerman <michael@ellerman.id.au>
Subject: Re: [PATCH] msi: Fix the ordering of msix irqs.
Date: Thu, 24 May 2007 14:17:20 -0700	[thread overview]
Message-ID: <20070524141720.c02582db.akpm@linux-foundation.org> (raw)
In-Reply-To: <m1hcq2dj5m.fsf_-_@ebiederm.dsl.xmission.com>

On Thu, 24 May 2007 15:08:21 -0600
ebiederm@xmission.com (Eric W. Biederman) wrote:

> Yours looks more complete then my test patch so:
> 
> From: "Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net> writes:
> 
> Found what seems the problem with our vectors being listed backward. In
> drivers/pci/msi.c we should be using list_add_tail rather than list_add to
> preserve the ordering across various kernels. Please consider this for
> inclusion.
> 
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> 
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 0e67723..d74975d 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -333,7 +333,7 @@ static int msi_capability_init(struct pci_dev *dev)
>  			msi_mask_bits_reg(pos, is_64bit_address(control)),
>  			maskbits);
>  	}
> -	list_add(&entry->list, &dev->msi_list);
> +	list_add_tail(&entry->list, &dev->msi_list);
>  
>  	/* Configure MSI capability structure */
>  	ret = arch_setup_msi_irqs(dev, 1, PCI_CAP_ID_MSI);
> @@ -404,7 +404,7 @@ static int msix_capability_init(struct pci_dev *dev,
>  		entry->dev = dev;
>  		entry->mask_base = base;
>  
> -		list_add(&entry->list, &dev->msi_list);
> +		list_add_tail(&entry->list, &dev->msi_list);
>  	}
>  
>  	ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);

Is this as fragile as I think it is?  What happens when close+open and
rmmod+modprobe happen?  The list gets reordered then?

If this is important then perhaps a big-fat-comment which explains wtf is
going on is needed?


  reply	other threads:[~2007-05-24 21:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 16:07 msi_free_irqs #2 Mike Miller (OS Dev)
2007-05-24 17:27 ` Andrew Morton
2007-05-24 19:42   ` Eric W. Biederman
2007-05-24 20:59     ` Mike Miller (OS Dev)
2007-05-24 21:08       ` [PATCH] msi: Fix the ordering of msix irqs Eric W. Biederman
2007-05-24 21:17         ` Andrew Morton [this message]
2007-05-24 21:36           ` Eric W. Biederman
2007-05-25  2:32         ` Michael Ellerman
2007-05-25  3:04           ` kernel crash in timer interrupt handler gshan
2007-05-24 20:07   ` msi_free_irqs #2 Mike Miller (OS Dev)
2007-05-24 20:53     ` Eric W. Biederman
2007-05-24 21:01       ` Mike Miller (OS Dev)
2007-05-24 21:11       ` Mike Miller (OS Dev)
2007-05-25  3:16         ` [PATCH] msi: mask the msix vector before we unmap it Eric W. Biederman

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=20070524141720.c02582db.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=iss_storagedev@hp.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@ellerman.id.au \
    --cc=mikem@beardog.cca.cpqcorp.net \
    --cc=tom.l.nguyen@intel.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