mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sahil Siddiq <icegambit91@gmail.com>
To: jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com
Cc: sahilcdq@proton.me, linux-openrisc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/3] openrisc: Add cacheinfo support and introduce new utility functions
Date: Sat, 29 Mar 2025 01:56:29 +0530	[thread overview]
Message-ID: <20250328202632.72809-1-sahilcdq@proton.me> (raw)

Hi,

The main purpose of this series is to expose CPU cache attributes for
OpenRISC in sysfs using the cacheinfo API. The core implementation
to achieve this is in patch #3. Patch #1 and #2 add certain enhancements
to simplify the implementation of cacheinfo support.

Patch #1 removes duplication of cache-related data members in struct
cpuinfo_or1k.

Patch #2 introduces several utility functions. One set of functions is
used to check if the cache components and SPRs exist before attempting
to use them. The other set provides a convenient interface to flush or
invalidate a range of cache blocks.

This version addresses review comments posted in response to v3. In
commit #2, I chose not to make "cache_loop_page()" inline after reading
point 15 in the coding style doc [1]. Let me know if it should be made
inline.

Thanks,
Sahil

[1] https://www.kernel.org/doc/html/latest/process/coding-style.html

Sahil Siddiq (3):
  openrisc: Refactor struct cpuinfo_or1k to reduce duplication
  openrisc: Introduce new utility functions to flush and invalidate
    caches
  openrisc: Add cacheinfo support

 arch/openrisc/include/asm/cacheflush.h |  17 ++++
 arch/openrisc/include/asm/cpuinfo.h    |  31 ++++++--
 arch/openrisc/kernel/Makefile          |   2 +-
 arch/openrisc/kernel/cacheinfo.c       | 104 +++++++++++++++++++++++++
 arch/openrisc/kernel/dma.c             |  18 +----
 arch/openrisc/kernel/setup.c           |  45 +----------
 arch/openrisc/mm/cache.c               |  87 +++++++++++++++++++--
 arch/openrisc/mm/init.c                |   5 +-
 8 files changed, 235 insertions(+), 74 deletions(-)
 create mode 100644 arch/openrisc/kernel/cacheinfo.c


base-commit: ea1413e5b53a8dd4fa7675edb23cdf828bbdce1e
-- 
2.48.1


             reply	other threads:[~2025-03-28 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28 20:26 Sahil Siddiq [this message]
2025-03-28 20:26 ` [PATCH v4 1/3] openrisc: Refactor struct cpuinfo_or1k to reduce duplication Sahil Siddiq
2025-03-28 20:26 ` [PATCH v4 2/3] openrisc: Introduce new utility functions to flush and invalidate caches Sahil Siddiq
2025-03-28 21:48   ` Stafford Horne
2025-03-29  7:00     ` Sahil Siddiq
2025-03-28 20:26 ` [PATCH v4 3/3] openrisc: Add cacheinfo support Sahil Siddiq

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=20250328202632.72809-1-sahilcdq@proton.me \
    --to=icegambit91@gmail.com \
    --cc=jonas@southpole.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-openrisc@vger.kernel.org \
    --cc=sahilcdq@proton.me \
    --cc=shorne@gmail.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    /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

all inboxes | Powered by JetHome®