* [PATCH] pciif: do not depend on linux' msix_entries
@ 2008-07-02 12:31 Samuel Thibault
2008-07-02 12:32 ` Samuel Thibault
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2008-07-02 12:31 UTC (permalink / raw)
To: xen-devel
pciif: do not depend on linux' msix_entries, and use a conversion loop
instead (already done in the frontend).
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
diff -r 3643a33de277 drivers/xen/pciback/conf_space_capability_msi.c
--- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Jun 30 16:14:04 2008 +0100
+++ b/drivers/xen/pciback/conf_space_capability_msi.c Wed Jul 02 12:46:30 2008 +0100
@@ -39,9 +39,21 @@
{
int result;
- result = pci_enable_msix(dev, op->msix_entries, op->value);
+ if (op->value > SH_INFO_MAX_VEC)
+ return -EINVAL;
+ else {
+ struct msix_entry entries[op->value];
+ int i;
- op->value = result;
+ for (i = 0; i < op->value; i++) {
+ entries[i].entry = op.msix_entries[i].entry;
+ entries[i].vector = op.msix_entries[i].vector;
+ }
+
+ result = pci_enable_msix(dev, entries, op->value);
+ op->value = result;
+ }
+
return result;
}
diff -r 3643a33de277 include/xen/interface/io/pciif.h
--- a/include/xen/interface/io/pciif.h Mon Jun 30 16:14:04 2008 +0100
+++ b/include/xen/interface/io/pciif.h Wed Jul 02 12:46:30 2008 +0100
@@ -54,6 +54,11 @@
*/
#define SH_INFO_MAX_VEC 128
+struct xen_msix_entry {
+ uint16_t vector;
+ uint16_t entry;
+};
+
struct xen_pci_op {
/* IN: what action to perform: XEN_PCI_OP_* */
uint32_t cmd;
@@ -75,7 +80,7 @@
/* IN: Contains extra infor for this operation */
uint32_t info;
/*IN: param for msi-x */
- struct msix_entry msix_entries[SH_INFO_MAX_VEC];
+ struct xen_msix_entry xen_msix_entries[SH_INFO_MAX_VEC];
};
struct xen_pci_sharedinfo {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] pciif: do not depend on linux' msix_entries
2008-07-02 12:31 [PATCH] pciif: do not depend on linux' msix_entries Samuel Thibault
@ 2008-07-02 12:32 ` Samuel Thibault
2008-07-03 5:28 ` Fix the build for linux cs585 (Re: [PATCH] pciif: do not depend on linux' msix_entries) Yosuke Iwamatsu
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2008-07-02 12:32 UTC (permalink / raw)
To: xen-devel
[PATCH] pciif: do not depend on linux' msix_entries
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
diff -r 0361bcf5d310 xen/include/public/io/pciif.h
--- a/xen/include/public/io/pciif.h Tue Jul 01 14:48:29 2008 +0100
+++ b/xen/include/public/io/pciif.h Wed Jul 02 13:32:39 2008 +0100
@@ -54,6 +54,10 @@
*/
#define SH_INFO_MAX_VEC 128
+struct xen_msix_entry {
+ uint16_t vector;
+ uint16_t entry;
+};
struct xen_pci_op {
/* IN: what action to perform: XEN_PCI_OP_* */
uint32_t cmd;
@@ -75,7 +79,7 @@
/* IN: Contains extra infor for this operation */
uint32_t info;
/*IN: param for msi-x */
- struct msix_entry msix_entries[SH_INFO_MAX_VEC];
+ struct xen_msix_entry msix_entries[SH_INFO_MAX_VEC];
};
struct xen_pci_sharedinfo {
^ permalink raw reply [flat|nested] 3+ messages in thread* Fix the build for linux cs585 (Re: [PATCH] pciif: do not depend on linux' msix_entries)
2008-07-02 12:32 ` Samuel Thibault
@ 2008-07-03 5:28 ` Yosuke Iwamatsu
0 siblings, 0 replies; 3+ messages in thread
From: Yosuke Iwamatsu @ 2008-07-03 5:28 UTC (permalink / raw)
To: samuel.thibault, xen-devel
Hi,
I failed to compile latest linux-2.6.18.8-xen. The modification below
will fix the build of pciback.
Thanks,
--Yosuke
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
diff -r 72786307fa4c drivers/xen/pciback/conf_space_capability_msi.c
--- a/drivers/xen/pciback/conf_space_capability_msi.c Wed Jul 02
13:36:55 2008 +0100
+++ b/drivers/xen/pciback/conf_space_capability_msi.c Thu Jul 03
14:29:22 2008 +0900
@@ -46,8 +46,8 @@ int pciback_enable_msix(struct pciback_d
int i;
for (i = 0; i < op->value; i++) {
- entries[i].entry = op.msix_entries[i].entry;
- entries[i].vector = op.msix_entries[i].vector;
+ entries[i].entry = op->msix_entries[i].entry;
+ entries[i].vector = op->msix_entries[i].vector;
}
result = pci_enable_msix(dev, entries, op->value);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-03 5:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 12:31 [PATCH] pciif: do not depend on linux' msix_entries Samuel Thibault
2008-07-02 12:32 ` Samuel Thibault
2008-07-03 5:28 ` Fix the build for linux cs585 (Re: [PATCH] pciif: do not depend on linux' msix_entries) Yosuke Iwamatsu
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.