Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp617635pxm; Fri, 25 Feb 2022 15:16:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWJcOb8Wciqocl/LaHKfqyQL8xyL+RpCcrauiQEeG/k5MYLg87xl/g5g/eE+CF28tKmzV9 X-Received: by 2002:a17:906:7f02:b0:6cf:86d8:c31c with SMTP id d2-20020a1709067f0200b006cf86d8c31cmr7914189ejr.518.1645831009844; Fri, 25 Feb 2022 15:16:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645831009; cv=none; d=google.com; s=arc-20160816; b=IKGZ+cYDD8EFtz9qXru9z64eIaFyOX81R9UK7tWiztNDE7ewAa4xF6czY6+KTygP91 h9GfzoVUUYjfCDOtMjhw68I+5+i1nP7p0wPjOAO7hGdg5nlqB8OCYISukaY8N3N/O5vl v2KbZtyN8nLSmSHGfUpkDTaaC1kc4Gb2PRUsKRwLCTab5xSMP2QTH+SuS7tIY5WGoFII f3Qrr4/gSPVWgcCRgHOyan8CAxIFsRm8IBsmgWTj+eifXw4GolekHmqDJcS6EAQ5r0Z7 dpismrugWbFDSsvqYGH3CvTSlHkn9ngX0VhgT2yP0BBGDIeN97AjIXjmVB4H0lhbW0Lr M64g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=swFlfkGYEhwI8iLdsimz9iGatD80mf6kulpQ/wbv1tc=; b=OklDw0Rtzu++xXJ6caCXoKsGW3S4O2AGVqctMoPLTtCHHgKtyutHrdpazbG5ESBWel uzjTB9InzFvl5u9RVUgjF9HS69XB7irlUbPh7GrxL3gUyh74vAnAKLz8E8IOdNd9Yytq 9/rE92N9hvnb43zdvqsFrTFIu6TCA1lXIRrwHWHtLGKpevQRClggnIusWfpStWs3mWuJ SHu3Bj/tf/nNXlF4rzujW+JuRUxVxbWkJblp06LNwhcHQGoDVQomVUwehYTAEj2ZjkiA JBIjfdYYobiGgPszjF97z8QvmRY77CE1mBAA5IBjx2ClnaEz5qseewLsxbqJy96lhPde G3fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=QRr0Y5fx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c27-20020a056402143b00b0040f887264c6si2489159edx.162.2022.02.25.15.16.26; Fri, 25 Feb 2022 15:16:49 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=QRr0Y5fx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241756AbiBYOba (ORCPT + 99 others); Fri, 25 Feb 2022 09:31:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241742AbiBYOb1 (ORCPT ); Fri, 25 Feb 2022 09:31:27 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EB81234039 for ; Fri, 25 Feb 2022 06:30:55 -0800 (PST) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21PCgh34021531; Fri, 25 Feb 2022 14:30:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=swFlfkGYEhwI8iLdsimz9iGatD80mf6kulpQ/wbv1tc=; b=QRr0Y5fxUk9iuMjf3Ozi7cRvXlX3jbiemTcZzdfa7XouRzGuoHRq1tXzqAOTSzmCN6/r lE/jfGuCeW1DFhBSGmpmWiiyIMYUvDcLAN3VIUraHV7xVmRnDP0BjCBBToCG7O/iC3gh JFzAKM561iz5YbxRHX8APMLG+T9mShDblBaw5L15E4IaUrFJgWSzbbctq6XrvF2n9YsU gbllk9EUcp1kI2uRnCbuBsSR8O4r3QEE6jWpCKvfjUbk42DkLTxtbmvFwQZHZ1RNxyFv YfIWoJvguxKBJVfLcEBgsUvdfJhVnStxUz41F3H17ZV8EqTS5+QxGUk9dMph4Xl0DtvW Sg== Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 3eeyc02u7c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Feb 2022 14:30:50 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21PER7h2020738; Fri, 25 Feb 2022 14:30:48 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06fra.de.ibm.com with ESMTP id 3eaqtk71vm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Feb 2022 14:30:48 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21PEUj3k47186354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Feb 2022 14:30:45 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E49554C04A; Fri, 25 Feb 2022 14:30:44 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9119D4C04E; Fri, 25 Feb 2022 14:30:40 +0000 (GMT) Received: from li-e8dccbcc-2adc-11b2-a85c-bc1f33b9b810.ibm.com.com (unknown [9.43.81.177]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 25 Feb 2022 14:30:40 +0000 (GMT) From: Kajol Jain To: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, peterz@infradead.org, dan.j.williams@intel.com, ira.weiny@intel.com, vishal.l.verma@intel.com Cc: santosh@fossix.org, maddy@linux.ibm.com, rnsastry@linux.ibm.com, aneesh.kumar@linux.ibm.com, atrajeev@linux.vnet.ibm.com, vaibhav@linux.ibm.com, tglx@linutronix.de, kjain@linux.ibm.com Subject: [PATCH v7 1/4] drivers/nvdimm: Add nvdimm pmu structure Date: Fri, 25 Feb 2022 20:00:21 +0530 Message-Id: <20220225143024.47947-2-kjain@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220225143024.47947-1-kjain@linux.ibm.com> References: <20220225143024.47947-1-kjain@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: OFNU3knd6033km5CZl3fTTfa9rMDGFYX X-Proofpoint-GUID: OFNU3knd6033km5CZl3fTTfa9rMDGFYX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-02-25_08,2022-02-25_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 mlxlogscore=904 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202250084 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 A structure is added called nvdimm_pmu, for performance stats reporting support of nvdimm devices. It can be used to add device pmu data such as pmu data structure for performance stats, nvdimm device pointer along with cpumask attributes. Acked-by: Peter Zijlstra (Intel) Tested-by: Nageswara R Sastry Signed-off-by: Kajol Jain --- Changelog: v6 -> v7 - Add Acked-by and Tested-by tag from Peter Zijlstra and Nageswara R Sastry. include/linux/nd.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/linux/nd.h b/include/linux/nd.h index 8a8c63edb1b2..ad186e828263 100644 --- a/include/linux/nd.h +++ b/include/linux/nd.h @@ -8,6 +8,7 @@ #include #include #include +#include enum nvdimm_event { NVDIMM_REVALIDATE_POISON, @@ -23,6 +24,25 @@ enum nvdimm_claim_class { NVDIMM_CCLASS_UNKNOWN, }; +/** + * struct nvdimm_pmu - data structure for nvdimm perf driver + * @pmu: pmu data structure for nvdimm performance stats. + * @dev: nvdimm device pointer. + * @cpu: designated cpu for counter access. + * @node: node for cpu hotplug notifier link. + * @cpuhp_state: state for cpu hotplug notification. + * @arch_cpumask: cpumask to get designated cpu for counter access. + */ +struct nvdimm_pmu { + struct pmu pmu; + struct device *dev; + int cpu; + struct hlist_node node; + enum cpuhp_state cpuhp_state; + /* cpumask provided by arch/platform specific code */ + struct cpumask arch_cpumask; +}; + struct nd_device_driver { struct device_driver drv; unsigned long type; -- 2.31.1