Re: [PATCH] Altix system controller event handling

From: Greg Howard <ghoward_at_sgi.com>
Date: 2005-03-11 09:55:30
On Thu, 10 Mar 2005, Andreas Schwab wrote:

> Greg Howard <ghoward@sgi.com> writes:
>
> > On Thu, 10 Mar 2005, Andreas Schwab wrote:
> >
> >>
> >> Or even better: replace scdrv_buffer_to_int by be32_to_cpup.
> >
> > Sounds like a good idea.  Will be32_to_cpup work if the
> > argument isn't word-aligned?
>
> Probably not, ie. it will result in an unaligned access.

Hmmm...  Well, for what it's worth I went ahead and tried it,
and it worked.  Looking at the code and how my test behaved (it
worked correctly and interpreted an entire event buffer), I
don't see anyway I could have *avoided* passing a
non-word-aligned pointer to be32_to_cpup at some point in the
byte stream-- but I didn't see any hiccups, still less an
unaligned access error.  Maybe the compiler is doing me a favor
behind the scenes...?  Anyhow, it seems to work, so unless
you or others have misgivings I'm inclined to let the revised
patch (as I sent it earlier today) stand.

Thanks all for your help.
- Greg
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Mar 10 18:20:13 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:36 EST