From patchwork Thu Oct 10 11:39:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 175745 Delivered-To: patches@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp2186037ocf; Thu, 10 Oct 2019 04:40:04 -0700 (PDT) X-Received: by 2002:ac2:4345:: with SMTP id o5mr5895331lfl.60.1570707604851; Thu, 10 Oct 2019 04:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570707604; cv=none; d=google.com; s=arc-20160816; b=i8Blj98pGMF+aSGZefRNKQgK23/weoHvI0Q96K6nwac6WGcqk5rMU7D+3mrdJ9LQEI kHNIN++Th0FpoeEngZPq86Z0yjQKX9JP8xQcUbStS1MJzRtl6Wx6HIwA3P2v/Nh2m3Xd r12shwlI3PnEWB/Tx4biQ3l+2qvTxlV6DIP4irj8IcGbhsyYEKswC4C30JdVYYnW2lDk xuEHd3SwJKOLMAkSAh0erRuFcLfK5D1gXhrngwOQVClyiHF5Q6toCh3PSvEde7KtWp9x Gx52Mf+kjz8ptBNbkKlexcs740mq64eoG252h+79A7V/gkxHqw7zIrGE3YEfIyBwfFoB qsOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=2IJCjxfMEpSRJkS++DhjtARW+QNPbTjOBtr+8H3u40A=; b=QeoSZ3b2V4EHaIXgQHuiRd7MtrL9rhmYrb1tx+qsTJ7aHTu1NVw9w2L0H/e25X8ZqM ILyLyz+ZCIEUCcGdxRkQOWpcYtwy7rUIGq6PShbRfFYT2U55iEEUrXTwObH3vUPoOqsu V8Uyiy91ahsH4Y9PCtV/5djz4zzwye4EwoDCad69TCkPWd449BRSKMEfdST2KPNYWGTT aPpxSLt2gkDFY2A/ZzIKa5isws/Q7f05mHwkkUUUqA26uqDemQPhBJ3662s93iwtmefu IhtJqhIOZAesGiJzN8cjWpg98C7bOfeAjZT1lOyelW5UbryY5SoSmA+Bq6HkD9ogiZ7N 6eXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uYRdsI8t; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b11sor3282753ljf.26.2019.10.10.04.40.04 for (Google Transport Security); Thu, 10 Oct 2019 04:40:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uYRdsI8t; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=2IJCjxfMEpSRJkS++DhjtARW+QNPbTjOBtr+8H3u40A=; b=uYRdsI8te0eaDiHtkdh5R/+OqlHAVSLkJADtZJTeFydF4Y47RT8kzwre6xDI4j34zl 5HdWus2lQAcfjCbqzA71PLvMUI4AYSLWiGgnnZqbibnE62hQ8JnUzXgn/rNxo6+zo6iw jH/WkAqyIFtaq1HQNOxSYIrHxWjmHDKbl+WLr/QN7nMcYTJy2KeLDkee8hDbdKsI2c5j a2tnpwEyTOk3T7hb9nG8eEJ3MnvNNy1cPuO5XbOWSoEggnlYpeVSWElDz5deVQphhAyR 8AyvY9N8sSWnidCRIVsMkEy+ojIPLYkB3CvUJJXGtHXVFQk9gOpakS3USZiLR4i9KtsC 5vFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2IJCjxfMEpSRJkS++DhjtARW+QNPbTjOBtr+8H3u40A=; b=KZhnDFZhkM32iZdsjsVDaOfIyP4/xiYe6LcVgW+SRg4xKTCC5/Ttl+YwLjTNu/eg7C P2otvPLNzGDNnvZvXBouSFdHGXyhbDvIgUWspRCc3hN/uzJLF7vLBaQ/LEDmBbd2TYaW lhMYSDh5mS1T3sBwTNO3Hz1kCPEt54x3BlvsnMkEpaxgkJzzTelr+EzAucJDrzdqr1Tg 1Xo7yevP/O61vTeOO0rV3dFcoUN9iggBxHs5RxgWqC+ceXf2qy+5rdzVYlq5bSZltNP2 FT8mFmCPwZHuJ7CFUeRaCRt3/OS/kjoxhPEXVbXI6gpH7TGIuoh5F20+aXNBI8vZKqFp YPDA== X-Gm-Message-State: APjAAAU6QJUw8Kc+VUJ7l4WDTil3rPJ0vR5Z6rzvouYpBuUB4n6Ivrd+ QggO55vkA1TjVnBoAMPqo8niXiLa X-Google-Smtp-Source: APXvYqyHTS+mn7MuuwFxGUfhX8Q5zKTf6UWlXj64K9gUalKuMXGaZnYWVktevenm33lDHwfKhHe5vg== X-Received: by 2002:a2e:2bc8:: with SMTP id r69mr6210726ljr.147.1570707604133; Thu, 10 Oct 2019 04:40:04 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id p3sm1168937ljn.78.2019.10.10.04.40.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 04:40:03 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Daniel Lezcano , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Lina Iyer , linux-pm@vger.kernel.org Cc: Rob Herring , Vincent Guittot , Stephen Boyd , Bjorn Andersson , Kevin Hilman , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 00/13] cpuidle: psci: Support hierarchical CPU arrangement Date: Thu, 10 Oct 2019 13:39:24 +0200 Message-Id: <20191010113937.15962-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 This series enables initial support for hierarchical CPU arrangement, managed by PSCI and its corresponding cpuidle driver. It's based on using the generic PM domain (genpd), which nowadays also supports devices belonging to CPUs. The last DTS patch enables the hierarchical topology to be used for the Qcom 410c Dragonboard, which supports the PSCI OS-initiated mode. Do note, most of the code in this series have been posted earlier, but from the latest version being reviewed, we agreed on that it was better to re-work the PSCI backend driver as a first step, simply to get a clean interface towards the cpuidle driver. Summary of the main-changes since the last submission [1]: - Moved implementation from the psci FW dricer into cpuidle-psci. - Re-requesting review of the DT bindings, as we have moved to yaml. No changes as such, but tried to clarify a few things in the text. - Drop the patch enabling support for CPU hotplug, postponing that to the next step. - Respect the hierarchical topology in DT only when OSI mode is supported. This is to start simple and we can always extend the support on top. The series is also available at: git.linaro.org/people/ulf.hansson/linux-pm.git next Kind regards Ulf Hansson [1] https://lwn.net/Articles/788306/ Lina Iyer (1): cpuidle: dt: Support hierarchical CPU idle states Ulf Hansson (12): cpuidle: psci: Fix potential access to unmapped memory dt: psci: Update DT bindings to support hierarchical PSCI states firmware: psci: Export functions to manage the OSI mode of: base: Add of_get_cpu_state_node() to get idle states for a CPU node cpuidle: psci: Simplify OF parsing of CPU idle state nodes cpuidle: psci: Support hierarchical CPU idle states cpuidle: psci: Prepare to use OS initiated suspend mode via PM domains cpuidle: psci: Add support for PM domains by using genpd cpuidle: psci: Add a helper to attach a CPU to its PM domain cpuidle: psci: Attach CPU devices to their PM domains cpuidle: psci: Manage runtime PM in the idle path arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 .../devicetree/bindings/arm/psci.yaml | 153 +++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 57 +++- drivers/cpuidle/Makefile | 4 +- drivers/cpuidle/cpuidle-psci-domain.c | 302 ++++++++++++++++++ drivers/cpuidle/cpuidle-psci.c | 106 ++++-- drivers/cpuidle/cpuidle-psci.h | 17 + drivers/cpuidle/dt_idle_states.c | 5 +- drivers/firmware/psci/psci.c | 18 +- drivers/of/base.c | 36 +++ include/linux/of.h | 8 + include/linux/psci.h | 2 + 11 files changed, 673 insertions(+), 35 deletions(-) create mode 100644 drivers/cpuidle/cpuidle-psci-domain.c create mode 100644 drivers/cpuidle/cpuidle-psci.h -- 2.17.1 Reviewed-by: Sudeep Holla