linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Drew Fustini <fustini@kernel.org>
To: "Radim Krčmář" <rkrcmar@ventanamicro.com>
Cc: "Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Conor Dooley" <conor@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Kornel Dulęba" <mindal@semihalf.com>,
	"Adrien Ricciardi" <aricciardi@baylibre.com>,
	"James Morse" <james.morse@arm.com>,
	"Atish Kumar Patra" <atishp@rivosinc.com>,
	"Atish Patra" <atish.patra@linux.dev>,
	"Vasudevan Srinivasan" <vasu@rivosinc.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	guo.wenjia23@zte.com.cn, liu.qingtao2@zte.com.cn,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org,
	linux-riscv <linux-riscv-bounces@lists.infradead.org>
Subject: Re: [PATCH v4 3/3] RISC-V: Add support for srmcfg CSR from Ssqosid ext
Date: Sat, 11 Oct 2025 11:35:46 -0700	[thread overview]
Message-ID: <aOqjggmTr4ioHwB/@x1> (raw)
In-Reply-To: <DDDL94HT7HYF.3VU2WQYU4WZY5@ventanamicro.com>

On Thu, Oct 09, 2025 at 08:47:27AM +0200, Radim Krčmář wrote:
> 2025-10-07T23:21:12-07:00, Drew Fustini <fustini@kernel.org>:
> > diff --git a/arch/riscv/include/asm/qos.h b/arch/riscv/include/asm/qos.h
> > +static inline void __switch_to_srmcfg(struct task_struct *next)
> > +{
> > +	u32 *cpu_srmcfg_ptr = this_cpu_ptr(&cpu_srmcfg);
> > +	u32 thread_srmcfg;
> > +
> > +	thread_srmcfg = READ_ONCE(next->thread.srmcfg);
> > +
> > +	if (thread_srmcfg != *cpu_srmcfg_ptr) {
> 
> Wouldn't prev->thread.srmcfg have the value of CSR_SRMCFG when executing
> switch_to?

Thanks for reviewing. Yes, you are right that prev->thread.srmcfg should
have same value as CSR_SRMCFG. Are you suggesting that the cpu_srmcfg is
not necessary as prev->thread.srmcfg should have same value?

Drew

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2025-10-11 18:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08  6:21 [PATCH v4 0/3] RISC-V: Detect Ssqosid extension and handle srmcfg CSR Drew Fustini
2025-10-08  6:21 ` [PATCH v4 1/3] dt-bindings: riscv: Add Ssqosid extension description Drew Fustini
2025-10-08  6:21 ` [PATCH v4 2/3] RISC-V: Detect the Ssqosid extension Drew Fustini
2025-10-08  6:21 ` [PATCH v4 3/3] RISC-V: Add support for srmcfg CSR from Ssqosid ext Drew Fustini
2025-10-09  6:47   ` Radim Krčmář
2025-10-11 18:35     ` Drew Fustini [this message]
2025-10-13  9:06       ` Radim Krčmář
2025-11-07 17:44         ` Drew Fustini
2025-10-10 12:23 ` [External] [PATCH v4 0/3] RISC-V: Detect Ssqosid extension and handle srmcfg CSR yunhui cui
2025-10-10 21:56   ` Drew Fustini

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=aOqjggmTr4ioHwB/@x1 \
    --to=fustini@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=aricciardi@baylibre.com \
    --cc=atish.patra@linux.dev \
    --cc=atishp@rivosinc.com \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guo.wenjia23@zte.com.cn \
    --cc=james.morse@arm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv-bounces@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=liu.qingtao2@zte.com.cn \
    --cc=mindal@semihalf.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rkrcmar@ventanamicro.com \
    --cc=robh@kernel.org \
    --cc=vasu@rivosinc.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).