From patchwork Mon Jun 19 12:06:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shilpasri G Bhat X-Patchwork-Id: 777712 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wrqTs3CF4z9s4s for ; Mon, 19 Jun 2017 22:07:13 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wrqTs2LzCzDqhR for ; Mon, 19 Jun 2017 22:07:13 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wrqTS3PTqzDqhL for ; Mon, 19 Jun 2017 22:06:52 +1000 (AEST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v5JC4F9v119784 for ; Mon, 19 Jun 2017 08:06:49 -0400 Received: from e23smtp09.au.ibm.com (e23smtp09.au.ibm.com [202.81.31.142]) by mx0a-001b2d01.pphosted.com with ESMTP id 2b64nrrw0e-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 19 Jun 2017 08:06:49 -0400 Received: from localhost by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Jun 2017 22:06:46 +1000 Received: from d23relay07.au.ibm.com (202.81.31.226) by e23smtp09.au.ibm.com (202.81.31.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Jun 2017 22:06:44 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v5JC6inj6684994 for ; Mon, 19 Jun 2017 22:06:44 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v5JC6ZkJ031097 for ; Mon, 19 Jun 2017 22:06:35 +1000 Received: from oc4502181600.ibm.com ([9.195.38.106]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v5JC6Hdw030501; Mon, 19 Jun 2017 22:06:31 +1000 From: Shilpasri G Bhat To: clg@kaod.org, skiboot@lists.ozlabs.org Date: Mon, 19 Jun 2017 17:36:21 +0530 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1497873981-24454-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> References: <1497873981-24454-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> X-TM-AS-MML: disable x-cbid: 17061912-0052-0000-0000-00000258ED0E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061912-0053-0000-0000-000008375C9F Message-Id: <1497873981-24454-4-git-send-email-shilpa.bhat@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-19_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706190205 Subject: [Skiboot] [PATCH V6 3/3] sensors: occ: Send CSM_{min/max} on min/max sensor read X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: andrew@aj.id.au, ego@linux.vnet.ibm.com MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" HWMON's lowest/highest attribute is used by CSM agent, so map it to the min/max of CSM. Signed-off-by: Shilpasri G Bhat --- hw/occ-sensor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c index debfba5..fc8ef83 100644 --- a/hw/occ-sensor.c +++ b/hw/occ-sensor.c @@ -203,9 +203,9 @@ struct occ_sensor_name { * @sample: Latest sample of this sensor * @sample_min: Minimum value since last OCC reset * @sample_max: Maximum value since last OCC reset - * @CSM_min: Minimum value since last reset request + * @csm_min: Minimum value since last reset request * by CSM (CORAL) - * @CSM_max: Maximum value since last reset request + * @csm_max: Maximum value since last reset request * by CSM (CORAL) * @profiler_min: Minimum value since last reset request * by profiler (CORAL) @@ -226,8 +226,8 @@ struct occ_sensor_record { u16 sample; u16 sample_min; u16 sample_max; - u16 CSM_min; - u16 CSM_max; + u16 csm_min; + u16 csm_max; u16 profiler_min; u16 profiler_max; u16 job_scheduler_min; @@ -372,10 +372,10 @@ int occ_sensor_read(u32 handle, u32 *data) *data = sensor->sample; break; case SENSOR_MAX: - *data = sensor->sample_max; + *data = sensor->csm_max; break; case SENSOR_MIN: - *data = sensor->sample_min; + *data = sensor->csm_min; break; default: *data = 0;