Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5041214imu; Wed, 19 Dec 2018 04:45:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/W4bN6vq/Jb6UztPQ5w3bfB0AJbMPHQE7+WOCt3ePfpvqvCfrgi2zqQ/tUSTWE8M63WuqDo X-Received: by 2002:a62:cf84:: with SMTP id b126mr20131662pfg.98.1545223501327; Wed, 19 Dec 2018 04:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545223501; cv=none; d=google.com; s=arc-20160816; b=NobFdgBz8ErfJwhav0d3Zvt41KF1QZsmpcov+XoDZ52XZH5xXskbam48U8AZ51YnjZ F93mMGX8b1au+WK1iVzQF6G+8vhNBcXOE5RuKb3OFp8g0H3zwGMC4rEYvCLgH9bxmkG2 2iaX6epdPHkG0teUIwoRMNHhIHFuW6+Q0cFVudTcU9P2GvpeUVac//9000xNvCKJDpet pwxOaGpnK84Ycd30rX8SHwPuUaA/SbmC23pxlJX2szu3EwOrwjAfxFwKnO7Tjfuv/Zws 6dbFJL4RBYOGLnh5ZRIPbvhtBj+kKh7KAGrl3fQlxsCVH1GtD4kOJnu+YhbYpv9AtSk2 mTAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=WBYtpgi3L43g/g3bal8OsjXx3jBVIwyK4ycCMrvCSkk=; b=OB4KijAC2KMA1k+wHvZyIN1KkDImgBdjKoG1y2Bv3o39T/pm3a4zY9lPouGPBPZtCR VVf7aitkIOt9EKwnVr79IfThdSMqff0uOM4veZuwOSVS8Pa0H25oNq97mO+1RfJ13n+I H9QwiHOyQEq2G9lpyDuUWs4kvSwJuNXDJVbRKGhKElggAwIKfy/Dfn1vJ8VYxqRYuYw1 XTVB3w/u2ZdIw9Dv0JLy/KX/tbf5ns46rQsm88dSwQA9lrp0VzWPTK96ErBgSpwVoKW4 JmnqGXjWIPFDHVsAyYdZQJn2RhooM0Gy03txzRbUO719FTts9FiS9ncuNl5HpSko+Juo QgKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FRaKmh7m; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e35si14346711pgb.548.2018.12.19.04.44.45; Wed, 19 Dec 2018 04:45:01 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=FRaKmh7m; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729266AbeLSLUH (ORCPT + 99 others); Wed, 19 Dec 2018 06:20:07 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53910 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728150AbeLSLUG (ORCPT ); Wed, 19 Dec 2018 06:20:06 -0500 Received: by mail-wm1-f66.google.com with SMTP id d15so5688867wmb.3 for ; Wed, 19 Dec 2018 03:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WBYtpgi3L43g/g3bal8OsjXx3jBVIwyK4ycCMrvCSkk=; b=FRaKmh7mMZT2QEE9wDGOGpeyti9mUyh0siUC7a5gkVptOsCADAnD/tAPHmdEe/Ng6R TFsiTzmtmF9FnbNe8dlmwvehBS802WJkRIBpTjzffWvREWhBsuCVI7l/8eg+7KmTF+ck tPfYXMl6Vk9cGxtjmFhugK/jYWczynFPx96D0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WBYtpgi3L43g/g3bal8OsjXx3jBVIwyK4ycCMrvCSkk=; b=Oz8AZXFo8ZFHfJK2wpJEBdSNoQCFyZ18CPjrNho4Q16MHfELIWLyab162F1Gcjzb8X MW8WVeVJMQX4SwPE97rKGUaVilGjStuxy6sA/9lVSzk/kEusOwss53jtCWT39qUXkRs4 rrrAjkIcDkm5as6Gs+CEzM2hrU7GmJCvWoNtTMMSER424zgyLHtfyFqyFyjVVXgas5Vp +a9wSZTfsU7vuxLmGn84bpUZxAa1UgzZgdsS6S7QgSrgKw942wH34FquxdgonAaljkLI 1/uX1nD5cAdymbEroxUy8s9kph+xcz+3waYYaEvX77wTgNE30qrdnF+7pvc28wHD0tqN jlBQ== X-Gm-Message-State: AA+aEWbYVOnXQlOdTN26BpOrbzt4yXJWqvWVBWlMmAjWeotkV5sj5jyA qFkHrnRBeiwJscT8v1WWGU6qCQ== X-Received: by 2002:a1c:a9d4:: with SMTP id s203mr5930739wme.132.1545218403694; Wed, 19 Dec 2018 03:20:03 -0800 (PST) Received: from [192.168.0.40] (197.26.136.77.rev.sfr.net. [77.136.26.197]) by smtp.googlemail.com with ESMTPSA id l14sm13600521wrp.55.2018.12.19.03.20.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 03:20:02 -0800 (PST) Subject: Re: [PATCH v10 07/27] cpuidle: dt: Support hierarchical CPU idle states To: Ulf Hansson , "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , linux-pm@vger.kernel.org Cc: "Raju P . L . S . S . S . N" , Stephen Boyd , Tony Lindgren , Kevin Hilman , Lina Iyer , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Lina Iyer References: <20181129174700.16585-1-ulf.hansson@linaro.org> <20181129174700.16585-8-ulf.hansson@linaro.org> From: Daniel Lezcano Message-ID: <8b8eaac3-9b17-a853-b02e-a5ec4a0c911d@linaro.org> Date: Wed, 19 Dec 2018 12:20:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181129174700.16585-8-ulf.hansson@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/11/2018 18:46, Ulf Hansson wrote: > From: Lina Iyer > > Currently CPU's idle states are represented in a flattened model, via the > "cpu-idle-states" binding from within the CPU's device nodes. > > Support the hierarchical layout during parsing and validating of the CPU's > idle states. This is simply done by calling the new OF helper, > of_get_cpu_state_node(). > > Cc: Lina Iyer > Suggested-by: Sudeep Holla > Signed-off-by: Lina Iyer > Co-developed-by: Ulf Hansson > Signed-off-by: Ulf Hansson Reviewed-by: Daniel Lezcano > --- > > Changes in v10: > - None. > > --- > drivers/cpuidle/dt_idle_states.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c > index 53342b7f1010..13f9b7cd32d1 100644 > --- a/drivers/cpuidle/dt_idle_states.c > +++ b/drivers/cpuidle/dt_idle_states.c > @@ -118,8 +118,7 @@ static bool idle_state_valid(struct device_node *state_node, unsigned int idx, > for (cpu = cpumask_next(cpumask_first(cpumask), cpumask); > cpu < nr_cpu_ids; cpu = cpumask_next(cpu, cpumask)) { > cpu_node = of_cpu_device_node_get(cpu); > - curr_state_node = of_parse_phandle(cpu_node, "cpu-idle-states", > - idx); > + curr_state_node = of_get_cpu_state_node(cpu_node, idx); > if (state_node != curr_state_node) > valid = false; > > @@ -176,7 +175,7 @@ int dt_init_idle_driver(struct cpuidle_driver *drv, > cpu_node = of_cpu_device_node_get(cpumask_first(cpumask)); > > for (i = 0; ; i++) { > - state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i); > + state_node = of_get_cpu_state_node(cpu_node, i); > if (!state_node) > break; > > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog