public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: driver-core@lists.linux.dev
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] cacheinfo: move cache_setup_acpi to header
Date: Tue,  5 May 2026 00:59:36 -0700	[thread overview]
Message-ID: <20260505075936.183004-1-rosenp@gmail.com> (raw)

cacheinfo.h already has handling for acpi_get_cache_info to be a static
inline ENOTSUPP function. Move it there as both functions are in the
same boat.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/base/cacheinfo.c  | 5 -----
 include/linux/cacheinfo.h | 8 +++++++-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index 391ac5e3d2f5..ca7f266729d1 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -366,11 +366,6 @@ static inline int cache_setup_of_node(unsigned int cpu) { return 0; }
 int init_of_cache_level(unsigned int cpu) { return 0; }
 #endif
 
-int __weak cache_setup_acpi(unsigned int cpu)
-{
-	return -ENOTSUPP;
-}
-
 unsigned int coherency_max_size;
 
 static int cache_setup_properties(unsigned int cpu)
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
index c8f4f0a0b874..73ab4a6e3551 100644
--- a/include/linux/cacheinfo.h
+++ b/include/linux/cacheinfo.h
@@ -86,7 +86,6 @@ int early_cache_level(unsigned int cpu);
 int init_cache_level(unsigned int cpu);
 int init_of_cache_level(unsigned int cpu);
 int populate_cache_leaves(unsigned int cpu);
-int cache_setup_acpi(unsigned int cpu);
 bool last_level_cache_is_valid(unsigned int cpu);
 bool last_level_cache_is_shared(unsigned int cpu_x, unsigned int cpu_y);
 int fetch_cache_info(unsigned int cpu);
@@ -106,7 +105,14 @@ int acpi_get_cache_info(unsigned int cpu,
 {
 	return -ENOENT;
 }
+
+static inline
+int cache_setup_acpi(unsigned int cpu) {
+	return -ENOTSUPP;
+};
+
 #else
+int cache_setup_acpi(unsigned int cpu);
 int acpi_get_cache_info(unsigned int cpu,
 			unsigned int *levels, unsigned int *split_levels);
 #endif
-- 
2.54.0


             reply	other threads:[~2026-05-05  7:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  7:59 Rosen Penev [this message]
2026-05-05  8:04 ` [PATCH] cacheinfo: move cache_setup_acpi to header Greg Kroah-Hartman
2026-05-05  8:08   ` Rosen Penev
2026-05-05  8:35     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260505075936.183004-1-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox