Skip to content

ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions

Stephen Boyd linux-arm-kernel linux-arm-msm linux-kbuild lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 24 repliesIn review
  2. v13 patches 55 repliesSuperseded

Changes in v2 from the cover letter

* Add suport for PJ4 udiv/sdiv mrc opcodes
* Create a new program for recording uidiv instead of modifying recordmcount

[1] http://lkml.kernel.org/r/1383951632-6090-1-git-send-email-sboyd at codeaurora.org

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2scripts: Add a recorduidiv programscripts/Makefile scripts/Makefile.build scripts/recorduidiv.c+761 -223 replies
2/2ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructionsarch/arm/Kconfig arch/arm/include/asm/cputype.h arch/arm/include/asm/setup.h +3 more+145 -110 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchSteven Rostedt
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions

This is a respin of a patch series from about a year ago[1]. I realized that we already had most of the code in recordmcount to figure out where we make calls to particular functions, so recording where we make calls to the integer division functions should be easy enough to add support for using the same design. Looking back on the thread it seems like Mans was thinking along the same lines, although it wasn't obvious to me back then or even over the last few days when I wrote this.

This series copies and reworks recordmcount to record the locations of the calls to the library integer division functions on ARM builds, and puts those locations into a table that we use to patch instructions at boot. The first patch adds the recorduidiv program, and the second patch implements the runtime patching for modules and kernel code. The module part hooks into the relocation patching code we already have.

The discussion surrounding adding ARMv7VE so that this patchset isn't as necessary is still on going, so I'm just sending out these patches for now. Assuming we can come to a conclusion on how to implement ARMv7VE I'll finish up those patches.

Comments/feedback appreciated.

Changes from v1:
* Add suport for PJ4 udiv/sdiv mrc opcodes
* Create a new program for recording uidiv instead of modifying recordmcount

[1] http://lkml.kernel.org/r/1383951632-6090-1-git-send-email-sboyd at codeaurora.org

Cc Nicolas Pitre <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc M?ns Rullg?rd <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Michal Marek <[email protected]>
Cc Russell King - ARM Linux <[email protected]>

Stephen Boyd (2):
scripts: Add a recorduidiv program
ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

 arch/arm/Kconfig               |  14 +
 arch/arm/include/asm/cputype.h |   8 +-
 arch/arm/include/asm/setup.h   |   3 +
 arch/arm/kernel/module.c       |  40 +++
 arch/arm/kernel/setup.c        |  68 ++++
 arch/arm/kernel/vmlinux.lds.S  |  13 +
 scripts/Makefile               |   1 +
 scripts/Makefile.build         |  17 +-
 scripts/recorduidiv.c          | 745 +++++++++++++++++++++++++++++++++++++++++
 9 files changed, 906 insertions(+), 3 deletions(-)
 create mode 100644 scripts/recorduidiv.c
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project