Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp220605imm; Thu, 30 Aug 2018 12:19:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZKkGPJ9MrEFoXpjDEV1JYfpIKWmlSg/wT1UJe6E/+LwyNpFxvXEmIrnaUp+xiLnnTNxyl4 X-Received: by 2002:a62:3241:: with SMTP id y62-v6mr11875776pfy.4.1535656791623; Thu, 30 Aug 2018 12:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535656791; cv=none; d=google.com; s=arc-20160816; b=Xxu09fXyPdEGpeYxKg5a1CpvWbRcJk/bfiw7jrJafHDMgvQnncQfT2vPq4pNGJvbRz HeZaj/MxOaSlFLBKP33DX0Dk29gqCgMhsvvf33QJin1LUmimLvr1Aq3OfVvUdpP2Pjmy myc6ATQRXUEomCFRZ4/XhSe7cIi5tSl6XBnSgdafSJRJaBl8a6wXgheHPOgs0apdfP6y Tbz3zHd6YrslG36Mits2P6LA3Kr8+Ua3PJKHCuErWdKYCqsRpaTNdoMK2zLq/Fd/U3R5 fqIe6UH25HHlYoUHf0ROeytH3QN2Qd8ZnaI8JlpfEipuQiomGp4DMkWtD167HZGKDB1q QEbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=nYMkvpZ/TKeSz+jXkocwzlgUfMyAdPRnPsI2NHfra5c=; b=netoW1j9EkhmBFQ+1drIYiWQaHUu4ja7scLFPWilndwT+/+kl5CepDKEIJuOMgQo44 0xF7C+IZPEYr9jQeDOJc9DwYsQJ86gVq5mNuuIBcC+e5b5849OBn+K7yVP1qvnutiLpX JwXP7b+/7nsHaGJVlF11avPRskzJp6sn9Vl9vaedPM86k19MhfH3APZ29Z9cAPZWgKTj PdG2fKURSXcwROwkgu+Nmk0dhQLUiMCfRbtW5mpWz71ZAnrnbvCrEBACJdcONjUco4kW csE12cLeGr5fK3wEKCi36mUeWa1zFFTElNC9qq3otkZKIWGvYE6Sy5RnHSNTBRvf1aNB HRIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="iiz/Lc00"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x81-v6si7961520pgx.156.2018.08.30.12.19.37; Thu, 30 Aug 2018 12:19:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="iiz/Lc00"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727286AbeH3XVq (ORCPT + 99 others); Thu, 30 Aug 2018 19:21:46 -0400 Received: from mail-ua1-f65.google.com ([209.85.222.65]:37380 "EHLO mail-ua1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725836AbeH3XVp (ORCPT ); Thu, 30 Aug 2018 19:21:45 -0400 Received: by mail-ua1-f65.google.com with SMTP id y10-v6so6415024uao.4; Thu, 30 Aug 2018 12:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nYMkvpZ/TKeSz+jXkocwzlgUfMyAdPRnPsI2NHfra5c=; b=iiz/Lc00yMUK/S1+3pxt50IH2DPTnR//CUdkGs0ZE016i+ZcRcJ7UySJMboOy6AqCk Rlb6SVhyhkqpJoDQkO2QMdfugk+uxYeA4qvClkU6mD2wQVQHCvpNAztKbSfZe6kxlz+r K1Ut+fLDwESesQgAsPql35bE+jCjuO72dQ0rmkYhq07Rc2ZlKoclDnPc2VXS48yN+Bl7 njIM4lE1ErHUmzQ31AsR16peXUMDSd0fzlQ5+wWvRmER1EmY8MLAdiPxvHQAugkcvDy3 AF2jV6bLng6ckjgUdsJhJDgqTBBtmCQL2xoa8m26Dz//9Q20HJ6/y7dsS0n9V2XJi0/M mSaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nYMkvpZ/TKeSz+jXkocwzlgUfMyAdPRnPsI2NHfra5c=; b=B7APTqQeYeZ4cUKnUONBiqxKx4i+CkpOVOjMVlj7Mb5HwJPb5ZGmQikf3dKfbERYrX EIMJWb5xRsSEPGNiU/ntVEebcjpOREb8Qz35xT/ywNJ9lItHnt6VU6N3yTrg9NLnR8S8 k+bYtrvZXatGDDXANwgn8VjbE3dK1SMXvL3XsNcruX4DOxwwuP3QwVz8BRVXmLMnpAHd 23Wysc3cHod5hV55awVLEGvvC2L0EkIzQsxZDERA6ZKGhbk3YV45ci2F+s5OL+G+u7zv Mg2VaeAVQqwHHsgp1BH/x2yfv6UAFMfTSrPCiEdosUDMUNG5hciNH2T7LUZZ4s3RCJrF pjdA== X-Gm-Message-State: APzg51D+1B4cR4v5eEZNpLaRlIBkOIiDC2u2/jJvCucU9Ci8iRgxsFJT St1CFjjT5BU55N8qOgai8COgBH6egoF7K/C7EEs= X-Received: by 2002:a67:3b0c:: with SMTP id i12-v6mr1020539vsa.14.1535656685382; Thu, 30 Aug 2018 12:18:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:5e5c:0:0:0:0:0 with HTTP; Thu, 30 Aug 2018 12:18:04 -0700 (PDT) In-Reply-To: <1535654266-40053-1-git-send-email-wufan@codeaurora.org> References: <1535654266-40053-1-git-send-email-wufan@codeaurora.org> From: Tyler Baicar Date: Thu, 30 Aug 2018 15:18:04 -0400 Message-ID: Subject: Re: [PATCH v2] EDAC, ghes: use CPER module handles to locate DIMMs To: Fan Wu Cc: mchehab@kernel.org, Borislav Petkov , James Morse , linux-edac@vger.kernel.org, Linux Kernel Mailing List , arm-mail-list , john.garry@huawei.com, toshi.kani@hpe.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fan, On Thu, Aug 30, 2018 at 2:37 PM, Fan Wu wrote: > For platforms whose firmwares provide valid module handles > (SMBIOS type 17) in error records, this patch uses the module > handles to locate corresponding DIMMs and enables per-DIMM > error counter update. > > Signed-off-by: Fan Wu > diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c > index 473aeec..949f603 100644 > --- a/drivers/edac/ghes_edac.c > +++ b/drivers/edac/ghes_edac.c > @@ -81,6 +81,20 @@ static void ghes_edac_count_dimms(const struct dmi_header *dh, void *arg) > (*num_dimm)++; > } > > +static int get_dimm_smbios_index(u16 handle) > +{ > + struct mem_ctl_info *mci; > + int i; > + > + mci = ghes_pvt->mci; > + Minor nit: you could define and set mci in the same line to save some space here. Otherwise this patch looks good to me. Reviewed-by: Tyler Baicar