From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Borislav Petkov <bp@alien8.de>
Cc: James Morse <james.morse@arm.com>,
"Hawa, Hanna" <hhhawa@amazon.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"Woodhouse, David" <dwmw@amazon.co.uk>,
"paulmck@linux.ibm.com" <paulmck@linux.ibm.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"nicolas.ferre@microchip.com" <nicolas.ferre@microchip.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Shenhar, Talel" <talel@amazon.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Chocron, Jonathan" <jonnyc@amazon.com>,
"Krupnik, Ronen" <ronenk@amazon.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"Hanoch, Uri" <hanochu@amazon.com>
Subject: Re: [PATCH 2/2] edac: add support for Amazon's Annapurna Labs EDAC
Date: Tue, 11 Jun 2019 15:50:40 +1000 [thread overview]
Message-ID: <1ae5e7a3464f9d8e16b112cd371957ea20472864.camel@kernel.crashing.org> (raw)
In-Reply-To: <20190608090556.GA32464@zn.tnic>
On Sat, 2019-06-08 at 11:05 +0200, Borislav Petkov wrote:
> On Sat, Jun 08, 2019 at 10:16:11AM +1000, Benjamin Herrenschmidt wrote:
> > Those IP blocks don't need any SW coordination at runtime. The drivers
> > don't share data nor communicate with each other. There is absolultely
> > no reason to go down that path.
>
> Let me set one thing straight: the EDAC "subsystem" if you will - or
> that pile of code which does error counting and reporting - has its
> limitations in supporting one EDAC driver per platform. And whenever we
> have two drivers loadable on a platform, we have to do dirty hacks like
>
> 301375e76432 ("EDAC: Add owner check to the x86 platform drivers")
>
> What that means is, that if you need to call EDAC logging routines or
> whatnot from two different drivers, there's no locking, no nothing. So
> it might work or it might set your cat on fire.
Should we fix that then instead ? What are the big issues with adding
some basic locking ? being called from NMIs ?
If the separate drivers operate on distinct counters I don't see a big
problem there.
> IOW, having multiple separate "drivers" or representations of RAS
> functionality using EDAC facilities is something that hasn't been
> done. Well, almost. highbank_mc_edac.c and highbank_l2_edac.c is one
> example but they make sure they don't step on each other's toes by using
> different EDAC pieces - a device vs a memory controller abstraction.
That sounds like a reasonable requirement.
> And now the moment all of a sudden you decide you want for those
> separate "drivers" to synchronize on something, you need to do something
> hacky like the amd_register_ecc_decoder() thing, for example, because we
> need to call into the EDAC memory controller driver to decode a DRAM ECC
> error properly, while the rest of the error types get decoded somewhere
> else...
>
> Then there comes the issue with code reuse - wouldn't it be great if a
> memory controller driver can be shared between platform drivers instead of
> copying it in both?
>
> We already do that - see fsl_ddr_edac.c which gets shared between PPC
> *and* ARM. drivers/edac/skx_common.c is another example for Intel chips.
>
> Now, if you have a platform with 10 IP blocks which each have RAS
> functionality, are you saying you'll do 10 different pieces called
>
> <platform_name>_<ip_block#>_edac.c
>
> ?
>
> And if <next_platform> has an old IP block with the old RAS
> functionality, you load <platform_name>_<ip_block>_edac.c on the new
> platform too?
I'n not sure why <platform_name> ...
Anyway, let's get back to the specific case of our Amazon platform here
since it's a concrete example.
Hanna, can you give us a reasonably exhaustive list of how many such
"drivers" we'll want in the EDAC subsystem and whether you envision any
coordination requirement between them or not ?
Cheers,
Ben.
next prev parent reply other threads:[~2019-06-11 5:51 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 10:15 [PATCH 0/2] Add support for Amazon's Annapurna Labs EDAC for L1/L2 Hanna Hawa
2019-05-30 10:15 ` [PATCH 1/2] dt-bindings: EDAC: add Amazon Annapurna Labs EDAC binding Hanna Hawa
2019-05-30 11:54 ` Greg KH
2019-05-31 0:35 ` Borislav Petkov
2019-05-30 10:15 ` [PATCH 2/2] edac: add support for Amazon's Annapurna Labs EDAC Hanna Hawa
2019-05-30 11:57 ` Greg KH
2019-05-30 12:52 ` hhhawa
2019-05-30 13:04 ` Joe Perches
2019-05-30 18:19 ` Boris Petkov
2019-05-31 1:15 ` Herrenschmidt, Benjamin
2019-05-31 5:14 ` Borislav Petkov
2019-06-05 15:13 ` James Morse
2019-06-06 7:53 ` Hawa, Hanna
2019-06-06 10:03 ` Borislav Petkov
2019-06-06 10:33 ` James Morse
2019-06-06 11:22 ` Borislav Petkov
2019-06-06 11:37 ` Shenhar, Talel
2019-06-07 15:11 ` James Morse
2019-06-08 0:22 ` Benjamin Herrenschmidt
2019-06-08 0:16 ` Benjamin Herrenschmidt
2019-06-08 9:05 ` Borislav Petkov
2019-06-11 5:50 ` Benjamin Herrenschmidt [this message]
2019-06-11 7:21 ` Benjamin Herrenschmidt
2019-06-11 11:56 ` Borislav Petkov
2019-06-11 22:25 ` Benjamin Herrenschmidt
2019-06-12 3:48 ` Borislav Petkov
2019-06-12 8:29 ` Benjamin Herrenschmidt
2019-06-12 10:42 ` Borislav Petkov
2019-06-12 23:54 ` Benjamin Herrenschmidt
2019-06-13 7:44 ` Borislav Petkov
2019-06-14 10:53 ` Borislav Petkov
2019-06-12 10:42 ` Mauro Carvalho Chehab
2019-06-12 11:00 ` Borislav Petkov
2019-06-12 11:42 ` Mauro Carvalho Chehab
2019-06-12 11:57 ` Benjamin Herrenschmidt
2019-06-12 12:25 ` Borislav Petkov
2019-06-12 12:35 ` Hawa, Hanna
2019-06-12 15:34 ` Borislav Petkov
2019-06-12 23:57 ` Benjamin Herrenschmidt
2019-06-12 23:56 ` Benjamin Herrenschmidt
2019-06-11 7:29 ` Hawa, Hanna
2019-06-11 11:59 ` Borislav Petkov
2019-06-11 11:47 ` Borislav Petkov
2019-06-03 6:56 ` Hawa, Hanna
2019-06-05 15:16 ` James Morse
2019-06-11 19:56 ` Hawa, Hanna
2019-06-13 17:05 ` James Morse
2019-06-14 10:49 ` James Morse
2019-06-17 13:00 ` Hawa, Hanna
2019-06-19 17:22 ` James Morse
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=1ae5e7a3464f9d8e16b112cd371957ea20472864.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=bp@alien8.de \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dwmw@amazon.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=hanochu@amazon.com \
--cc=hhhawa@amazon.com \
--cc=james.morse@arm.com \
--cc=jonnyc@amazon.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=paulmck@linux.ibm.com \
--cc=robh+dt@kernel.org \
--cc=ronenk@amazon.com \
--cc=talel@amazon.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;
as well as URLs for NNTP newsgroup(s).