From: Andrew Morton <akpm@linux-foundation.org>
To: "peerchen" <peerchen@gmail.com>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
"pchen" <pchen@nvidia.com>, "acurrid" <acurrid@nvidia.com>
Subject: Re: [PATCH 1/2] msi: set 'En' bit of MSI Mapping Capability on HT platform
Date: Tue, 27 Nov 2007 00:13:02 -0800 [thread overview]
Message-ID: <20071127001302.6e136aa3.akpm@linux-foundation.org> (raw)
In-Reply-To: <200711251121445151346@gmail.com>
On Sun, 25 Nov 2007 11:21:48 +0800 "peerchen" <peerchen@gmail.com> wrote:
> According to the HyperTransport spec, 'En' indicate if the MSI Mapping is active. So it should be set when enable the MSI.
>
> The patch base on kernel 2.6.24-rc3
>
> Signed-off-by: Andy Currid <acurrid@nvidia.com>
> Signed-off-by: Peer Chen <pchen@nvidia.com>
>
> ---
> --- linux-2.6.24-rc3/drivers/pci/msi.c.orig 2007-11-23 17:28:45.000000000 -0500
> +++ linux-2.6.24-rc3/drivers/pci/msi.c 2007-11-23 17:50:59.000000000 -0500
> @@ -20,6 +20,8 @@
> #include <asm/errno.h>
> #include <asm/io.h>
>
> +#include <asm/k8.h>
This inclusion makes msi.c x86-specific whereas it previously was not. I
assume that this change breaks arm, ia64, sparc64 and powerpc.
I'll queue the below ugliness to avoid this, but it would be nicer to move
these functions out to an arch-specific file and then require that all
MSI-using architectures implement them.
diff -puN drivers/pci/msi.c~msi-set-en-bit-of-msi-mapping-capability-on-ht-platform-fix drivers/pci/msi.c
--- a/drivers/pci/msi.c~msi-set-en-bit-of-msi-mapping-capability-on-ht-platform-fix
+++ a/drivers/pci/msi.c
@@ -20,7 +20,9 @@
#include <asm/errno.h>
#include <asm/io.h>
+#ifdef CONFIG_X86
#include <asm/k8.h>
+#endif
#include "pci.h"
#include "msi.h"
@@ -292,6 +294,7 @@ void pci_restore_msi_state(struct pci_de
}
#endif /* CONFIG_PM */
+#ifdef CONFIG_X86
/*
* pci_enable_msi_ht_cap - Set the HT MSI mapping capability En bit of
* a device.
@@ -384,6 +387,12 @@ static int pci_check_msi_ht_cap(struct p
}
return 0;
}
+#else
+static inline int pci_check_msi_ht_cap(struct pci_dev *dev)
+{
+ return 0;
+}
+#endif
/**
* msi_capability_init - configure device's MSI capability structure
_
next prev parent reply other threads:[~2007-11-27 8:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 3:21 [PATCH 1/2] msi: set 'En' bit of MSI Mapping Capability on HT platform peerchen
2007-11-25 10:21 ` Prakash Punnoor
2007-11-27 8:00 ` Andrew Morton
2007-11-26 9:43 ` Sébastien Dugué
2007-11-27 8:13 ` Andrew Morton [this message]
[not found] <fa.o8FrHkCTygSL3HgQ8yHeTr2D3tI@ifi.uio.no>
2007-11-25 18:33 ` Robert Hancock
2007-11-26 4:01 ` Peer Chen
2007-11-26 5:14 ` Andy Currid
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=20071127001302.6e136aa3.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=acurrid@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pchen@nvidia.com \
--cc=peerchen@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