Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4700387pxv; Tue, 20 Jul 2021 09:37:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqbHb6JYRbT51bDxn9zu0YzEnx1lByQF7OF9p+BkZlADRryDniAt5+MhUKTMEl7tMcKT93 X-Received: by 2002:a05:6402:198:: with SMTP id r24mr42448651edv.93.1626799031698; Tue, 20 Jul 2021 09:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626799031; cv=none; d=google.com; s=arc-20160816; b=kMJ7STHZk/YKtTiMnMm1aNthBN4/KjOSDiLAtbIn3RfL/G0waQqHGHiGkEcCZOKKAt IFqw3S0p5hqeZ1F/YD3uvSJCb0Nz6qyIs0Yuy2zWKFxllmrUtK4/wt3iFvbDUB83uciC 0hG7y1xYe1/tkk8hB1pkgmmTrjel1h/qDD7kqfFv3KKa8uJZ9aeiubgYxCp9OE6mX/7w MMqGM5oKEPLypyqYrUGuBa/RMe96VqO4VWpxKzWByVyBbI3bR52IOYInT5z0l/QyqZg7 gT819qk+hdBslXjioESANtT+X6z7PbSNxAYGx+5YvcYgXQUjd5lKLwh5kGzvd2Fhdyfs ODJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=J+ItzvQf4soZ+/CwDolpjFeJheW49FPqZnXbf6oL+RA=; b=lEmakazgvkF72dgow2Lc/3gV1PN3fvSuORCZKeF9XPb2RoAycnQPTyEAMXGi/Xg0hr d6arsrM29fUwR1J1t05esbomsqZ4hrfM8GoMcGh3zvNR6AqyLceeZJOFXxgfyhCNhm3f zBOM06ROhujGhhxS/byPpn7e5licc0YSjXrRs9Vm969lyOHZ1WceD8x00kS4Is7vjAXF EhI+L+26Bg0fL5hzp6B+dZ9kC29yPVIZrznAXNBgO+673t6uf5Uv15RZ6gyzvKLpZdK3 +zSGwhfQ6y6PKF4qe923lgZl4MYlKc3KEyMa1vWT2F0DWn0DmoNDGlSAZTfe4x8rFrcG B5iQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb13si29565153edb.380.2021.07.20.09.36.48; Tue, 20 Jul 2021 09:37:11 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233187AbhGTPwy (ORCPT + 99 others); Tue, 20 Jul 2021 11:52:54 -0400 Received: from mga17.intel.com ([192.55.52.151]:55372 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234941AbhGTPtk (ORCPT ); Tue, 20 Jul 2021 11:49:40 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10051"; a="191549411" X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="191549411" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 09:30:10 -0700 X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="661569731" Received: from agluck-desk2.sc.intel.com (HELO agluck-desk2.amr.corp.intel.com) ([10.3.52.146]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 09:30:10 -0700 Date: Tue, 20 Jul 2021 09:30:09 -0700 From: "Luck, Tony" To: "Zhuo, Qiuxu" Cc: Yazen Ghannam , Naveen Krishna Chatradhi , "linux-edac@vger.kernel.org" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "bp@alien8.de" , "mingo@redhat.com" , "mchehab@kernel.org" Subject: [PATCH] EDAC/skx_common: Set the memory type correctly for HBM memory Message-ID: <20210720163009.GA1417532@agluck-desk2.amr.corp.intel.com> References: <20210630152828.162659-1-nchatrad@amd.com> <20210630152828.162659-4-nchatrad@amd.com> <20210719204758.GC19451@aus-x-yghannam.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qiuxu Zhuo Set the memory type to MEM_HBM2 if it's managed by the HBM2 memory controller. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck --- drivers/edac/skx_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c index 5e83f59bef8a..f9120e36bf3a 100644 --- a/drivers/edac/skx_common.c +++ b/drivers/edac/skx_common.c @@ -345,7 +345,10 @@ int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm, rows = numrow(mtr); cols = imc->hbm_mc ? 6 : numcol(mtr); - if (cfg->support_ddr5 && ((amap & 0x8) || imc->hbm_mc)) { + if (imc->hbm_mc) { + banks = 32; + mtype = MEM_HBM2; + } else if (cfg->support_ddr5 && (amap & 0x8)) { banks = 32; mtype = MEM_DDR5; } else { -- 2.29.2