Re: [PATCH v3 16/17] driver/edac: enable Hygon support to AMD64 EDAC driver

From
Michael Jin <hidden>
Date
2018-08-13 16:47:23
Also in
linux-edac, lkml
Reply to
Pu Wen, 2018-08-13
On Mon, Aug 13, 2018 at 12:17 PM, Pu Wen [off-list ref] wrote:
On 2018/8/12 3:56, Michael Jin wrote:
quoted
On Sat, Aug 11, 2018 at 9:30 AM, Pu Wen [off-list ref] wrote:
quoted
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
-       if (pvt->fam == 0x17) {
+       if (pvt->fam == 0x17 || pvt->vendor == X86_VENDOR_HYGON) {
                 __f17h_set_scrubval(pvt, scrubval);

Separating the vendor check as an "else if (pvt->vendor ==
X86_VENDOR_HYGON)" block would make architectural changes (future
hygon models, i.e. 19h, 20h, etc) less confusing.

Your suggestion is reasonable, but that might make the branch a little
complicated.If we explicitly testing Hygon family in condition case,
will that be ok?
+    if (pvt->fam == 0x17 ||
+       (pvt->vendor == X86_VENDOR_HYGON && pvt->fam == 0x18))
The condition case for family 18h and vendor Hygon looks better
because it is more clear.

Michael
Thread (37 messages) 37 messages, 7 authors, last reply 2018-08-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help