From patchwork Mon Jun 15 15:20:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 187944 Delivered-To: patches@linaro.org Received: by 2002:a54:30ca:0:0:0:0:0 with SMTP id e10csp2633402ecs; Mon, 15 Jun 2020 08:21:00 -0700 (PDT) X-Received: by 2002:a2e:7203:: with SMTP id n3mr13351367ljc.231.1592234460256; Mon, 15 Jun 2020 08:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592234460; cv=none; d=google.com; s=arc-20160816; b=Ta9ulTeMwA6CRTZRSCVR/OE98PI8v9+SZjMQAfwzOdNduZta6y/WD0UBGyrqWkwXLs pcDShkvhGZU64m2q6T1guUz3dwvHOHK5ftSAvDwy6AVCnP7YIQQlEhoAhpzvf9XQNjti Cit7Q5XzKaeFFKhuRyc/4IJMyTCCyPDB+8mAhnUrc4KVzO6+7yjZkLcDBlRHAnLhe4I3 NznrCmEXfW+FqY3Q+AEMTTvcUbpOK4BdKjA/43Zv8TgGpWlWPCqnWhWr/fL71fb5pr5H jQxI/xLDwgg0vnYIe71ihGca/xnmr15kvYcz4DFK6XaDup9fHcoVYJYErK0SxSr7EmZH 3r6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zKuQg/V734JQ52Bk2AkHR9NRP89P2pyrqBomz/3R808=; b=k44/dygOoXv8+SVlYmrm4np7VVbY496D6zX3FtvHcjTJbZwE8qenU2I44hTaDkKR+x q9iKD4iyPmjgYeBU28k/6N+ZE6hHgnwuxZLh58DXCOTge8QP77mSNAplklOvms2sZvFo jH/DQdo8drFldHLZ8w0xqOzqQHJmZp/k14aeqPHmdavwNxFMH8lru7EFJdnZamGpwrcG aBxaouulefnZRP75gjIutTmbUzZ/zb/5+el4bP4hHjXQFyKFuKOiAvr4JR0wAIDOKF+5 FMjewcHAoYNT4fXlYp26L8UB+wOhpjGU6pBH4I5bkvn5ksarjslABaro3XLOoQVMFb5M IwkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pvtc1SZF; 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 t5sor7458008ljk.29.2020.06.15.08.21.00 for (Google Transport Security); Mon, 15 Jun 2020 08:21:00 -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=pvtc1SZF; 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:in-reply-to:references :mime-version:content-transfer-encoding; bh=zKuQg/V734JQ52Bk2AkHR9NRP89P2pyrqBomz/3R808=; b=pvtc1SZFZTITynG6EAMVZtWwt6lRnyd/IzhXA/GcyT1APmIZRJjKvOFBulO0VpBUZp bvz9hCSRcYaxOsiDD5aSDarY9I0SBwqIkrusZOPH+r0qm7Hk1ixgsqn2Q+moDrS/ab4s /krAWc9u7RQPETLSw2VMzG/aZJnBTZ0qN88eK/MOdk+a8M8S3zUlzZk3maOnFESycdDA cFFcyXPo2frLFTbVPpZgMoDq4FmRJnXp59Ep1jtKuprRcSTFoXUwq0VNevxw4/AAyS1L O6/InAf3ar6Vt2CXzMxDD06ypaHu3Cpn0U4mwr7m2XWS2HUOuNNOx3u6l5+7Iywn7SUh xEfQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=zKuQg/V734JQ52Bk2AkHR9NRP89P2pyrqBomz/3R808=; b=YJFxx1bQXMbZcAfrjvRXUBMKd0j8SwKwyajCMqB7Q7GihvNVZ3RjVYiHyoXA/SnARI CnPmGf7Kov0eCVrbgrZPG6c6KIaY2UiQnUpWOjogvXji5RqQmWXfYtJkK2XHCG4shjVY YiRZSeo41u/4PrtXkDFvS+NYrrFZKE72Oe++PQ36sEHWlHbucp7QGKkkoHur3jHo8sGy AVHxiY0rZKw7pVH78/bwiDn0pFM0cO7OtVyNvMLOBjqj1iS9UCxpBVBxyWivZIXe1eul r1X5UO7seMBLIqf6gmfsV/G+P16agcWwv9MH97SalaEh1bpm9kme3DrgGAL+ADNf30ec jQaA== X-Gm-Message-State: AOAM530+rg0kD9vpYHoAtxHI9v/DTBWe891YWDt0syg8U7p6E6+sKTK/ XOYu44ujy3d++oxZXaP7ZppqY4bZ X-Google-Smtp-Source: ABdhPJzk+/msjtPy+gK56odrzaAF+uDCn54CXNp4xuAEJt/Zr3zDNx3DSb7724QQbj0z/HWq04YcBg== X-Received: by 2002:a2e:9e86:: with SMTP id f6mr11881801ljk.95.1592234459927; Mon, 15 Jun 2020 08:20:59 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-98-128-181-7.NA.cust.bahnhof.se. [98.128.181.7]) by smtp.gmail.com with ESMTPSA id r13sm507045lfp.80.2020.06.15.08.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 08:20:58 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Lorenzo Pieralisi , Saravana Kannan , linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" , Daniel Lezcano , Lina Iyer , Vincent Guittot , Stephen Boyd , Bjorn Andersson , Benjamin Gaignard , Ulf Hansson , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/5] cpuidle: psci: Fail cpuidle registration if set OSI mode failed Date: Mon, 15 Jun 2020 17:20:50 +0200 Message-Id: <20200615152054.6819-2-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200615152054.6819-1-ulf.hansson@linaro.org> References: <20200615152054.6819-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Currently we allow the cpuidle driver registration to succeed, even if we failed to enable the OSI mode when the hierarchical DT layout is used. This means running in a degraded mode, by using the available idle states per CPU, while also preventing the domain idle states. Moving forward, this behaviour looks quite questionable to maintain, as complexity seems to grow around it, especially when trying to add support for deferred probe, for example. Therefore, let's make the cpuidle driver registration to fail in this situation, thus relying on the default architectural cpuidle backend for WFI to be used. Signed-off-by: Ulf Hansson --- drivers/cpuidle/cpuidle-psci-domain.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.20.1 Reviewed-by: Lina Iyer diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c index 423f03bbeb74..f07786aad673 100644 --- a/drivers/cpuidle/cpuidle-psci-domain.c +++ b/drivers/cpuidle/cpuidle-psci-domain.c @@ -26,7 +26,6 @@ struct psci_pd_provider { }; static LIST_HEAD(psci_pd_providers); -static bool osi_mode_enabled __initdata; static int psci_pd_power_off(struct generic_pm_domain *pd) { @@ -272,7 +271,6 @@ static int __init psci_idle_init_domains(void) goto remove_pd; } - osi_mode_enabled = true; of_node_put(np); pr_info("Initialized CPU PM domain topology\n"); return pd_count; @@ -293,9 +291,6 @@ struct device __init *psci_dt_attach_cpu(int cpu) { struct device *dev; - if (!osi_mode_enabled) - return NULL; - dev = dev_pm_domain_attach_by_name(get_cpu_device(cpu), "psci"); if (IS_ERR_OR_NULL(dev)) return dev;