From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182]) (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 6CF7B3914EB for ; Tue, 5 May 2026 07:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777967996; cv=none; b=Ib8d7+fKZBhYpNNmOT1Rm/j7ckph+2yOP8ouPKlrQl5oN7D0tZ7gV2zZYD0WaMKL//Rmgjn9AmXzrL7d0DUJsllFMK7sbqtiRJB+xSeJKhLmr+oXqniseis9OUrnk6oalRIutzKlrns/hEbjTAv0PvkozLeo2yySMwlm3Epxroo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777967996; c=relaxed/simple; bh=Xahz4rCSk/k2rCm9VfiBiTcsTqm1OyzAK1YGe8W7PNU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=htt13tJAH86DcN4pCUPLJM6vLZuqMOw3Kwx+q7HXPYEpw41ohup5k4E9tpVXeAwR3ZzD0Ju3UB7SeOfMro7qjN3xCpQ67DVe9HMzqBE2xI0iN2lJ1KZJJXBRwJFjm4mhgWYrrrAFi/thGnhiR3Q3VwBd3SwuOI4FHlWYa+q0qeM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nX5IFc0J; arc=none smtp.client-ip=74.125.82.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nX5IFc0J" Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-2ef2a1cc06dso7209493eec.0 for ; Tue, 05 May 2026 00:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777967994; x=1778572794; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+hikQBulKv4h06dEW1pjIppYIH0338MvOaKTFQrLvwQ=; b=nX5IFc0J3p1SKTDt1jQLqkkmd6TBypDDT92uzgVmz2zF7KrwBAmFxYwd8vZOx+tNxb rq5cATlzvo4ZXXZ/1Gly+G9Fhr2fxwxaJSbjBTmNVG7HhGMY+aL2IngLyLzDN92yjpNr HWeUoNLXv79fzY99kBITc6ZPj2sZdkOOnQKpw2HKQxJ85rD6X7wtLM63+rgVyhh08wQD vzgYjQbWl0L6cXNcRfo87DFsjr/leHda7+8QkoPComSj9gNI31QVBCA9qE9LOIz0mmCO MSAwEJ5YRQB4E/58XO6Nx+eU7miSQWfC6UviX9ylLYIPKE71107nWRMo47a2WEa6l9JE t6pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777967994; x=1778572794; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+hikQBulKv4h06dEW1pjIppYIH0338MvOaKTFQrLvwQ=; b=LucUnGHXO8v6bhpUyBH5yAZqJc8CLJsnC5S84R8WwndivfeHRP40oAsKyg1tjQy54s B6WKoOkK3Wupe7LRGvKLmvXjod7UVp/Z4sNrrY5S76iYZhiy/nv2UrKhKRlMpfS6eAen E4HnyzZ/PTOYlCu58R4wLmILHhmMGL91HvjJXvbyAie4skvUxvZ/9HiImyapXgZIzH2l a2bhXuxZiYyQ/jg6+xubA+38UZ69okfx4czUMcqBm/hZYN1lkrDJlgmcPXa1Zk2ucoUE 7FISZhQp4m5YaKuKaKz0LQEId5QyN2dj6vThbsR3IFu/vZovEVcw1TmByXb16Zpt11l6 6cWQ== X-Forwarded-Encrypted: i=1; AFNElJ8PZT/416jwPKcZ67o5dF3hmAmicJY9xcRuWmmPxCUrDUVOOEzgkevgUP5ydwiADISQL1yUcFbRdhmIHoE=@vger.kernel.org X-Gm-Message-State: AOJu0YyLLRcZkoj8JS+9Ict2WzziP0JagGPB/03Q249tjh5u/yvy6Tec dl5EyQm03ImmbVOPusASWoIki4qQmz8juc0JzlJtW/G5HgnM50rzVfWM X-Gm-Gg: AeBDieuWrQahCSd9XvVcSdbP3GJcuCMyZUzVk7yykPGFivrXSLlfcrcWfxZybykEso5 LVsFUw6vvND+4yjXl4Lpb16TeGbHkfA5RqbbmBMqQducNA1diaALG+uEX+742doxdaViGaIwo+y sXH5EYYf+TkloGSuMXmU+hldqE2SHjV3IDM5SniwxRW/s2vjbXDooMTG+9U2AmJ29+oyYMCdZaI kYK0XCL14v5UxaE45xZTAC3zNPl0xsY/RMuVZKUX/i4A9RFojeW1SHFfzC275LnPz0l14G8zEf7 bGOodHkSL6o0H2TuXOxxPj/WC895JKeaQ6yx1p41RH3IN3TMGLSVd0pBg/3RuyeYP2SpSx8lAT9 dOB/SwQN6g8te3JRZs2s1MQb0dPp+XXHMCoCyXTkE28b5Pt2tZp/Kbxnzqyi+x3qCSTvxE4f/Kg EXxc6YGxZj9rYvP8ZDo/pWOw3EFxGH19M1eCPtinrJK28f7/vS7+4411u6cJBDST2sWJC41uyNo qe9gEmUmlHjb05K9er2e0CGYg8paDR5F94J60pZnft1oQ== X-Received: by 2002:a05:7022:ead2:b0:130:9b78:b17b with SMTP id a92af1059eb24-1309b78b543mr2263345c88.38.1777967994255; Tue, 05 May 2026 00:59:54 -0700 (PDT) Received: from ryzen ([2601:644:8000:5b5d:7285:c2ff:fe45:8a32]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3bf6812asm19071678eec.28.2026.05.05.00.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:59:53 -0700 (PDT) From: Rosen Penev To: driver-core@lists.linux.dev Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , 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 Message-ID: <20260505075936.183004-1-rosenp@gmail.com> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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