From: Borislav Petkov <bp@amd64.org>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>, "Huang, Ying" <ying.huang@intel.com>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/7] x86, mce: create helper function to save addr/misc when needed
Date: Wed, 14 Dec 2011 17:09:29 +0100 [thread overview]
Message-ID: <20111214160929.GI23589@aftab> (raw)
In-Reply-To: <0207C53569FE594381A4F2EB66570B2A018F05A9FB@orsmsx508.amr.corp.intel.com>
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
parent reply other threads:[~2011-12-14 16:09 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <0207C53569FE594381A4F2EB66570B2A018F05A9FB@orsmsx508.amr.corp.intel.com>]
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=20111214160929.GI23589@aftab \
--to=bp@amd64.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=tony.luck@intel.com \
--cc=ying.huang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox