Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4737554imm; Mon, 18 Jun 2018 22:06:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKOu3D/gKkur8bNd/ReqpICD5pbJmURikK94VH0+VuLGSRctsIbg974Me9nPDugibSl3G2W X-Received: by 2002:a65:644a:: with SMTP id s10-v6mr13322994pgv.360.1529384799231; Mon, 18 Jun 2018 22:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529384799; cv=none; d=google.com; s=arc-20160816; b=gkc50LsdphpA2NMBTdjSEYV8wBRW8xtTZxI88PaDV9HI3L/b031JReBkARtmiGqpBl Ol7v6srk/61bxfcdm8xCxxM6wIYcxWF08rye2oab4c0bJT79qB0N7OMpKI8TnMPJmkWp zr0DPOz1fAt8bnp5d7+nwgYjVuHjve3M71TFy6qHFN911EvKss//TZBue6HxCNL55dKY ga+4Kmr2eR8LifSOubBhDdN6mdFQu2dHFOoFuj9IiqSmXzl1NnO7ddELV63MCIzJJsmc jyJPmef7lfbzRAFJioQrF/s3hH1YiC/ouKiLsUcozW0mkZdb+JKoid4ATW8IyXUBu+Na EoWg== 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=w9qPqBD6PYO5p6+7Ro8ukh7csTVqpRCTBIYj7RA/t/s=; b=fx3kfuIMTxGdRrp54+RlH1HHEJPbK/xH34RXs8ncAmGsSUcfly3+9k5qmXGZ3dLwiF VZkpEIxawoSgDAx40TshqGR609TDfl87C+v19xKxUT1R3P43+FSgotGFuwK6GiZCvqcF 1pQDS+FyZP/rST6h9WSLvaCFNaet20ABcjREU7Ssmd74oI7Bok7xJq+9nKpY12UQ2wDc uDyz0s3ah1jXUJ7qzdTfH652lmg/VMOXlGqgNj1YuSTsxvR6t/lOUSHFu7b6p8sg2iM2 fv8DsNMM/BBhakaYsZJaZkPnh7vEDXaA/7DM2ro1J5IhwreKFS5JHMQ9RpHOCAJAQLgv ztzg== 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 t13-v6si13544488pgo.640.2018.06.18.22.06.25; Mon, 18 Jun 2018 22:06:39 -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 S1755633AbeFSFEv (ORCPT + 99 others); Tue, 19 Jun 2018 01:04:51 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39624 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755575AbeFSFEu (ORCPT ); Tue, 19 Jun 2018 01:04:50 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5J5420x106150 for ; Tue, 19 Jun 2018 01:04:49 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jpre7dsaj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Jun 2018 01:04:49 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jun 2018 06:04:47 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 19 Jun 2018 06:04:45 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5J54ipF34734116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Jun 2018 05:04:44 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 668384C04E; Tue, 19 Jun 2018 05:55:45 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4282C4C044; Tue, 19 Jun 2018 05:55:42 +0100 (BST) Received: from aksadiga.ibm (unknown [9.195.32.219]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 19 Jun 2018 05:55:42 +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, svaidy@linux.vnet.ibm.com, ego@linux.vnet.ibm.com, npiggin@gmail.com, mpe@ellerman.id.au, Akshay Adiga Subject: [PATCH 0/3] powernv/cpuidle Device-tree parsing cleanup Date: Tue, 19 Jun 2018 10:34:25 +0530 X-Mailer: git-send-email 2.5.5 X-TM-AS-GCONF: 00 x-cbid: 18061905-0016-0000-0000-000001DD82B7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18061905-0017-0000-0000-000032318B3D Message-Id: <1529384668-27548-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-19_02:,, 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=701 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806190058 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, secondly, to identify deepest_state and first deep state, Thirdly , during cpudidle init to find the available idle states. Any change in device-tree format will lead to make changes in these 3 places. This series adds code to parse device tree once and save in global structure. Akshay Adiga (3): powernv/cpuidle: Parse dt idle properties into global structure cpuidle/powernv: Change platform init to avoid reparsing dt powernv/cpuidle: Use parsed device tree values for cpuidle_init arch/powerpc/include/asm/cpuidle.h | 16 +++ arch/powerpc/platforms/powernv/idle.c | 214 +++++++++++++++++++++------------- drivers/cpuidle/cpuidle-powernv.c | 49 +++++--- 3 files changed, 182 insertions(+), 97 deletions(-) -- 2.5.5