Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3402442ybg; Sat, 6 Jun 2020 21:41:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnaz9hXEtEInYp/GW6Zunh1bmY8A2KaoJ2+zlIV7PrfH76eqUBUwmXOAqT0doVbd0xaCrt X-Received: by 2002:a17:906:7ac7:: with SMTP id k7mr16519386ejo.143.1591504888811; Sat, 06 Jun 2020 21:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591504888; cv=none; d=google.com; s=arc-20160816; b=JXf9U6a5tAv6AEFA2PRMJJ47TcaEdllQDv3igADzamBFJ0Q8DEGBgo8DIwfG1Zvq8r xFDDmQbZlPqOrU/ni5LNvj0cV6FkNixo1aTT8S64mrCp/WL5fSAqGren079zoijxrLiF 4uz32+E9upXHUDTKypn/7JyqRanuNX6Ee2bNJ2cE90960bVAtC9o1hKu3NoIT43lfEDQ YUH5c+jObaYjXBa0TRvagbJ1/LwoBr46zo8yC6T9iJe6xjevV4ybh6DVf5iyVhz4R/u2 CI3OkpG/NE0ydIOC2jnYu09FKNpzVn+5OO0Rwc1D1bp5bpKvMkmsgLXjFgIa9wfr4wN3 aWWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+RfD0GNAG9wtYBIqQI83YWVj2YPAQjhlZZhEwrpiUR0=; b=KPj3D4l5DOsNkHr/BQqxvd5UDm2ecyzkvBx65/gMurxVFwIkkOKEx4Fj9ESsHMuF0G drSFzhgKpwuJS91xcm5oQjZcP2p55ryYGKPcXrBWPHD1ehN7mwcjRpxHnZ0zO5Z3Qp5c tJ3Dv1mXlZp4H/trBgJt1gxuIv/TGJKMHQmENsXGDpIGPsDryaHmyXKgzXFnIGrUiztI ZMOZKTALv5qUQXMV6Mab85IOjimKaxg4VFMRxATDX3rkfTWHOrVU3ntYnvTDzGLLCtmO qtX151hXA39wo2D4M5eEO35Osu2LPqeN7UNGhqP+YARkpaGPfy+7cjeuPgBqdajNWRdZ ZajQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="nLMe/PmU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn10si6646317ejb.680.2020.06.06.21.41.06; Sat, 06 Jun 2020 21:41:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="nLMe/PmU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726388AbgFGEhq (ORCPT + 99 others); Sun, 7 Jun 2020 00:37:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbgFGEhp (ORCPT ); Sun, 7 Jun 2020 00:37:45 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F914C08C5C2; Sat, 6 Jun 2020 21:37:44 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id n9so5335304plk.1; Sat, 06 Jun 2020 21:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+RfD0GNAG9wtYBIqQI83YWVj2YPAQjhlZZhEwrpiUR0=; b=nLMe/PmUWDpie/4JGJYHvkGhZglWExGklzZHubXRcJ6RxiFhblxTs8k3fF10Uid1Ta bpc7bIEWxPpsiFBPi3SVzGXJ/tjHI+KiYncdvsCaC/HImbCqo82N0Qc3snQPMKZwzLDp zHSUlpFGgwzr6OuCuvmqJEeC3Ycv3PX31TewQteofq1cKucP6N9zeog0BqHP/sUeIfxK P0E6yzvLL0NLQH/9t3Eq9gPuIpT/Ridn796+GV/qg/2qiIRDWv+1ccLCp0ld51mjffX3 5uGUZpcfOMEg64PuGSiUMn1gIO7Z0CWVFGUGn5CMJncw7VCGMfm2DnZvmHPiMMzFYBsL drGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+RfD0GNAG9wtYBIqQI83YWVj2YPAQjhlZZhEwrpiUR0=; b=bwKEc2f8lSqySOlbS0D76NoUL7C61ABCF15VTXYyRyOFx6BoC+3yGybJuENGhdYA1p 8hRraikzhyDIjHFRqphhdKdhO0aFSCiiNyOfs5zxrd+CiKslSAmOuxgkTYmp4/QZ73Nt b+/K8xvg23WsBh/nBArdpYMBkArc1tOnI4DmgFSBJRQvOScEkm1ZO+K+meXTKyweIsFp np/x+I+8HnI9FsNSE/nPxw1WjNkvvd/U4UeDW8zVStZODEMJ6ng6R2OnlPSrxKenDMqb NMj2uJqFihb+IeVr1jZKOqqj/bVfIuu89lJW1wfKj6w1xg1Ru/KzAGFeJB4LOk8akYEi tjBQ== X-Gm-Message-State: AOAM53369ahSEnbzsD1RyYKLHLlItW0KGhZFo/G3KCZGhBvKGnH3H3qI OxIAQ4ixvpOpiiZvpouBimIU+yGMXg== X-Received: by 2002:a17:90b:517:: with SMTP id r23mr11643417pjz.191.1591504663554; Sat, 06 Jun 2020 21:37:43 -0700 (PDT) Received: from localhost (98.86.92.34.bc.googleusercontent.com. [34.92.86.98]) by smtp.gmail.com with ESMTPSA id t201sm3633265pfc.104.2020.06.06.21.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jun 2020 21:37:43 -0700 (PDT) From: Jacky Hu To: linux-edac@vger.kernel.org Cc: linux-kernel@vger.kernel.org, bp@alien8.de, tony.luck@intel.com, x86@kernel.org, Jacky Hu Subject: [PATCH 2/2] EDAC/amd64: Add family ops for Family 17h Models 60h-6Fh Date: Sun, 7 Jun 2020 12:37:09 +0800 Message-Id: <20200607043709.48178-3-hengqing.hu@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200607043709.48178-1-hengqing.hu@gmail.com> References: <20200607043709.48178-1-hengqing.hu@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add family ops to support AMD Family 17h, Models 60h-6Fh systems. Signed-off-by: Jacky Hu --- drivers/edac/amd64_edac.c | 14 ++++++++++++++ drivers/edac/amd64_edac.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 9cf7cc1f3f72..0e74027d3660 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2319,6 +2319,16 @@ static struct amd64_family_type family_types[] = { .dbam_to_cs = f17_addr_mask_to_cs_size, } }, + [F17_M60H_CPUS] = { + .ctl_name = "F17h_M60h", + .f0_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F0, + .f6_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F6, + .max_mcs = 2, + .ops = { + .early_channel_count = f17_early_channel_count, + .dbam_to_cs = f17_addr_mask_to_cs_size, + } + }, [F17_M70H_CPUS] = { .ctl_name = "F17h_M70h", .f0_id = PCI_DEVICE_ID_AMD_17H_M70H_DF_F0, @@ -3357,6 +3367,10 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt) fam_type = &family_types[F17_M30H_CPUS]; pvt->ops = &family_types[F17_M30H_CPUS].ops; break; + } else if (pvt->model >= 0x60 && pvt->model <= 0x6f) { + fam_type = &family_types[F17_M60H_CPUS]; + pvt->ops = &family_types[F17_M60H_CPUS].ops; + break; } else if (pvt->model >= 0x70 && pvt->model <= 0x7f) { fam_type = &family_types[F17_M70H_CPUS]; pvt->ops = &family_types[F17_M70H_CPUS].ops; diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index abbf3c274d74..52b5d03eeba0 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h @@ -120,6 +120,8 @@ #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F6 0x15ee #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F0 0x1490 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F6 0x1496 +#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F0 0x1448 +#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F6 0x144e #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F0 0x1440 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F6 0x1446 #define PCI_DEVICE_ID_AMD_19H_DF_F0 0x1650 @@ -293,6 +295,7 @@ enum amd_families { F17_CPUS, F17_M10H_CPUS, F17_M30H_CPUS, + F17_M60H_CPUS, F17_M70H_CPUS, F19_CPUS, NUM_FAMILIES, -- 2.27.0