From: Michael Ellerman <mpe@ellerman.id.au>
To: Sam bobroff <sam.bobroff@au1.ibm.com>, benh@kernel.crashing.org
Cc: mikey@neuling.org, azanella@linux.vnet.ibm.com,
linuxppc-dev@lists.ozlabs.org, matt@ozlabs.org
Subject: Re: [1/1] powerpc/tm: Abort syscalls in active transactions (v2)
Date: Fri, 19 Jun 2015 17:12:14 +1000 (AEST) [thread overview]
Message-ID: <20150619071214.97DEB140213@ozlabs.org> (raw)
In-Reply-To: <dd848073cfae511453b9f558c0fbb3859909f268.1434071179.git.sam.bobroff@au1.ibm.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1811 bytes --]
On Fri, 2015-12-06 at 01:06:32 UTC, Sam bobroff wrote:
> This patch changes the syscall handler to doom (tabort) active
> transactions when a syscall is made and return very early without
> performing the syscall and keeping side effects to a minimum (no CPU
> accounting or system call tracing is performed). Also included is a
> new HWCAP2 bit, PPC_FEATURE2_HTM_NOSC, to indicate this
> behaviour to userspace.
> ---
> Documentation/powerpc/transactional_memory.txt | 32 ++++++++++++-------------
> arch/powerpc/include/asm/cputable.h | 10 ++++----
> arch/powerpc/include/uapi/asm/cputable.h | 1 +
> arch/powerpc/include/uapi/asm/tm.h | 2 +-
> arch/powerpc/kernel/cputable.c | 4 +++-
> arch/powerpc/kernel/entry_64.S | 28 ++++++++++++++++++++++
> tools/testing/selftests/powerpc/tm/tm-syscall.c | 3 ++-
You forgot to add the tm-syscall test back into the Makefile, when I do that I get:
In file included from tm-syscall.c:21:0:
tm-syscall.c: In function ‘tm_syscall’:
tm-syscall.c:86:7: error: ‘PPC_FEATURE2_HTM_NOSC’ undeclared (first use in this function)
& PPC_FEATURE2_HTM_NOSC));
^
Because the toolchain headers don't contain that definition.
To fix it you need to include the generated kernel headers:
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index 1b616fa79e93..4bea62a319dc 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -5,7 +5,7 @@ all: $(TEST_PROGS)
$(TEST_PROGS): ../harness.c
tm-syscall: tm-syscall-asm.S
-tm-syscall: CFLAGS += -mhtm
+tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include
include ../../lib.mk
I've fixed it up for you.
cheers
prev parent reply other threads:[~2015-06-19 7:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 1:06 [PATCH 1/1] powerpc/tm: Abort syscalls in active transactions (v2) Sam Bobroff
2015-06-19 7:12 ` Michael Ellerman [this message]
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=20150619071214.97DEB140213@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=azanella@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=matt@ozlabs.org \
--cc=mikey@neuling.org \
--cc=sam.bobroff@au1.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;
as well as URLs for NNTP newsgroup(s).