linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/33] Build ppc64le kernel using ABIv2
@ 2014-03-25 11:44 Anton Blanchard
  2014-03-25 11:44 ` [PATCH 01/33] powerpc: No need to use dot symbols when branching to a function Anton Blanchard
                   ` (33 more replies)
  0 siblings, 34 replies; 42+ messages in thread
From: Anton Blanchard @ 2014-03-25 11:44 UTC (permalink / raw)
  To: benh, paulus, rusty, ulrich.weigand, amodra, mikey, mjw; +Cc: linuxppc-dev

The following patches allow the kernel to be built using ABIv2 on a
compatible LE toolchain. Module support thanks to Rusty. Thanks also
to Uli for his help with some of assembly issues we tripped up on.

There are two known outstanding issues:

- If a kernel module calls into an exported assembly function
  which in turns calls out to C, r2 is going to be wrong. One example
  is __copy_tofrom_user_power7.

  The reason is _GLOBAL() doesn't have a global entry point setup
  with the associated addis/addi used to create r2. I tried adding
  it and quickly realised that _GLOBAL is used places that will not
  tolerate the addi/addis (eg __start()).

- arch/powerpc/platforms/pseries/hvCall.S assumes we always have a
  parameter save area, which is incorrect for ABIv2. I tried to be
  intelligent and use the toc save area to store some information
  but that failed as soon as we started using modules. It would be
  nice to avoid a stack frame in the common (tracepoints disabled)
  case, but we may end up having to allocate one.

Anton
--

Anton Blanchard (21):
  powerpc: No need to use dot symbols when branching to a function
  powerpc: Remove superflous function descriptors in assembly only code
  powerpc: Don't use a function descriptor for system call table
  powerpc: Remove some unnecessary uses of _GLOBAL() and _STATIC()
  powerpc: Remove _INIT_GLOBAL(), _STATIC() and _INIT_STATIC()
  powerpc: Remove dot symbol usage in exception macros
  powerpc: Create DOTSYM to wrap dot symbol usage
  powerpc: Remove function descriptors and dot symbols on new ABI
  powerpc: ABIv2 function calls must place target address in r12
  powerpc: Ignore TOC relocations
  powerpc: Add ABIv2 support to ppc_function_entry
  powerpc: Use ppc_function_entry instead of open coding it
  powerpc: Fix branch patching code for ABIv2
  powerpc: Fix kernel thread creation on ABIv2
  powerpc: Fix ABIv2 issues with stack offsets in assembly code
  powerpc/tm: Use STK_PARAM
  powerpc/tm: Fix GOT save offset for ABIv2
  powerpc/tracing: TRACE_WITH_FRAME_BUFFER creates invalid stack frames
  powerpc: Fix SMP issues with ppc64le ABIv2
  powerpc: Fix ABIv2 issue with dereference_function_descriptor
  powerpc: Build little endian ppc64 kernel with ABIv2

Rusty Russell (11):
  powerpc: make module stub code endian independent
  powerpc: modules implement R_PPC64_TOCSAVE relocation.
  powerpc: EXPORT_SYMBOL(.TOC.)
  powerpc: module: handle MODVERSION for .TOC.
  powerpc: Fix up TOC. for modules.
  powerpc: Handle new ELFv2 module relocations
  powerpc: modules: comment about de-dotifying symbols when using the
    ELFv2 ABI.
  powerpc: modules: change r2 save/restore offset for ELFv2 ABI.
  powerpc: modules: use r12 for stub jump address.
  powerpc: modules: skip r2 setup for ELFv2
  powerpc: modules: implement stubs for ELFv2 ABI.

Ulrich Weigand (1):
  powerpc: Fix unsafe accesses to parameter area in ELFv2

 arch/powerpc/Makefile                          |   8 +-
 arch/powerpc/boot/util.S                       |   4 +-
 arch/powerpc/include/asm/code-patching.h       |  40 ++++-
 arch/powerpc/include/asm/context_tracking.h    |   4 +-
 arch/powerpc/include/asm/exception-64e.h       |   6 +-
 arch/powerpc/include/asm/exception-64s.h       |   2 +-
 arch/powerpc/include/asm/ftrace.h              |   2 +
 arch/powerpc/include/asm/irqflags.h            |   8 +-
 arch/powerpc/include/asm/linkage.h             |   2 +
 arch/powerpc/include/asm/module.h              |   1 +
 arch/powerpc/include/asm/ppc_asm.h             |  64 ++++----
 arch/powerpc/include/asm/sections.h            |   2 +
 arch/powerpc/include/asm/systbl.h              |   6 +-
 arch/powerpc/include/uapi/asm/elf.h            |  10 +-
 arch/powerpc/kernel/cpu_setup_fsl_booke.S      |  28 ++--
 arch/powerpc/kernel/entry_64.S                 | 110 ++++++-------
 arch/powerpc/kernel/exceptions-64e.S           | 140 ++++++++---------
 arch/powerpc/kernel/exceptions-64s.S           | 204 ++++++++++++-------------
 arch/powerpc/kernel/head_64.S                  | 117 +++++++-------
 arch/powerpc/kernel/idle_book3e.S              |   2 +-
 arch/powerpc/kernel/idle_power4.S              |   2 +-
 arch/powerpc/kernel/idle_power7.S              |   4 +-
 arch/powerpc/kernel/misc_64.S                  |  46 +++++-
 arch/powerpc/kernel/module_64.c                | 199 ++++++++++++++++++------
 arch/powerpc/kernel/process.c                  |  17 +--
 arch/powerpc/kernel/prom_init_check.sh         |   2 +-
 arch/powerpc/kernel/setup_64.c                 |   2 +-
 arch/powerpc/kernel/systbl.S                   |  18 ++-
 arch/powerpc/kernel/tm.S                       |  13 +-
 arch/powerpc/kvm/book3s_hv_interrupts.S        |   2 +-
 arch/powerpc/kvm/book3s_hv_rmhandlers.S        |  32 ++--
 arch/powerpc/lib/copypage_64.S                 |   2 +-
 arch/powerpc/lib/copypage_power7.S             |  12 +-
 arch/powerpc/lib/copyuser_power7.S             |  32 ++--
 arch/powerpc/lib/hweight_64.S                  |   8 +-
 arch/powerpc/lib/mem_64.S                      |   4 +-
 arch/powerpc/lib/memcpy_64.S                   |   8 +-
 arch/powerpc/lib/memcpy_power7.S               |  26 ++--
 arch/powerpc/mm/hash_low_64.S                  |  44 ++++--
 arch/powerpc/mm/hash_utils_64.c                |  36 ++---
 arch/powerpc/mm/slb.c                          |  12 +-
 arch/powerpc/mm/slb_low.S                      |  12 +-
 arch/powerpc/platforms/85xx/smp.c              |   3 +-
 arch/powerpc/platforms/cell/smp.c              |   5 +-
 arch/powerpc/platforms/pasemi/powersave.S      |   2 +-
 arch/powerpc/platforms/powernv/opal-takeover.S |   2 +
 arch/powerpc/platforms/powernv/opal-wrappers.S |   4 +-
 arch/powerpc/platforms/powernv/smp.c           |   5 +-
 arch/powerpc/platforms/pseries/hvCall.S        |   4 +-
 arch/powerpc/platforms/pseries/smp.c           |   5 +-
 arch/powerpc/platforms/wsp/scom_smp.c          |   3 +-
 51 files changed, 760 insertions(+), 566 deletions(-)

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2014-04-22 22:02 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-25 11:44 [PATCH 00/33] Build ppc64le kernel using ABIv2 Anton Blanchard
2014-03-25 11:44 ` [PATCH 01/33] powerpc: No need to use dot symbols when branching to a function Anton Blanchard
2014-03-25 11:44 ` [PATCH 02/33] powerpc: Remove superflous function descriptors in assembly only code Anton Blanchard
2014-03-25 11:44 ` [PATCH 03/33] powerpc: Don't use a function descriptor for system call table Anton Blanchard
2014-03-25 11:44 ` [PATCH 04/33] powerpc: Remove some unnecessary uses of _GLOBAL() and _STATIC() Anton Blanchard
2014-03-25 11:44 ` [PATCH 05/33] powerpc: Remove _INIT_GLOBAL(), _STATIC() and _INIT_STATIC() Anton Blanchard
2014-03-25 11:44 ` [PATCH 06/33] powerpc: Remove dot symbol usage in exception macros Anton Blanchard
2014-03-25 11:44 ` [PATCH 07/33] powerpc: Create DOTSYM to wrap dot symbol usage Anton Blanchard
2014-03-25 11:44 ` [PATCH 08/33] powerpc: Remove function descriptors and dot symbols on new ABI Anton Blanchard
2014-03-25 11:44 ` [PATCH 09/33] powerpc: ABIv2 function calls must place target address in r12 Anton Blanchard
2014-03-25 11:44 ` [PATCH 10/33] powerpc: Ignore TOC relocations Anton Blanchard
2014-03-26  9:36   ` Alan Modra
2014-04-22 22:02     ` Anton Blanchard
2014-03-25 11:44 ` [PATCH 11/33] powerpc: Add ABIv2 support to ppc_function_entry Anton Blanchard
2014-03-25 11:44 ` [PATCH 12/33] powerpc: Use ppc_function_entry instead of open coding it Anton Blanchard
2014-03-25 11:44 ` [PATCH 13/33] powerpc: Fix branch patching code for ABIv2 Anton Blanchard
2014-03-25 11:44 ` [PATCH 14/33] powerpc: Fix kernel thread creation on ABIv2 Anton Blanchard
2014-03-25 11:44 ` [PATCH 15/33] powerpc: Fix ABIv2 issues with stack offsets in assembly code Anton Blanchard
2014-03-26 10:04   ` Alan Modra
2014-03-26 10:06     ` Alan Modra
2014-04-01 13:54   ` Philippe Bergheaud
2014-03-25 11:44 ` [PATCH 16/33] powerpc: Fix unsafe accesses to parameter area in ELFv2 Anton Blanchard
2014-03-25 11:44 ` [PATCH 17/33] powerpc/tm: Use STK_PARAM Anton Blanchard
2014-03-25 11:44 ` [PATCH 18/33] powerpc/tm: Fix GOT save offset for ABIv2 Anton Blanchard
2014-03-25 11:44 ` [PATCH 19/33] powerpc/tracing: TRACE_WITH_FRAME_BUFFER creates invalid stack frames Anton Blanchard
2014-03-25 11:44 ` [PATCH 20/33] powerpc: Fix SMP issues with ppc64le ABIv2 Anton Blanchard
2014-03-25 11:44 ` [PATCH 21/33] powerpc: Fix ABIv2 issue with dereference_function_descriptor Anton Blanchard
2014-03-25 11:44 ` [PATCH 22/33] powerpc: make module stub code endian independent Anton Blanchard
2014-03-25 11:44 ` [PATCH 23/33] powerpc: modules implement R_PPC64_TOCSAVE relocation Anton Blanchard
2014-03-25 11:44 ` [PATCH 24/33] powerpc: EXPORT_SYMBOL(.TOC.) Anton Blanchard
2014-03-25 11:44 ` [PATCH 25/33] powerpc: module: handle MODVERSION for .TOC Anton Blanchard
2014-03-25 11:44 ` [PATCH 26/33] powerpc: Fix up TOC. for modules Anton Blanchard
2014-03-25 11:44 ` [PATCH 27/33] powerpc: Handle new ELFv2 module relocations Anton Blanchard
2014-03-26 10:28   ` Alan Modra
2014-03-25 11:44 ` [PATCH 28/33] powerpc: modules: comment about de-dotifying symbols when using the ELFv2 ABI Anton Blanchard
2014-03-25 11:44 ` [PATCH 29/33] powerpc: modules: change r2 save/restore offset for " Anton Blanchard
2014-03-25 11:44 ` [PATCH 30/33] powerpc: modules: use r12 for stub jump address Anton Blanchard
2014-03-25 11:44 ` [PATCH 31/33] powerpc: modules: skip r2 setup for ELFv2 Anton Blanchard
2014-03-25 11:44 ` [PATCH 32/33] powerpc: modules: implement stubs for ELFv2 ABI Anton Blanchard
2014-03-25 11:44 ` [PATCH 33/33] powerpc: Build little endian ppc64 kernel with ABIv2 Anton Blanchard
2014-03-25 13:18 ` [PATCH 00/33] Build ppc64le kernel using ABIv2 Ulrich Weigand
2014-03-26 11:20   ` Anton Blanchard

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).