[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 May 2010 11:59:24 +0900
From: Takuya Yoshikawa <takuya.yoshikawa@...il.com>
To: Avi Kivity <avi@...hat.com>
Cc: Arnd Bergmann <arnd@...db.de>, mtosatti@...hat.com, agraf@...e.de,
yoshikawa.takuya@....ntt.co.jp, fernando@....ntt.co.jp,
kvm@...r.kernel.org, kvm-ppc@...r.kernel.org,
kvm-ia64@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, benh@...nel.crashing.org,
paulus@...ba.org, linuxppc-dev@...abs.org,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit
offset macro
On Tue, 04 May 2010 19:08:23 +0300
Avi Kivity <avi@...hat.com> wrote:
> On 05/04/2010 06:03 PM, Arnd Bergmann wrote:
> > On Tuesday 04 May 2010, Takuya Yoshikawa wrote:
...
> >> So let us use the le bit offset calculation part by defining it as a new
> >> macro: generic_le_bit_offset() .
> >>
> > Does this work correctly if your user space is 32 bits (i.e. unsigned long
> > is different size in user space and kernel) in both big- and little-endian
> > systems?
> >
> > I'm not sure about all the details, but I think you cannot in general share
> > bitmaps between user space and kernel because of this.
> >
>
> That's why the bitmaps are defined as little endian u64 aligned, even on
> big endian 32-bit systems. Little endian bitmaps are wordsize agnostic,
> and u64 alignment ensures we can use long-sized bitops on mixed size
> systems.
There was a suggestion to propose set_le_bit_user() kind of macros.
But what I thought was these have a constraint you two explained and seemed to be
a little bit specific to some area, like KVM.
So I decided to propose just the offset calculation macro.
Thanks, Takuya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists