Re: [PATCH 3/3] EDAC, ghes: Make it a proper module

From: Kani, Toshimitsu
Date: Mon Jul 31 2017 - 16:19:40 EST


On Sat, 2017-07-29 at 08:47 +0200, Borislav Petkov wrote:
> On Fri, Jul 28, 2017 at 06:50:56PM +0000, Kani, Toshimitsu wrote:
> > This simply sets NULL to pvt, and does not initialize ghes_pvt.
>
> Yeah, I guess we need this ontop:

Yes, this fix looks good.

> > ÂAs Mauro pointed out, some type of GHES check needs to be in place
> > before making this change.
>
> Your whitelist I guess.

We still need the two mechanisms provided by the existing code below.
The whitelist simply compliments 1.

1. GHES-presence check. (We can add APEI OSC bit check as well.)
2. Module priority. ghes_edac has higher priority for registration.

I'd prefer to add the whitelist check to ghes_edac first. This makes
the existing code to work. We can then work on refactoring changes
like this on top of it without breaking the functionality.

Thanks,
-Toshi