linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blkiomon: fix unaligned accesses on ia64
@ 2009-05-06 21:49 Eric Sandeen
  2009-05-08 16:09 ` Martin Peschke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Sandeen @ 2009-05-06 21:49 UTC (permalink / raw)
  To: linux-btrace

commit 7aa3ebcec011bfe9cc60d6476252c03376a37551 packed
the blkiomon_stat structure so that traces from one 
arch could be analyzed on another (in truth only x86
is different, at least from x86_64/ia64/ppc/ppc64/s390/s390x)

Rather than packing it, which generates unaligned access
warnings on ia64, just pad the structure out so that it's
naturally aligned on all arches.

Martin, care to test this to be sure it still works for
you?  (I'm not sure if we might also need a 4 byte pad on 
the end of the structure to align the containing structure...)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/blkiomon.h b/blkiomon.h
index 2e430a6..ae48b4c 100644
--- a/blkiomon.h
+++ b/blkiomon.h
@@ -34,6 +34,7 @@ struct blkiomon_stat {
 	__u64 time;
 	__u32 size_hist[BLKIOMON_SIZE_BUCKETS];
 	__u32 d2c_hist[BLKIOMON_D2C_BUCKETS];
+	__u32 pad; /* Align the structure */
 	struct minmax size_r;
 	struct minmax size_w;
 	struct minmax d2c_r;
@@ -42,7 +43,7 @@ struct blkiomon_stat {
 	struct minmax thrput_w;
 	__u64 bidir;
 	__u32 device;
-} __attribute__ ((packed));
+};
 
 static struct histlog2 size_hist = {
 	.first = 0,


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-11  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06 21:49 [PATCH] blkiomon: fix unaligned accesses on ia64 Eric Sandeen
2009-05-08 16:09 ` Martin Peschke
2009-05-08 16:22 ` Eric Sandeen
2009-05-11  6:41 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).