All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: David Miller <davem@davemloft.net>
Cc: andi@firstfloor.org, torvalds@linux-foundation.org,
	mroos@linux.ee, linux-kernel@vger.kernel.org,
	sparclinux@vger.kernel.org
Subject: Re: reorganized struct inode results in unaligned accesses
Date: Sun, 19 Jun 2011 23:14:02 +0000	[thread overview]
Message-ID: <20110619231402.GK16236@one.firstfloor.org> (raw)
In-Reply-To: <20110619.160150.1199476848151993579.davem@davemloft.net>

> Hmmm, can this scheme actually work out properly on both big and
> little endian?  Because endianness determines whether the bits start
> in the "lower addressed" 32-bit word or the "higher addressed" 32-bit
> word.

True, it needs an ifdef, with the other order in BE. struct page has that iirc.

> 
> If this trick is being attempted elsewhere, I think it could perhaps
> account for some strange bugs :-)

Well if you want to be sure better try to get rid of the void *

(I tried early on in x86-64, it caused a lot of warnings all over)

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <andi@firstfloor.org>
To: David Miller <davem@davemloft.net>
Cc: andi@firstfloor.org, torvalds@linux-foundation.org,
	mroos@linux.ee, linux-kernel@vger.kernel.org,
	sparclinux@vger.kernel.org
Subject: Re: reorganized struct inode results in unaligned accesses
Date: Mon, 20 Jun 2011 01:14:02 +0200	[thread overview]
Message-ID: <20110619231402.GK16236@one.firstfloor.org> (raw)
In-Reply-To: <20110619.160150.1199476848151993579.davem@davemloft.net>

> Hmmm, can this scheme actually work out properly on both big and
> little endian?  Because endianness determines whether the bits start
> in the "lower addressed" 32-bit word or the "higher addressed" 32-bit
> word.

True, it needs an ifdef, with the other order in BE. struct page has that iirc.

> 
> If this trick is being attempted elsewhere, I think it could perhaps
> account for some strange bugs :-)

Well if you want to be sure better try to get rid of the void *

(I tried early on in x86-64, it caused a lot of warnings all over)

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

  reply	other threads:[~2011-06-19 23:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-19 16:33 reorganized struct inode results in unaligned accesses Meelis Roos
2011-06-19 16:33 ` Meelis Roos
2011-06-19 16:51 ` Linus Torvalds
2011-06-19 16:51   ` Linus Torvalds
2011-06-19 22:35   ` Andi Kleen
2011-06-19 22:35     ` Andi Kleen
2011-06-19 23:01     ` David Miller
2011-06-19 23:01       ` David Miller
2011-06-19 23:14       ` Andi Kleen [this message]
2011-06-19 23:14         ` Andi Kleen

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=20110619231402.GK16236@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=sparclinux@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 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.