Thread (19 messages) flat view 19 messages, 5 authors, 2018-10-04

Re: [PATCH v2 1/4] powerpc/tm: Remove msr_tm_active()

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-08-17 00:49:50

Michael Neuling [off-list ref] writes:
On Mon, 2018-06-18 at 19:59 -0300, Breno Leitao wrote:
quoted
Currently msr_tm_active() is a wrapper around MSR_TM_ACTIVE() if
CONFIG_PPC_TRANSACTIONAL_MEM is set, or it is just a function that
returns false if CONFIG_PPC_TRANSACTIONAL_MEM is not set.

This function is not necessary, since MSR_TM_ACTIVE() just do the same,
checking for the TS bits and does not require any TM facility.

This patchset remove every instance of msr_tm_active() and replaced it
by MSR_TM_ACTIVE().

Signed-off-by: Breno Leitao <leitao@debian.org>
Patch looks good... one minor nit below...
quoted
 
-	if (!msr_tm_active(regs->msr) &&
-		!current->thread.load_fp && !loadvec(current->thread))
+	if (!current->thread.load_fp && !loadvec(current->thread)) {
+#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
+		if (!MSR_TM_ACTIVE(regs->msr))
+			return;
Can you make a MSR_TM_ACTIVE() that returns false when
!CONFIG_PPC_TRANSACTIONAL_MEM. Then you don't need this inline #ifdef.
Is that safe?

I see ~50 callers of MSR_TM_ACTIVE(), are they all inside #ifdef TM ?

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help