linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hao <haokexin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH v2 0/3] powerpc: use jump label for cpu/mmu_has_feature
Date: Mon, 2 Sep 2013 13:45:23 +0800	[thread overview]
Message-ID: <1378100726-32545-1-git-send-email-haokexin@gmail.com> (raw)

v2:
  - Rebase on git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
    since these patches have a dependence on patch 851cf6e7 (jump_label:
    Split jumplabel ratelimit)

  - Drop the first two patches in v1 since they are not needed due to
    the patch 851cf6e7.

v1:
Inspired by Benjamin Herrenschmidt, this patch series try to reduce the
cpu/mmu feature checking overhead by using jump label. The following is
the difference of the run path of cpu_has_feature between before and after
applying these patches:

   before                             after
  addis   r10,r2,1                   b xxx
  addi    r9,r10,-2280               b xxx (This will also be omitted if the
  ld	  r9,0(r9)                          feature is not set)
  ld	  r9,16(r9)
  rldicl. r8,r9,55,63
  beq     c000000000037c94

This patch series passed the build test for almost all the defconfig of ppc.
There does have some broken for some configs. But they are not related to this
change. This also passed allyesconfig for x86. Boot test on p2020rdb and
p5020ds boards.

Kevin Hao (3):
  powerpc: move the cpu_has_feature to a separate file
  powerpc: use the jump label for cpu_has_feature
  powerpc: use jump label for mmu_has_feature

 arch/powerpc/include/asm/cacheflush.h   |  1 +
 arch/powerpc/include/asm/cpufeatures.h  | 41 +++++++++++++++++++++++++++++++
 arch/powerpc/include/asm/cputable.h     |  8 ------
 arch/powerpc/include/asm/cputime.h      |  1 +
 arch/powerpc/include/asm/dbell.h        |  1 +
 arch/powerpc/include/asm/dcr-native.h   |  1 +
 arch/powerpc/include/asm/mman.h         |  1 +
 arch/powerpc/include/asm/mmu.h          | 19 +++++++++++++++
 arch/powerpc/include/asm/time.h         |  1 +
 arch/powerpc/kernel/align.c             |  1 +
 arch/powerpc/kernel/cputable.c          | 43 +++++++++++++++++++++++++++++++++
 arch/powerpc/kernel/irq.c               |  1 +
 arch/powerpc/kernel/process.c           |  1 +
 arch/powerpc/kernel/setup-common.c      |  1 +
 arch/powerpc/kernel/setup_32.c          |  1 +
 arch/powerpc/kernel/smp.c               |  1 +
 arch/powerpc/oprofile/op_model_rs64.c   |  1 +
 arch/powerpc/platforms/cell/pervasive.c |  1 +
 arch/powerpc/xmon/ppc-dis.c             |  1 +
 19 files changed, 118 insertions(+), 8 deletions(-)
 create mode 100644 arch/powerpc/include/asm/cpufeatures.h

-- 
1.8.3.1

             reply	other threads:[~2013-09-02  5:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02  5:45 Kevin Hao [this message]
2013-09-02  5:45 ` [PATCH v2 1/3] powerpc: move the cpu_has_feature to a separate file Kevin Hao
2013-09-02  5:45 ` [PATCH v2 2/3] powerpc: use the jump label for cpu_has_feature Kevin Hao
2013-11-27  2:45   ` Benjamin Herrenschmidt
2013-12-25  5:58     ` Kevin Hao
2013-09-02  5:45 ` [PATCH v2 3/3] powerpc: use jump label for mmu_has_feature Kevin Hao

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=1378100726-32545-1-git-send-email-haokexin@gmail.com \
    --to=haokexin@gmail.com \
    --cc=benh@kernel.crashing.org \
    --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).