From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>,
Ard Biesheuvel <ardb@kernel.org>,
Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH v2 0/2] ARM: implement cacheinfo support (for v7/v7m)
Date: Mon, 14 Oct 2024 16:55:19 +0300 [thread overview]
Message-ID: <20241014-armv7-cacheinfo-v2-0-38ab76d2b7fa@linaro.org> (raw)
Follow the ARM64 platform and implement simple cache information driver.
As it reads data from CTR (ARMv6+) and CLIDR (ARMv7+) registers, it is
limited to the ARMv7 / ARMv7M, providing simple fallback or just
returning -EOPNOTSUPP in case of older platforms.
In theory we should be able to skip CLIDR reading and assume that Dcache
and Icache (or unified L1 cache) always exist if CTR is supported and
returns sensible value. However I think this better be handled by the
maintainers of corresponding platforms.
Other than just providing information to the userspace, this patchset is
required in order to implement L2 cache driver (and in the end CPU
frequency scaling) on ARMv7-based Qualcomm devices.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v2:
- Handle cores like ARM1176, which have cpu_architecture() ==
CPU_ARCH_ARMv7 (because of VMSAv7 implementation), but no CLIDR
register (because they are ARMv6) (Arnd).
- Link to v1: https://lore.kernel.org/r/20231231-armv7-cacheinfo-v1-0-9e8d440b59d9@linaro.org
---
Dmitry Baryshkov (2):
ARM: add CLIDR accessor functions
ARM: implement cacheinfo support
arch/arm/Kconfig | 1 +
arch/arm/include/asm/cache.h | 6 ++
arch/arm/include/asm/cachetype.h | 13 +++
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/cacheinfo.c | 173 +++++++++++++++++++++++++++++++++++++++
include/linux/cacheinfo.h | 2 +-
6 files changed, 195 insertions(+), 1 deletion(-)
---
base-commit: 7f773fd61baa9b136faa5c4e6555aa64c758d07c
change-id: 20231231-armv7-cacheinfo-9fa533ae371e
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
next reply other threads:[~2024-10-14 15:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 13:55 Dmitry Baryshkov [this message]
2024-10-14 13:55 ` [PATCH v2 1/2] ARM: add CLIDR accessor functions Dmitry Baryshkov
2024-11-07 13:51 ` Linus Walleij
2024-10-14 13:55 ` [PATCH v2 2/2] ARM: implement cacheinfo support Dmitry Baryshkov
2024-11-07 13:55 ` Linus Walleij
[not found] ` <CGME20250115101159eucas1p1261a8b3e78b83c4fec63e3ac00e4d59a@eucas1p1.samsung.com>
2025-01-15 10:11 ` Marek Szyprowski
2025-01-15 11:11 ` Dmitry Baryshkov
2024-11-04 11:51 ` [PATCH v2 0/2] ARM: implement cacheinfo support (for v7/v7m) Dmitry Baryshkov
2024-11-04 11:52 ` Ard Biesheuvel
2024-11-07 13:55 ` Linus Walleij
2024-11-07 14:34 ` Dmitry Baryshkov
2025-01-03 5:55 ` Dmitry Baryshkov
2025-01-13 15:07 ` Linus Walleij
2025-01-14 11:57 ` Dmitry Baryshkov
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=20241014-armv7-cacheinfo-v2-0-38ab76d2b7fa@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=andersson@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=konradybcio@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=sudeep.holla@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).