From nobody Mon Feb 9 21:19:56 2026 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53360231827 for ; Mon, 19 Jan 2026 14:31:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768833092; cv=none; b=Hrpo4HFx/EeY3g+DHRQo2UMCqkzK/uicPrMXvKbCyovtW4PPqoZSFi30tQzIF97RhghFMlyIAhnzZp+BVvtqXk2bayP0wDeKngNz19Uyrst90cYCv5qycZEVmPUqSlAVrYkex++1fWbctrmVVu0yTMog65CJRSy5b9JHdKxN500= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768833092; c=relaxed/simple; bh=h63v7DdGLRtlIfqMHyUIhqVL2bPvgYNJszyikys8Ey8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rk0267ZD58spC3UlUH4ntCv2BZSXszZ4p5oqb6VEoQB3MoIkfVzKwxg6vW9tMsICgTvP8bEXhl8chKOjkFhPMzyXgtsId1SpTelSI7XQ2X2oKv2O3HTqnIWymv0QH3Rln75svhX5twpjUd1hTVgiVjSGpDFPV2YDTlGrh3W9E5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jbTEF4dx; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jbTEF4dx" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-59b6d5bd575so4332623e87.1 for ; Mon, 19 Jan 2026 06:31:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768833088; x=1769437888; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jObY0CxQBZKbycpkPqiQaIebxzWVFrjrCXXvaXSeJs8=; b=jbTEF4dxHvxOfmchCA3x1GZ3X4YCD4jfAaVOaOwxCqoUAlMHfJc7BrFOhnZccHcLG7 42yU+MW4Emd6/siFKSOOM5LrJ/vTRfIwGs/iWVzAwyj6jxOOaasqTBm5Le3XXF+TpDr4 QpDPk+rQioXcP1jv2RsCX1DXp6C98yCMJfI6beDIbpRw9ok9WqV8Ygv5tJaRDhK7XVDm swz4lZXU9u/7oqr9AgyEa/lc9dAp6l9nMl6X2gf1JBQE7P/82tmzPH8Tk+bKQyBILbBZ R8LTjU7thHhvfZdGollf3SS4PNSNFPkxXkx+3yfbR1Z4AroTyNbEiiVIen381JEna0aX yqmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768833088; x=1769437888; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jObY0CxQBZKbycpkPqiQaIebxzWVFrjrCXXvaXSeJs8=; b=PlLXKDFJeVbmx/CNDV1lZnR+3bDYYnHM/44FuT4LGUym8BDoBCIK+air3T7RBO2CjV IjqSESTgzx2MDBWdojAe7b3JCTJexq7cpy/2oaZ3C1uz5tTzMdD+pd+71BYMV1zGCX97 LkBnjuspimiBiyZwX8oYaQvmKITmTHbQIO69Gz7YNvK63ckvebFbHJtlcGQn6v21S4sG NQpoQ40EVUXXgb0BcKDqeAdIYFIRSvkcisVRoMMwJQpPXFOdkgxZqwJKXQAEy9gG0HUF zV4aW976hlfoIHcSM7/jsQWzeFV421mE5ATv2yW5mh1l2SZPARPriJFX9dzM2pPRt6IG bwWQ== X-Forwarded-Encrypted: i=1; AJvYcCXTBeub1pN+TXHAnw/YeZtb/H9pfqVIr8n/391HcEYxWYg9FPXdkrtdwe3sHTicy8exfAdTTGSdVayqo4Y=@vger.kernel.org X-Gm-Message-State: AOJu0YzjondcdyAJLsg7S6TcWj5s6pE6+HMUzvOPcuUiZUBmGaFmz7rN ULbNi7jrD19bjIFb3BgAsf2cSsJRTXQ6etTHAFERAJqciUVnHWOxzXcjsfYkuVKDR9g= X-Gm-Gg: AY/fxX5j+gG/fLz/7ejkWC0eHHwcNwHmXTQl7pogPxmE0LWBNgs7xmFkAhDj/zRpYpV 2k7PIAeqvhYIQJgWVgSOjAWiFTBVK3QCIj+svGb8sWXE/HvH/BU5zg5JNhYGFRnwYOY2u8IT1SP 1IPOVanRFRjnCTLPOzfa3I0BTZPe9XpxRwTALXciMzqfSMQ7jJznE5LgOxDNy1mPMEg0p9b/5fC azXBcULzUp8Mjqu1KLiWAlTbK6jSYEWCfVB7r0vORMMsayOsD+yhytlC96U1jZ27uM2qo+voITv gngAujC13JYSlBEylLmI2wIFb5bh7JWZzLJBv5+rZesgKr40xaDqqFhd5oOlyhz12lGZr8guVFx sFI6xnMclRunT52UaYZqQJAxZyeNX0S5wKrp+91MLQHK5chtB9kyokkOgFD/Ihc8JeQH6c2eOsE UoXoB9wOWgz/3KNVSBaMgoMJ8ahIRZJLJQzYZh6xMMDHBbR08/aAPDOD+jiA0d X-Received: by 2002:a05:6512:b95:b0:59b:7e2b:33db with SMTP id 2adb3069b0e04-59baeef6d5bmr3309809e87.28.1768833088255; Mon, 19 Jan 2026 06:31:28 -0800 (PST) Received: from uffe-tuxpro14.. (h-178-174-189-39.A498.priv.bahnhof.se. [178.174.189.39]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59baf33e7fcsm3407211e87.20.2026.01.19.06.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 06:31:27 -0800 (PST) From: Ulf Hansson To: Ulf Hansson , Dhruva Gole , linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" , Kevin Hilman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] pmdomain: core: Restructure domain idle states data for genpd in debugfs Date: Mon, 19 Jan 2026 15:31:13 +0100 Message-ID: <20260119143121.161583-2-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119143121.161583-1-ulf.hansson@linaro.org> References: <20260119143121.161583-1-ulf.hansson@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To prepare for additional information to be added for the domain idle states in genpd's debugfs, let's make the existing information denser. To allow that, let's move the static information of the domain idle states into a separate debugfs file. Signed-off-by: Ulf Hansson --- drivers/pmdomain/core.c | 43 ++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index bf82775f6a67..919dff2081d6 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -3772,11 +3772,11 @@ static int idle_states_show(struct seq_file *s, voi= d *data) if (ret) return -ERESTARTSYS; =20 - seq_puts(s, "State Time Spent(ms) Usage Rejected Above = Below\n"); + seq_puts(s, "State Time(ms) Usage Rejected Above Below= \n"); =20 for (i =3D 0; i < genpd->state_count; i++) { struct genpd_power_state *state =3D &genpd->states[i]; - char state_name[15]; + char state_name[7]; =20 idle_time +=3D state->idle_time; =20 @@ -3788,14 +3788,36 @@ static int idle_states_show(struct seq_file *s, voi= d *data) } } =20 - if (!state->name) - snprintf(state_name, ARRAY_SIZE(state_name), "S%-13d", i); - + snprintf(state_name, ARRAY_SIZE(state_name), "S%-5d", i); do_div(idle_time, NSEC_PER_MSEC); - seq_printf(s, "%-14s %-14llu %-10llu %-10llu %-10llu %llu\n", - state->name ?: state_name, idle_time, - state->usage, state->rejected, state->above, - state->below); + seq_printf(s, "%-6s %-14llu %-10llu %-10llu %-10llu %llu\n", + state_name, idle_time, state->usage, state->rejected, + state->above, state->below); + } + + genpd_unlock(genpd); + return ret; +} + +static int idle_states_desc_show(struct seq_file *s, void *data) +{ + struct generic_pm_domain *genpd =3D s->private; + unsigned int i; + int ret =3D 0; + + ret =3D genpd_lock_interruptible(genpd); + if (ret) + return -ERESTARTSYS; + + seq_puts(s, "State Name\n"); + + for (i =3D 0; i < genpd->state_count; i++) { + struct genpd_power_state *state =3D &genpd->states[i]; + char state_name[7]; + + snprintf(state_name, ARRAY_SIZE(state_name), "S%-5d", i); + seq_printf(s, "%-6s %s\n", + state_name, state->name ?: "N/A"); } =20 genpd_unlock(genpd); @@ -3891,6 +3913,7 @@ DEFINE_SHOW_ATTRIBUTE(summary); DEFINE_SHOW_ATTRIBUTE(status); DEFINE_SHOW_ATTRIBUTE(sub_domains); DEFINE_SHOW_ATTRIBUTE(idle_states); +DEFINE_SHOW_ATTRIBUTE(idle_states_desc); DEFINE_SHOW_ATTRIBUTE(active_time); DEFINE_SHOW_ATTRIBUTE(total_idle_time); DEFINE_SHOW_ATTRIBUTE(devices); @@ -3911,6 +3934,8 @@ static void genpd_debug_add(struct generic_pm_domain = *genpd) d, genpd, &sub_domains_fops); debugfs_create_file("idle_states", 0444, d, genpd, &idle_states_fops); + debugfs_create_file("idle_states_desc", 0444, + d, genpd, &idle_states_desc_fops); debugfs_create_file("active_time", 0444, d, genpd, &active_time_fops); debugfs_create_file("total_idle_time", 0444, --=20 2.43.0