Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp122978imm; Thu, 30 Aug 2018 09:48:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdagLii1O6kZnbLoe+xyESE5lwThB8Doum9oC0WbguIPZwa4xkXnUYQ2zKC1Vdmyy1fOyYFN X-Received: by 2002:a63:f616:: with SMTP id m22-v6mr10553728pgh.293.1535647684376; Thu, 30 Aug 2018 09:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535647684; cv=none; d=google.com; s=arc-20160816; b=UDwfmwXToc8cCvZaiJiLUrzo24kihhcwivQqYoygjyE7+dgLaKd8oaRo79FBYH6Jk3 0ScP/KFTgxoMv3g/bhYJcM3e4BWFg67v3Npm3cHKJwhuNikJuzDHWw8+5eaG0ObSSsWy evetsJYNGKPDrQo5s67YaB9qpk91gRRkAInmdTg/E6tQs6QKWVcfR5l6N0+hU0ipwSOd L/TlVraznL+x6OO6CLIkdoDB96bybtV42yB1LyrYnA3fFKoll+N/TjyOqvnGPpFaNTXQ z/b58hQcg3ezVKY05Q9nQls3CVF6MqwkTvTtJ7hUKUZvMsOm5RkB0zTMsf6yspo6HlIc yJpw== 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=IN+CH2S3yXGTJ3H7dYQ7pJhYeNJDueejxnUvmQQB+Q8=; b=vHZxdsWGykQsD8WECHMyloGe0Lxg4Ar1Uxup7OyRVd2JB9TJZGZXwlWUogKLc78Y+I n4G4lj23qjYKwQzhr1ClphmCCCwH91RB/zfV5pyhP66YW4ZApw4Vo9t7+Hj7D7Z/kbd3 ey6ZR50siX+/Iyf841D5d0AKbdDBJnnAHGoMYEfLjI5xShzi1xI6tTzlzucEjqdkj7wi IL5O/JZBgBhrR3Bxhg2cZR9RoWPohVenSJjonqJ5++jNdcZx/aKccNZ6GlItlBRabA0Q i09ZBzrjE8KPV1XeMOAF2ZQxYPITbVAf79ZfPq754iQPDcare+E8Fnf+FmsT/FCaJUK9 eElg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TEF+HMPW; 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 i3-v6si6669952plb.44.2018.08.30.09.47.49; Thu, 30 Aug 2018 09:48:04 -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=TEF+HMPW; 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 S1727685AbeH3UtM (ORCPT + 99 others); Thu, 30 Aug 2018 16:49:12 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:46879 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbeH3UtL (ORCPT ); Thu, 30 Aug 2018 16:49:11 -0400 Received: by mail-vk0-f65.google.com with SMTP id b14-v6so4460999vke.13; Thu, 30 Aug 2018 09:46:11 -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=IN+CH2S3yXGTJ3H7dYQ7pJhYeNJDueejxnUvmQQB+Q8=; b=TEF+HMPWuQS9hbcZUhqV9YRDu4cxQpDjr1A6/1h4mFubKWj4c32tLaK4TXvKKpBnL1 6FyLLxqQhr8+oIx7bZsrmyHcY2Lvt9+MP41YPNtAyD3SewwYQN69MvEOl0Ktp5yc7Gp8 qQIjysEOWmPxe426Hn054TkYMjJlVnJVCFQvLXPtILO7XqTpDL6q3Cn2tgmXMwXhaLl6 CpVfPk4tveBJMa1QsgyqgVaye48AldSWO4Inh1D/1Re1T6U9Qb2UtLJHsJ1FnC/Pnp3U vvOcNUnjq9PwGJ/uqbu0cE/+D7ogikNyA/BKTNE+6k/fGElowAalNFKgYClxJXOhgwwX +xRQ== 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=IN+CH2S3yXGTJ3H7dYQ7pJhYeNJDueejxnUvmQQB+Q8=; b=oqFz7PTn2YvScVgZnkUycd+qbqqre4TK6q85iCKD84DXMDgqS0/efyGW2rDiFGuB75 wi5puPvD0fgm42/I/LW47jr6Rj1a+0gpO+069m8cT85KlU4xN6JZ47whOwJi45JPjmDr SxmKRG1tJTcPrwuMQ5ofJ3qdkKOZnxppPi06+t6La4kUH/3P/ml9CPT69/gOQOTde2i1 g9f0Dn0XyfIynNHUub4GPq9hV3pDTO3J8Hr4ogPcd9Gjud9CWAzLmVICOD1vkZ5kYYSO HhEKTyGAVa/dHZnYsnzlulkeqEC1ide73oMH6w9YI1piLrjWYXwGfsrGkU5FltWsXN/7 uuPw== X-Gm-Message-State: APzg51AzBwUtJkUVvqcKFRobPLicrkELnxofSFzi9VFi36rfxLHzqfY8 DkzUTzUyu0wPV1BBXqCW45154EWmeiXvi8I6Y+d7+w== X-Received: by 2002:a1f:2413:: with SMTP id k19-v6mr7090517vkk.128.1535647570523; Thu, 30 Aug 2018 09:46:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:5e5c:0:0:0:0:0 with HTTP; Thu, 30 Aug 2018 09:46:10 -0700 (PDT) In-Reply-To: <1ac15a80-6f9a-cf9d-8e79-37d10549a4ca@arm.com> References: <1535567632-18089-1-git-send-email-wufan@codeaurora.org> <000f01d4406f$6ce8f160$46bad420$@codeaurora.org> <1ac15a80-6f9a-cf9d-8e79-37d10549a4ca@arm.com> From: Tyler Baicar Date: Thu, 30 Aug 2018 12:46:10 -0400 Message-ID: Subject: Re: [PATCH] EDAC, ghes: use CPER module handles to locate DIMMs To: James Morse Cc: wufan , mchehab@kernel.org, Borislav Petkov , linux-edac@vger.kernel.org, Linux Kernel Mailing List , arm-mail-list 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 On Thu, Aug 30, 2018 at 12:32 PM, James Morse wrote: > Hi Fan, > > On 30/08/18 15:40, wufan wrote: >>>> @@ -327,12 +349,20 @@ void ghes_edac_report_mem_error(int sev, >>> struct cper_sec_mem_err *mem_err) >>>> p += sprintf(p, "bit_pos:%d ", mem_err->bit_pos); >>>> if (mem_err->validation_bits & >>> CPER_MEM_VALID_MODULE_HANDLE) { >>>> const char *bank = NULL, *device = NULL; >>>> + int index = -1; >>>> + >>>> dmi_memdev_name(mem_err->mem_dev_handle, &bank, >>> &device); >>> >>>> + p += sprintf(p, "DIMM DMI handle: 0x%.4x ", >>>> + mem_err->mem_dev_handle); >>>> if (bank != NULL && device != NULL) >>>> p += sprintf(p, "DIMM location:%s %s ", bank, device); >>>> - else >>>> - p += sprintf(p, "DIMM DMI handle: 0x%.4x ", >>>> - mem_err->mem_dev_handle); >>> >>> Why do we now print the handle every time? The handle is pretty >>> meaningless, it can only be used to find the location-strings, if we get those >>> we print them instead. >> >> For ghes_edac the bank/device is informational, and nothing would go wrong >> if the bank/device numbers are the same as another entry. But the handle >> is now critical for DIMM lookup, thus pull it out. > > Is printing the handle to the kernel log critical? > I don't see why we would need this print. The bank/device print is enough to map what is shown in dmesg to an SMBIOS entry if that's really needed. Thanks, Tyler