1. 14 Jan, 2006 6 commits
    • Nicolas Pitre's avatar
      [ARM] 3106/2: ARM EABI: some syscall adjustments · c155fc95
      Nicolas Pitre authored
      Patch from Nicolas Pitre
      
      Fix a few syscalls for EABI requirements. They were sys_pread64 and
      sys_pwrite64 where the last argument is now entirely pushed on stack,
      but since commit 567bd980 they don't
      require any fixup.  Remains only the stat64 structure. Non EABI kernels
      are unaffected.
      
      Signed-off-by: Nicolas Pitre
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      c155fc95
    • Nicolas Pitre's avatar
      [ARM] 3105/4: ARM EABI: new syscall entry convention · 3f2829a3
      Nicolas Pitre authored
      Patch from Nicolas Pitre
      
      For a while we wanted to change the way syscalls were called on ARM.
      Instead of encoding the syscall number in the swi instruction which
      requires reading back the instruction from memory to extract that number
      and polluting the data cache, it was decided that simply storing the
      syscall number into r7 would be more efficient. Since this represents
      an ABI change then making that change at the same time as EABI support
      is the right thing to do.
      
      It is now expected that EABI user space binaries put the syscall number
      into r7 and use "swi 0" to call the kernel. Syscall register argument
      are also expected to have "EABI arrangement" i.e. 64-bit arguments
      should be put in a pair of registers from an even register number.
      
      Example with long ftruncate64(unsigned int fd, loff_t length):
      
      	legacy ABI:
      	- put fd into r0
      	- put length into r1-r2
      	- use "swi #(0x900000 + 194)" to call the kernel
      
      	new ARM EABI:
      	- put fd into r0
      	- put length into r2-r3 (skipping over r1)
      	- put 194 into r7
      	- use "swi 0" to call the kernel
      
      Note that it is important to use 0 for the swi argument as backward
      compatibility with legacy ABI user space relies on this.
      The syscall macros in asm-arm/unistd.h were also updated to support
      both ABIs and implement the right call method automatically.
      Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      3f2829a3
    • Nicolas Pitre's avatar
      [ARM] 3104/1: ARM EABI: new helper function names · ba95e4e4
      Nicolas Pitre authored
      Patch from Nicolas Pitre
      
      The ARM EABI defines new names for GCC helper functions.
      Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ba95e4e4
    • Nicolas Pitre's avatar
      [ARM] 3103/1: ARM EABI: stack pointer must be 64-bit aligned (part 2) · 499b2ea1
      Nicolas Pitre authored
      Patch from Nicolas Pitre
      
      We must make sure that assembly code that modifies the stack pointer
      before calling a C function does it so it remains 64-bit aligned.
      Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      499b2ea1
    • Nicolas Pitre's avatar
      [ARM] 3102/1: ARM EABI: stack pointer must be 64-bit aligned after a CPU exception · 2dede2d8
      Nicolas Pitre authored
      Patch from Nicolas Pitre
      
      The ARM EABI says that the stack pointer has to be 64-bit aligned for
      reasons already mentioned in patch #3101 when calling C functions.
      
      We therefore must verify and adjust sp accordingly when taking an
      exception from kernel mode since sp might not necessarily be 64-bit
      aligned if the exception occurs in the middle of a kernel function.
      
      If the exception occurs while in user mode then no sp fixup is needed as
      long as sizeof(struct pt_regs) as well as any additional syscall data
      stack space remain multiples of 8.
      Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      2dede2d8
    • Nicolas Pitre's avatar
      [ARM] 3101/1: ARM EABI: slab memory must be 64-bit aligned · da2b1cd6
      Nicolas Pitre authored
      Patch from Nicolas Pitre
      
      Although ARM is still using 32-bit pointers, version 5 and later
      versions of the ARM architecture introduced the ldrd and strd
      instructions to move 64-bit data which must be 64-bit aligned in memory,
      and the EABI includes new constraints on structure data alignment to
      allow for the compiler to use those instructions. This means that any
      slab allocation must start on a 64-bit boundary which is not equivalent
      to BYTES_PER_WORD, especially on those architecture versions that
      implements the ldrd/strd instructions.
      
      Overriding the default alignment disables some slab debug features. If
      those debug features are really needed then the kernel will have to be
      compiled for version 4 of the ARM architecture.
      Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      da2b1cd6
  2. 13 Jan, 2006 8 commits
  3. 12 Jan, 2006 26 commits