linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 4/7] x86, mce: create helper function to save addr/misc when needed
       [not found]   ` <0207C53569FE594381A4F2EB66570B2A018F05A9FB@orsmsx508.amr.corp.intel.com>
@ 2011-12-14 16:09     ` Borislav Petkov
  0 siblings, 0 replies; only message in thread
From: Borislav Petkov @ 2011-12-14 16:09 UTC (permalink / raw)
  To: Luck, Tony; +Cc: Ingo Molnar, Huang, Ying, Hidetoshi Seto, LKML

On Tue, Dec 13, 2011 at 09:44:07AM -0800, Luck, Tony wrote:
> > Am I reading this correctly in that you need to cut off the same amount
> > of bits on both sides of MCi_ADDR and the address magnitude coincides
> > with the left shift amount? I.e. and for example, if MCi_ADDR[44:3]
> > and you need to cut off 3 bits of both sides to get a 48-bit physical
> > address?
> 
> No - just masking bits at the low end (shift right and the bits we don't
> want fall into the bit bucket, shift left by the same amount and we fill
> those spots with zeroes).  Upper bits are unchanged.

Doh, of course, I must be drunk. Please disregard this comment.

> 
> I could write it as:
> 			m->addr &= ~((1ull << shift) - 1);

> 
> But I think the shift-right, shift-left is used elsewhere in the kernel too.

No, yours is fine.

ACK.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-14 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <e7943938-eaae-41c4-a7e6-272f0832495f@DB3EHSMHS002.ehs.local>
     [not found] ` <20111213144948.GH15077@aftab>
     [not found]   ` <0207C53569FE594381A4F2EB66570B2A018F05A9FB@orsmsx508.amr.corp.intel.com>
2011-12-14 16:09     ` [PATCH 4/7] x86, mce: create helper function to save addr/misc when needed Borislav Petkov

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).