[ofa-general] Re: [PATCH] ib_umad unaligned access on ia64
Roland Dreier
rdreier at cisco.com
Thu Aug 9 19:29:02 PDT 2007
> > I thought we already dealt with this one in commit fa7252ed?
>
> I didn't see anything which obviously addresses this in
> any tree I found at kernel.org or openfabrics.org, but
> maybe I didn't look in the right tree.
this is the commit I'm talking about; I think it went into 2.6.21 but
I'm not sure. Anyway it seems it should make sure that the tid
member is aligned to 8 bytes, or at least I think it should:
commit fa7252ed4d92397baf30e4a144af95a33eaa925b
Author: Jason Gunthorpe <jgunthorpe at obsidianresearch.com>
Date: Fri Jan 19 11:58:49 2007 -0700
IB: Make sure struct ib_user_mad.data is aligned
Make the untyped data region in ib_user_mad have type u64 so that it
gets aligned properly. This avoids alignment faults in ib_umad when
casting the data field to an rmpp_mad and accessing the 64-bit tid
field on architectures like ia64.
Signed-off-by: Jason Gunthorpe <jgunthorpe at obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd at cisco.com>
diff --git a/include/rdma/ib_user_mad.h b/include/rdma/ib_user_mad.h
index 44537aa..d66b15e 100644
--- a/include/rdma/ib_user_mad.h
+++ b/include/rdma/ib_user_mad.h
@@ -98,7 +98,7 @@ struct ib_user_mad_hdr {
*/
struct ib_user_mad {
struct ib_user_mad_hdr hdr;
- __u8 data[0];
+ __u64 data[0];
};
/**
More information about the general
mailing list