From: Thibault Ferrante <thibault.ferrante@canonical.com>
To: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
Venkat <venkat88@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com,
mpe@ellerman.id.au, npiggin@gmail.com, shuah@kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/powerpc/tm: Fix tcheck() reading uninitialised CR value
Date: Wed, 9 Sep 2026 12:05:00 +0200 [thread overview]
Message-ID: <1940bd28-3dda-4a03-a8b9-37fd0731282a@canonical.com> (raw)
In-Reply-To: <d80d892c-8505-4530-a23f-e3b6daf72d03@kernel.org>
On 09/09/2026 10:56, Christophe Leroy (CS GROUP) wrote:
>>> diff --git a/tools/testing/selftests/powerpc/tm/tm.h b/tools/testing/selftests/powerpc/tm/tm.h
>>> index c03c6e778876..6024ce4ba6ff 100644
>>> --- a/tools/testing/selftests/powerpc/tm/tm.h
>>> +++ b/tools/testing/selftests/powerpc/tm/tm.h
>>> @@ -105,8 +105,12 @@ static inline bool failure_is_nesting(void)
>>> static inline int tcheck(void)
>>> {
>>> long cr;
>>> - asm volatile ("tcheck 0" : "=r"(cr) : : "cr0");
>>> - return (cr >> 28) & 4;
>>> + asm volatile("tcheck 0;"
>
> Why not use cr7 instead of using cr0 and doing cr >> 28 below ?
That would work, but that's not consistent with other asm in selftest/powerpc: tbegin./tend./tabort. and vas_paste() all target cr0 and shift as needed.
next prev parent reply other threads:[~2026-09-09 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 21:54 [PATCH] selftests/powerpc/tm: Fix tcheck() reading uninitialised CR value Thibault Ferrante
2026-09-09 5:28 ` Venkat
2026-09-09 8:56 ` Christophe Leroy (CS GROUP)
2026-09-09 10:05 ` Thibault Ferrante [this message]
2026-09-14 7:21 ` Madhavan Srinivasan
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=1940bd28-3dda-4a03-a8b9-37fd0731282a@canonical.com \
--to=thibault.ferrante@canonical.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=shuah@kernel.org \
--cc=venkat88@linux.ibm.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