[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49FF24F8.5050008@zytor.com>
Date: Mon, 04 May 2009 10:25:12 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <borislav.petkov@....com>
CC: akpm@...ux-foundation.org, greg@...ah.com, mingo@...e.hu,
tglx@...utronix.de, dougthompson@...ssion.com,
linux-kernel@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@...hat.com>
Subject: Re: [PATCH 01/21] x86: add methods for writing of an MSR on several
CPUs
Borislav Petkov wrote:
>>
>> Please, for the love of God, no!
>>
>> Make it an array of u64s or (equivalently!) an array of (l,h)
>> structures, not separate arrays for the halves of the register.
>
> how about something like the following then? If there's agreement I could
> convert all users to struct msr later.
>
I personally would prefer if you just used an array of u64s. The whole
l/h split for MSRs was a mistake in the first place. However, if not,
at least make it a union; using something like:
union msr {
u32 l[2];
u64 q;
};
Or fancier, using gcc's anonymous structs/unions:
struct msr {
union {
struct {
u32 l, h;
};
u64 q;
};
};
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
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