From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v3 3/5] ghes_edac: add platform check to enable ghes_edac Date: Wed, 23 Aug 2017 18:20:53 +0200 Message-ID: <20170823162053.4nns6ytekw5fychw@pd.tnic> References: <20170818194644.14538-1-toshi.kani@hpe.com> <20170818194644.14538-4-toshi.kani@hpe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20170818194644.14538-4-toshi.kani@hpe.com> Sender: linux-kernel-owner@vger.kernel.org To: Toshi Kani Cc: rjw@rjwysocki.net, mchehab@kernel.org, tony.luck@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-acpi@vger.kernel.org On Fri, Aug 18, 2017 at 01:46:42PM -0600, Toshi Kani wrote: > The ghes_edac driver was introduced in 2013 [1], but it has not > been enabled by any distro yet. This driver obtains error info > from firmware interfaces, which are not properly implemented on > many platforms, as the driver always emits the messages below: > > This EDAC driver relies on BIOS to enumerate memory and get error reports. > Unfortunately, not all BIOSes reflect the memory layout correctly > So, the end result of using this driver varies from vendor to vendor > If you find incorrect reports, please contact your hardware vendor > to correct its BIOS. > > To get out from this situation, add a platform check to selectively > enable the driver on the platforms that are known to have proper > firmware implementation. Platform vendors can add their platforms > to the list when they support ghes_edac. > > "ghes_edac.force_load=1" skips this platform check. > > [1]: https://lwn.net/Articles/538438/ > Signed-off-by: Toshi Kani > Cc: Borislav Petkov > Cc: Mauro Carvalho Chehab > Cc: Tony Luck > --- > drivers/edac/ghes_edac.c | 28 +++++++++++++++++++++++----- > 1 file changed, 23 insertions(+), 5 deletions(-) Ok, for the remaining three, I've updated my "ghes" branch here: https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=ghes Please, redo them ontop. @Rafael: how do you want to handle this? The first two are ACPI patches and the remaining three are EDAC. It would be probably easier if you acked the ACPI ones (but wait until Toshi's next version) and took them all through the EDAC tree as I have two more reworking that ghes_edac driver. Alternatively, they could all go through the ACPI tree but you'll have to pick them all up together. That shouldn't be a problem either as all changes are solely to drivers/edac/ghes_edac.c and there's one other patch in my EDAC pile which touches ghes_edac.c: https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/diff/drivers/edac/ghes_edac.c?h=for-next&id=c54182ec0e157988f0cafd1e8d37b68ab4210f87 That's why I say, it'll be easier if I carried them all. :) But I'm sure we can work something out. Thanks. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932461AbdHWQVV (ORCPT ); Wed, 23 Aug 2017 12:21:21 -0400 Received: from mail.skyhub.de ([5.9.137.197]:51660 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932129AbdHWQVG (ORCPT ); Wed, 23 Aug 2017 12:21:06 -0400 Date: Wed, 23 Aug 2017 18:20:53 +0200 From: Borislav Petkov To: Toshi Kani , "Rafael J. Wysocki" Cc: rjw@rjwysocki.net, mchehab@kernel.org, tony.luck@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/5] ghes_edac: add platform check to enable ghes_edac Message-ID: <20170823162053.4nns6ytekw5fychw@pd.tnic> References: <20170818194644.14538-1-toshi.kani@hpe.com> <20170818194644.14538-4-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170818194644.14538-4-toshi.kani@hpe.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 18, 2017 at 01:46:42PM -0600, Toshi Kani wrote: > The ghes_edac driver was introduced in 2013 [1], but it has not > been enabled by any distro yet. This driver obtains error info > from firmware interfaces, which are not properly implemented on > many platforms, as the driver always emits the messages below: > > This EDAC driver relies on BIOS to enumerate memory and get error reports. > Unfortunately, not all BIOSes reflect the memory layout correctly > So, the end result of using this driver varies from vendor to vendor > If you find incorrect reports, please contact your hardware vendor > to correct its BIOS. > > To get out from this situation, add a platform check to selectively > enable the driver on the platforms that are known to have proper > firmware implementation. Platform vendors can add their platforms > to the list when they support ghes_edac. > > "ghes_edac.force_load=1" skips this platform check. > > [1]: https://lwn.net/Articles/538438/ > Signed-off-by: Toshi Kani > Cc: Borislav Petkov > Cc: Mauro Carvalho Chehab > Cc: Tony Luck > --- > drivers/edac/ghes_edac.c | 28 +++++++++++++++++++++++----- > 1 file changed, 23 insertions(+), 5 deletions(-) Ok, for the remaining three, I've updated my "ghes" branch here: https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=ghes Please, redo them ontop. @Rafael: how do you want to handle this? The first two are ACPI patches and the remaining three are EDAC. It would be probably easier if you acked the ACPI ones (but wait until Toshi's next version) and took them all through the EDAC tree as I have two more reworking that ghes_edac driver. Alternatively, they could all go through the ACPI tree but you'll have to pick them all up together. That shouldn't be a problem either as all changes are solely to drivers/edac/ghes_edac.c and there's one other patch in my EDAC pile which touches ghes_edac.c: https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/diff/drivers/edac/ghes_edac.c?h=for-next&id=c54182ec0e157988f0cafd1e8d37b68ab4210f87 That's why I say, it'll be easier if I carried them all. :) But I'm sure we can work something out. Thanks. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [v3,3/5] ghes_edac: add platform check to enable ghes_edac From: Borislav Petkov Message-Id: <20170823162053.4nns6ytekw5fychw@pd.tnic> Date: Wed, 23 Aug 2017 18:20:53 +0200 To: Toshi Kani , "Rafael J. Wysocki" Cc: mchehab@kernel.org, tony.luck@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org List-ID: T24gRnJpLCBBdWcgMTgsIDIwMTcgYXQgMDE6NDY6NDJQTSAtMDYwMCwgVG9zaGkgS2FuaSB3cm90 ZToKPiBUaGUgZ2hlc19lZGFjIGRyaXZlciB3YXMgaW50cm9kdWNlZCBpbiAyMDEzIFsxXSwgYnV0 IGl0IGhhcyBub3QKPiBiZWVuIGVuYWJsZWQgYnkgYW55IGRpc3RybyB5ZXQuICBUaGlzIGRyaXZl ciBvYnRhaW5zIGVycm9yIGluZm8KPiBmcm9tIGZpcm13YXJlIGludGVyZmFjZXMsIHdoaWNoIGFy ZSBub3QgcHJvcGVybHkgaW1wbGVtZW50ZWQgb24KPiBtYW55IHBsYXRmb3JtcywgYXMgdGhlIGRy aXZlciBhbHdheXMgZW1pdHMgdGhlIG1lc3NhZ2VzIGJlbG93Ogo+IAo+ICBUaGlzIEVEQUMgZHJp dmVyIHJlbGllcyBvbiBCSU9TIHRvIGVudW1lcmF0ZSBtZW1vcnkgYW5kIGdldCBlcnJvciByZXBv cnRzLgo+ICBVbmZvcnR1bmF0ZWx5LCBub3QgYWxsIEJJT1NlcyByZWZsZWN0IHRoZSBtZW1vcnkg bGF5b3V0IGNvcnJlY3RseQo+ICBTbywgdGhlIGVuZCByZXN1bHQgb2YgdXNpbmcgdGhpcyBkcml2 ZXIgdmFyaWVzIGZyb20gdmVuZG9yIHRvIHZlbmRvcgo+ICBJZiB5b3UgZmluZCBpbmNvcnJlY3Qg cmVwb3J0cywgcGxlYXNlIGNvbnRhY3QgeW91ciBoYXJkd2FyZSB2ZW5kb3IKPiAgdG8gY29ycmVj dCBpdHMgQklPUy4KPiAKPiBUbyBnZXQgb3V0IGZyb20gdGhpcyBzaXR1YXRpb24sIGFkZCBhIHBs YXRmb3JtIGNoZWNrIHRvIHNlbGVjdGl2ZWx5Cj4gZW5hYmxlIHRoZSBkcml2Z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