Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp789299rwb; Wed, 16 Nov 2022 07:41:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf4+I5NdXCsuRhBN0EXnNmdYxaBGkeat4wKiBTnUgotiD0WqCR7NWShHp/DdC5sxbSdanMOb X-Received: by 2002:a05:6402:1208:b0:461:9667:1b4d with SMTP id c8-20020a056402120800b0046196671b4dmr19201734edw.239.1668613310619; Wed, 16 Nov 2022 07:41:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668613310; cv=none; d=google.com; s=arc-20160816; b=cuROWDCSCkgD+uHKomrljz8llHfYOMqbguVy9TCutmPgq1SLD5FdKCNABv7E07hSSP zUJCSMhOz7Qhug2oelws7GTHzJ2//LFEleDUrf4A3FpeCIuAEoSpvmtns/sGkz05LrX/ NuSExr1kHg+H8qMZ5+5t7Q/eiTZuLAbYvs3sUSwEc+pD9V+PDAlfKmAoQs3ghl6uoix3 2HFn5ImzHqcQbeaf9CLWgBwxflJkPd2amePxF/ktFjFViXJIJqNxhKFAael24y3CoKqu 3u/TvsERqZrOM5Fh7sUzd2xlW1ycgqpbVigNoS0huo/SEj2zl35HK1v/qFZqeoCNjC23 nHEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=QXCOZuWwmFcl06Mw83SMosykvOeNf+/mlk+vPWBxS4E=; b=bAQheW7HoahdTSzbjtsiQU7VHokV7kB+3n8p1USyM4c92dU/y6pGnPnz/znDD7XTaV +bX5/I4ADI4CgxlUw2F/+xyCjym1QmXK0zqYKUe68XDGSU0xsCNQfu324FOtopoBAEDg IEBsE96LjWD0GT5l7Dlr9/+Vs8j0BULkEY+21ZANTRQuFm5fd9L6PLHZqsiwkZWttija GRGsSvJP1MlOZGOfrS7qqHS9+/Fwni2ixKIpZG1azmPljLoaQnhdNLR/Q1RNbe2Mnss+ zrqaj1w9Iv3XO+49JHF1py/OuQsVmpQExxFQlQMrcRotP05sX5FJTDrIMN0g8mnkawaJ 6CnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg24-20020a170907971800b0078dcfe6a000si14029271ejc.727.2022.11.16.07.41.28; Wed, 16 Nov 2022 07:41:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233207AbiKPPfh (ORCPT + 91 others); Wed, 16 Nov 2022 10:35:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbiKPPfb (ORCPT ); Wed, 16 Nov 2022 10:35:31 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FB0914D0C; Wed, 16 Nov 2022 07:35:31 -0800 (PST) Received: from frapeml100004.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4NC6Sn4FSgz67KSc; Wed, 16 Nov 2022 23:30:49 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by frapeml100004.china.huawei.com (7.182.85.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 16:35:29 +0100 Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 15:35:28 +0000 Date: Wed, 16 Nov 2022 15:35:28 +0000 From: Jonathan Cameron To: CC: Dan Williams , Alison Schofield , Vishal Verma , "Ben Widawsky" , Steven Rostedt , Davidlohr Bueso , , Subject: Re: [PATCH 07/11] cxl/mem: Trace Memory Module Event Record Message-ID: <20221116153528.00005af7@Huawei.com> In-Reply-To: <20221110185758.879472-8-ira.weiny@intel.com> References: <20221110185758.879472-1-ira.weiny@intel.com> <20221110185758.879472-8-ira.weiny@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Nov 2022 10:57:54 -0800 ira.weiny@intel.com wrote: > From: Ira Weiny > > CXL rev 3.0 section 8.2.9.2.1.3 defines the Memory Module Event Record. > > Determine if the event read is memory module record and if so trace the > record. > > Signed-off-by: Ira Weiny > Noticed that we have a mixture of fully capitalized and not for flags. With that either explained or tidied up: Reviewed-by: Jonathan Cameron > +/* > + * Device Health Information - DHI > + * > + * CXL res 3.0 section 8.2.9.8.3.1; Table 8-100 > + */ > +#define CXL_DHI_HS_MAINTENANCE_NEEDED BIT(0) > +#define CXL_DHI_HS_PERFORMANCE_DEGRADED BIT(1) > +#define CXL_DHI_HS_HW_REPLACEMENT_NEEDED BIT(2) > +#define show_health_status_flags(flags) __print_flags(flags, "|", \ > + { CXL_DHI_HS_MAINTENANCE_NEEDED, "Maintenance Needed" }, \ > + { CXL_DHI_HS_PERFORMANCE_DEGRADED, "Performance Degraded" }, \ > + { CXL_DHI_HS_HW_REPLACEMENT_NEEDED, "Replacement Needed" } \ Why are we sometime using capitals for flags (e.g patch 5) and not other times? > +)