Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp528683imm; Thu, 5 Jul 2018 04:42:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd36cOkvyDbGMiYnbVv8xDGuwznYhTCfr/SnzEo4FIZBYSqa+3pVSD3QYoBWwHnj1y0q/Vc X-Received: by 2002:a62:93d4:: with SMTP id r81-v6mr5969268pfk.55.1530790927294; Thu, 05 Jul 2018 04:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530790927; cv=none; d=google.com; s=arc-20160816; b=xCkdd0+9+K77fGMxAovhLuQL86FvWSeVS+a1x6z6lqpzEQe9Dq3DVbiNF4To8SkPya R5h3kriyccR1TSxneT6Exdat+oY1yhWb7WrJQQGzY8xmnpRMUugv4XjsLCjVFYtOTOY4 MleJEfAOwUu9lVKrrplRjZDyWdL1A2Bev5t2F35fmn9grdOiJ7Z54VLX6AHyFUSp51RP 52MHz+wPNBrfKv8iTneSuf6B46IInxr8yV9VErapKxTgKAzdCd7A3vgQrfkTla2FOmpf yU6bT9zox9k8OSGTTajbPYVi/JFjPRJqxoc0ReVYZRL0D4Rdsq55vbTsU1oXKRhMKNB2 58uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=B/EF/rmQjGZNhAEOTRoBu4EzDsBWOXWVfRUXMm9joI8=; b=rGOcJihvr+lu2p511GwZs9B4X+l9s9jP2E/lCS2Phont9XvB9147JZT1Dlb+aWM6h2 cKPtM+M63Ylt0KJkARVWzs6U7EUCXiTvq7XMz+97aP6kVBDPMOe1pBbqsLuI22HpEr4V 39f8hN5arkxt+XwS1+V7o+adpcLI37HicIi1kVDiZc0bvmJz88vqkJF0IRaLlEGaKUwv d5wHkAsmaQbohx8WB+uB3cQ7EC22k9VCRbo9qG9jEeyyscFZkx+7OdRW52Fj33IgxsVJ pi26H8zn+wHPWrTdT1JMVxV5v5OKKa6d18qxggKuqAjydhR/lL+eIKyWkc6KQmZVHqbx UiuQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si5920131ple.417.2018.07.05.04.41.53; Thu, 05 Jul 2018 04:42:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754109AbeGELkv (ORCPT + 99 others); Thu, 5 Jul 2018 07:40:51 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58040 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753921AbeGELkt (ORCPT ); Thu, 5 Jul 2018 07:40:49 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w65Bd2FS012909 for ; Thu, 5 Jul 2018 07:40:49 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k1gw64b3q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 05 Jul 2018 07:40:48 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Jul 2018 12:40:46 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 5 Jul 2018 12:40:44 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w65BehJ938928602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 5 Jul 2018 11:40:43 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F2204C04A; Thu, 5 Jul 2018 14:41:08 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A888D4C046; Thu, 5 Jul 2018 14:41:05 +0100 (BST) Received: from aksadiga.ibm (unknown [9.195.33.98]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 5 Jul 2018 14:41:05 +0100 (BST) From: Akshay Adiga To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net, stewart@linux.vnet.ibm.com, benh@kernel.crashing.org, svaidy@linux.vnet.ibm.com, ego@linux.vnet.ibm.com, npiggin@gmail.com, mpe@ellerman.id.au, Akshay Adiga Subject: [PATCH v4 0/2] powernv/cpuidle Device-tree parsing cleanup Date: Thu, 5 Jul 2018 17:10:20 +0530 X-Mailer: git-send-email 2.18.0.rc2.85.g1fb9df7 X-TM-AS-GCONF: 00 x-cbid: 18070511-0008-0000-0000-0000024FF133 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18070511-0009-0000-0000-000021B60AD0 Message-Id: <20180705114022.19285-1-akshay.adiga@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-05_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=821 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807050137 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Device-tree parsed multiple time in powernv cpuidle and powernv hotplug code. First to identify supported flags. Second time, to identify deepest_state and first deep state. Third time, during cpuidle init to find the available idle states. Any change in device-tree format will lead to make changes in these 3 places. Errors in device-tree can be handled in a better manner. This series adds code to parse device tree once and save in global structure. Changes from v3 : - Removed a stale comment Changes from v2 : - Fix build error (moved a hunk from patch 1 to patch 2) Changes from v1 : - fold first 2 patches into 1 - rename pm_ctrl_reg_* as psscr_* - added comment stating removal of pmicr parsing code - removed parsing code for pmicr - add member valid in pnv_idle_states_t to indicate if the psscr-mask/val are valid combination, - Change function description of pnv_parse_cpuidle_dt - Added error handling code. Akshay Adiga (2): powernv/cpuidle: Parse dt idle properties into global structure powernv/cpuidle: Use parsed device tree values for cpuidle_init arch/powerpc/include/asm/cpuidle.h | 13 ++ arch/powerpc/platforms/powernv/idle.c | 216 ++++++++++++++++---------- drivers/cpuidle/cpuidle-powernv.c | 158 ++++--------------- 3 files changed, 177 insertions(+), 210 deletions(-) -- 2.18.0.rc2.85.g1fb9df7