[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190812120517.2kktugib244ujgvb@rric.localdomain>
Date: Mon, 12 Aug 2019 12:05:25 +0000
From: Robert Richter <rrichter@...vell.com>
To: Borislav Petkov <bp@...en8.de>
CC: James Morse <james.morse@....com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 02/24] EDAC, ghes: Fix grain calculation
On 12.08.19 09:32:22, Borislav Petkov wrote:
> On Mon, Aug 12, 2019 at 06:42:00AM +0000, Robert Richter wrote:
> > With the grain_bits calculation the mask is rounded up to the next
> > power of 2 value.
>
> mask = 0xffffffffff00ff00
grain = ~mask + 1
> ~mask = 0x0000000000ff00ff
> ~mask + 1 = 0x0000000000ff0100
grain_bits = fls_long(e->grain - 1);
grain_bits = 24
grain = 1 << grain_bits
grain = 0x1000000
So for masks in the range from 0xffffffffff000000 to
0xffffffffff7fffff we have grain_bits set to 24, which corresponds to
a grain of 0x1000000. Looks good to me.
>
> Your "trick" of adding a 1 to get to the most significant bit simply
> doesn't work here. Thus:
>
> "I guess we can leave it like that for now until some "inventive"
> firmware actually does it."
Fine to me.
-Robert
Powered by blists - more mailing lists