From patchwork Thu Jan 23 11:35:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 13948191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFDD6C02182 for ; Thu, 23 Jan 2025 11:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=G5e0D4ceKro9Yb8N26UgxQagAkkEg3LLRP/2T93ftQc=; b=fRKTbrbSg5zZ7rt8Ra/7W6wXlJ d3H6AX9u2ShYmpfSCgwVsQfFWZ/xBPL5ZPJqu1/po78lIh9fm/cOFV9tQFxfk8oIQu2GU49qhHcDd QhLaNydQlMPbQXRm2CAJ6Xc8yi4vbT/++Kq1kBq4kLnXKtFgimflodUlFcZHszJqG1I9NGhWvuv3z cPBKbAF/GxD29aySEN0GTvaJlM1T8iA59+pwg5053aKwNdmW8FkC+oeJos1y2ggJp8Bc30LxDU0k0 3sQDqdKNeIiBUKYTLxAc+XDTvMb1K4aHRlpPt7ECq/bpmsjG6fB2O1g7JNtzjEAGlfjdh9PUh40vJ go18MtCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tavYP-0000000CM1m-3iGo; Thu, 23 Jan 2025 11:39:21 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tavX8-0000000CLkc-05c6 for linux-arm-kernel@lists.infradead.org; Thu, 23 Jan 2025 11:38:03 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2ee51f8c47dso1203379a91.1 for ; Thu, 23 Jan 2025 03:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737632281; x=1738237081; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G5e0D4ceKro9Yb8N26UgxQagAkkEg3LLRP/2T93ftQc=; b=RZ9X5xWs/mCoWDw1OpGivmb1GBXfIGraRCROQpbIBQ3xcFl/exf5R0+Hkk3a93DhaU PJuD0lmoJKPOvT/U4ZEEDBSKqtl8gSPO6B+jeaEYfoLx9ClQxsDXoL2TT187EaebQL5Q F3/kOWlPWekWXbSfXSRRYHWF0HTn/PezkMDw7rHL+71T98GinhpHQtEboCCMQfxpBVBT n9S48tVX9riB/vTCdO70obYVnQ6EW0AwCl2M35vzHb1O9Eb7A0Wu6B1UzYPM1zLuG52G JRCLMPkOgtNr48hv/hW/dIWsHwlm/v5vS6A1OdFRhfXaeSmG1MJp4a2n7wXQSxGj2gZV rfbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737632281; x=1738237081; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G5e0D4ceKro9Yb8N26UgxQagAkkEg3LLRP/2T93ftQc=; b=jJiPdman6rk9Goqj2L1m/gvvMqaLq4zSmBd5AZktZRO05Q9TGzjIgR4GaczxL++VpV eB6kM2gZ+ok+JM7zHquIBPSFXVkB1A4dJt8hrrcaGXC1CJAF0BqJxgZWIK3+16Z9MWWJ hh299C4JV4FXgsMb4/DeLdX2S8iTb5BKOvXqOujWvlDjWXt0RbUt9TiCiwQdfBhbpmtp /Rm0jb4un6PBU4dueO8pC2oCek+B40ISsRjJ4ooLdou+CXhMvNC80TJ2RE25mVLD0h4b SNyTJ8X+NX2w7OiOrkzWDu3SRcAqk8sDOXaDfsD7KJSF2OaZJCPDiSrmQp+b2AzMzsP/ pVTw== X-Forwarded-Encrypted: i=1; AJvYcCU0nRT7Vk2LY1WJoWk4VjLhuBOG5/DaEuHAGSX/qvnHeb8YLLzM7GGQkVwFp3XexRDoGnlodPuBY55Cgpamk42M@lists.infradead.org X-Gm-Message-State: AOJu0YyeIpR4qQTMqfQgknTW093lPGRoCa20+Ljhf8vkAhL/7OjewdWS 7nqswhnziNzZHHn1yDgyszkSme3mrmpEyXYKbdDKfKgjX1Emp+H+6rc99XK//HA= X-Gm-Gg: ASbGncszGT8mnXhDeQsRTLOTjB3RwfOrvLD9Y7Ynz7AZZaYXi8VDc3ByA8AFNEtI2wf E03LWJnNmQgWhti4i79LpcbsFTgDIkDPjSc4099l6Q3k+1K1Hka1UixApbKMqsmAG2p8RkQp3Ru e32QIorBwUfQfwY942wQiHLbco0iHR4TfkYdel0O5xhJU+kM74nfhKpoKDaUorXkLbSNwP91d19 MqJ9e5PUmtcwKnHCkkYMi60huVauaHYhZb6zAO2EC+lByWFTkjIFFAnIOp7xjLSv6CeDrqwHdHf N98P5Ug= X-Google-Smtp-Source: AGHT+IGtsIzzGfAcKL/PEpiuES32TcQcp9F7OLmJOeJMP9wYjML8Ng6LAzORWCaFKdsDKOmTsmrEHA== X-Received: by 2002:a17:90b:5206:b0:2f4:f7f8:fc8b with SMTP id 98e67ed59e1d1-2f782d4ed77mr37302192a91.27.1737632280204; Thu, 23 Jan 2025 03:38:00 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f7e6a5e2b2sm3705966a91.3.2025.01.23.03.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 03:37:59 -0800 (PST) From: Viresh Kumar To: "Rafael J. Wysocki" , Alyssa Rosenzweig , AngeloGioacchino Del Regno , Broadcom internal kernel review list , Christophe Leroy , Cristian Marussi , Fabio Estevam , Florian Fainelli , Hector Martin , Huacai Chen , Jiaxun Yang , Jonathan Hunter , Kevin Hilman , Madhavan Srinivasan , Markus Mayer , Matthias Brugger , Michael Ellerman , Naveen N Rao , Nicholas Piggin , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Sudeep Holla , Sven Peter , Thierry Reding , Viresh Kumar , WANG Xuerui Cc: linux-pm@vger.kernel.org, Vincent Guittot , arm-scmi@vger.kernel.org, asahi@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, loongarch@lists.linux.dev Subject: [PATCH 00/33] cpufreq: manage common sysfs attributes from core Date: Thu, 23 Jan 2025 17:05:36 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250123_033802_058884_DB01F38A X-CRM114-Status: GOOD ( 11.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, Most of the drivers add available and boost frequencies related attributes. This patch series tries to avoid duplication and simplify driver's code by managing these from core code. A quick search revealed that only the drivers that set the policy->freq_table field, enable these attributes. Which makes sense as well, since the show_available_freqs() helper works only if the freq_table is present. In order to simplify drivers, create the relevant sysfs files forcefully from cpufreq core. Pushed here: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/core-attr Acked-by: Rafael J. Wysocki --- Viresh Viresh Kumar (33): cpufreq: Always create freq-table related sysfs file cpufreq: dt: Stop setting cpufreq_driver->attr field cpufreq: acpi: Stop setting common freq attributes cpufreq: apple: Stop setting cpufreq_driver->attr field cpufreq: bmips: Stop setting cpufreq_driver->attr field cpufreq: brcmstb: Stop setting common freq attributes cpufreq: davinci: Stop setting cpufreq_driver->attr field cpufreq: e_powersaver: Stop setting cpufreq_driver->attr field cpufreq: elanfreq: Stop setting cpufreq_driver->attr field cpufreq: imx6q: Stop setting cpufreq_driver->attr field cpufreq: kirkwood: Stop setting cpufreq_driver->attr field cpufreq: longhaul: Stop setting cpufreq_driver->attr field cpufreq: loongson: Stop setting cpufreq_driver->attr field cpufreq: mediatek: Stop setting cpufreq_driver->attr field cpufreq: omap: Stop setting cpufreq_driver->attr field cpufreq: p4: Stop setting cpufreq_driver->attr field cpufreq: pasemi: Stop setting cpufreq_driver->attr field cpufreq: pmac: Stop setting cpufreq_driver->attr field cpufreq: powernow: Stop setting cpufreq_driver->attr field cpufreq: powernv: Stop setting common freq attributes cpufreq: qcom: Stop setting cpufreq_driver->attr field cpufreq: qoriq: Stop setting cpufreq_driver->attr field cpufreq: sc520_freq: Stop setting cpufreq_driver->attr field cpufreq: scmi: Stop setting cpufreq_driver->attr field cpufreq: scpi: Stop setting cpufreq_driver->attr field cpufreq: sh: Stop setting cpufreq_driver->attr field cpufreq: spear: Stop setting cpufreq_driver->attr field cpufreq: speedstep: Stop setting cpufreq_driver->attr field cpufreq: tegra: Stop setting cpufreq_driver->attr field cpufreq: vexpress: Stop setting cpufreq_driver->attr field cpufreq: virtual: Stop setting cpufreq_driver->attr field cpufreq: Remove cpufreq_generic_attrs cpufreq: Stop checking for duplicate available/boost freq attributes drivers/cpufreq/acpi-cpufreq.c | 1 - drivers/cpufreq/apple-soc-cpufreq.c | 8 -------- drivers/cpufreq/bmips-cpufreq.c | 1 - drivers/cpufreq/brcmstb-avs-cpufreq.c | 1 - drivers/cpufreq/cpufreq-dt.c | 8 -------- drivers/cpufreq/cpufreq.c | 15 +++++++++++++++ drivers/cpufreq/davinci-cpufreq.c | 1 - drivers/cpufreq/e_powersaver.c | 1 - drivers/cpufreq/elanfreq.c | 1 - drivers/cpufreq/freq_table.c | 8 -------- drivers/cpufreq/imx6q-cpufreq.c | 1 - drivers/cpufreq/kirkwood-cpufreq.c | 1 - drivers/cpufreq/longhaul.c | 1 - drivers/cpufreq/loongson2_cpufreq.c | 1 - drivers/cpufreq/loongson3_cpufreq.c | 1 - drivers/cpufreq/mediatek-cpufreq-hw.c | 1 - drivers/cpufreq/mediatek-cpufreq.c | 1 - drivers/cpufreq/omap-cpufreq.c | 1 - drivers/cpufreq/p4-clockmod.c | 1 - drivers/cpufreq/pasemi-cpufreq.c | 1 - drivers/cpufreq/pmac32-cpufreq.c | 1 - drivers/cpufreq/pmac64-cpufreq.c | 1 - drivers/cpufreq/powernow-k6.c | 1 - drivers/cpufreq/powernow-k7.c | 1 - drivers/cpufreq/powernow-k8.c | 1 - drivers/cpufreq/powernv-cpufreq.c | 2 -- drivers/cpufreq/qcom-cpufreq-hw.c | 7 ------- drivers/cpufreq/qoriq-cpufreq.c | 1 - drivers/cpufreq/sc520_freq.c | 1 - drivers/cpufreq/scmi-cpufreq.c | 8 -------- drivers/cpufreq/scpi-cpufreq.c | 1 - drivers/cpufreq/sh-cpufreq.c | 1 - drivers/cpufreq/spear-cpufreq.c | 1 - drivers/cpufreq/speedstep-centrino.c | 1 - drivers/cpufreq/speedstep-ich.c | 1 - drivers/cpufreq/speedstep-smi.c | 1 - drivers/cpufreq/tegra186-cpufreq.c | 1 - drivers/cpufreq/tegra194-cpufreq.c | 1 - drivers/cpufreq/vexpress-spc-cpufreq.c | 1 - drivers/cpufreq/virtual-cpufreq.c | 1 - include/linux/cpufreq.h | 1 - 41 files changed, 15 insertions(+), 75 deletions(-)