From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [RFC PATCH 0/8] use r14 for a per-cpu kernel register
Date: Thu, 21 Dec 2017 00:51:58 +1000 [thread overview]
Message-ID: <20171220145206.12234-1-npiggin@gmail.com> (raw)
This makes r14 a fixed register and used to store per-cpu stuff in
the kernel, including read-write fields that are retained over
interrupts. It ends up being most useful for speeding up per-cpu
pointer dereferencing and soft-irq masking and testing. But it can
also reduce the number of loads and stores in the interrupt entry
paths by moving several bits of interest into r14 (another bit I'm
looking at is adding a bit for HSTATE_IN_GUEST to speed up kvmtest).
The series goes on top of Maddy's softi-irq patches, it works on 64s,
but KVM and 64e are probably broken at the moment. So it's not
intended to merge yet, but if people like the result then maybe the
first patch can be merged to stop using r14 in preparation.
Nicholas Piggin (8):
powerpc/64s: stop using r14 register
powerpc/64s: poison r14 register while in kernel
powerpc/64s: put the per-cpu data_offset in r14
powerpc/64s: put io_sync bit into r14
powerpc/64s: put work_pending bit into r14
powerpc/64s: put irq_soft_mask bits into r14
powerpc/64s: put irq_soft_mask and irq_happened bits into r14
powerpc/64s: inline local_irq_enable/restore
arch/powerpc/Makefile | 1 +
arch/powerpc/crypto/md5-asm.S | 40 +++----
arch/powerpc/crypto/sha1-powerpc-asm.S | 10 +-
arch/powerpc/include/asm/exception-64s.h | 127 +++++++++++----------
arch/powerpc/include/asm/hw_irq.h | 130 ++++++++++-----------
arch/powerpc/include/asm/io.h | 11 +-
arch/powerpc/include/asm/irqflags.h | 24 ++--
arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +-
arch/powerpc/include/asm/kvm_ppc.h | 6 +-
arch/powerpc/include/asm/paca.h | 73 +++++++++++-
arch/powerpc/include/asm/percpu.h | 2 +-
arch/powerpc/include/asm/ppc_asm.h | 21 +++-
arch/powerpc/include/asm/spinlock.h | 21 ++--
arch/powerpc/kernel/asm-offsets.c | 23 +++-
arch/powerpc/kernel/entry_32.S | 4 +-
arch/powerpc/kernel/entry_64.S | 95 ++++++++++------
arch/powerpc/kernel/exceptions-64s.S | 52 ++++-----
arch/powerpc/kernel/head_64.S | 25 ++--
arch/powerpc/kernel/idle_book3s.S | 86 +++++++-------
arch/powerpc/kernel/irq.c | 92 ++++++---------
arch/powerpc/kernel/kgdb.c | 8 +-
arch/powerpc/kernel/optprobes_head.S | 3 +-
arch/powerpc/kernel/paca.c | 1 -
arch/powerpc/kernel/process.c | 6 +-
arch/powerpc/kernel/setup_64.c | 19 +++-
arch/powerpc/kernel/time.c | 15 +--
arch/powerpc/kernel/tm.S | 40 ++++---
arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 10 +-
arch/powerpc/kvm/book3s_hv.c | 6 +-
arch/powerpc/kvm/book3s_hv_interrupts.S | 5 +-
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +-
arch/powerpc/kvm/book3s_interrupts.S | 93 +++++++++++----
arch/powerpc/kvm/book3s_pr.c | 6 +
arch/powerpc/lib/checksum_64.S | 66 +++++------
arch/powerpc/lib/copypage_power7.S | 32 +++---
arch/powerpc/lib/copyuser_power7.S | 152 ++++++++++++-------------
arch/powerpc/lib/crtsavres.S | 3 +
arch/powerpc/lib/memcpy_power7.S | 80 ++++++-------
arch/powerpc/lib/sstep.c | 1 +
arch/powerpc/xmon/xmon.c | 7 +-
40 files changed, 764 insertions(+), 637 deletions(-)
--
2.15.0
next reply other threads:[~2017-12-20 14:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 14:51 Nicholas Piggin [this message]
2017-12-20 14:51 ` [RFC PATCH 1/8] powerpc/64s: stop using r14 register Nicholas Piggin
2017-12-20 14:52 ` [RFC PATCH 2/8] powerpc/64s: poison r14 register while in kernel Nicholas Piggin
2017-12-20 14:52 ` [RFC PATCH 3/8] powerpc/64s: put the per-cpu data_offset in r14 Nicholas Piggin
2017-12-20 17:53 ` Gabriel Paubert
2017-12-22 13:50 ` Nicholas Piggin
2017-12-20 14:52 ` [RFC PATCH 4/8] powerpc/64s: put io_sync bit into r14 Nicholas Piggin
2017-12-22 15:08 ` Thiago Jung Bauermann
2017-12-20 14:52 ` [RFC PATCH 5/8] powerpc/64s: put work_pending " Nicholas Piggin
2017-12-20 14:52 ` [RFC PATCH 6/8] powerpc/64s: put irq_soft_mask bits " Nicholas Piggin
2017-12-20 14:52 ` [RFC PATCH 7/8] powerpc/64s: put irq_soft_mask and irq_happened " Nicholas Piggin
2017-12-20 14:52 ` [RFC PATCH 8/8] powerpc/64s: inline local_irq_enable/restore Nicholas Piggin
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=20171220145206.12234-1-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).