1. 21 12月, 2018 2 次提交
    • F
      powerpc: split compat syscall table out from native table · fbf508da
      Firoz Khan 提交于
      PowerPC uses a syscall table with native and compat calls
      interleaved, which is a slightly simpler way to define two
      matching tables.
      
      As we move to having the tables generated, that advantage
      is no longer important, but the interleaved table gets in
      the way of using the same scripts as on the other archit-
      ectures.
      
      Split out a new compat_sys_call_table symbol that contains
      all the compat calls, and leave the main table for the nat-
      ive calls, to more closely match the method we use every-
      where else.
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFiroz Khan <firoz.khan@linaro.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      fbf508da
    • F
      powerpc: move macro definition from asm/systbl.h · a11b763d
      Firoz Khan 提交于
      Move the macro definition for compat_sys_sigsuspend from
      asm/systbl.h to the file which it is getting included.
      
      One of the patch in this patch series is generating uapi
      header and syscall table files. In order to come up with
      a common implimentation across all architecture, we need
      to do this change.
      
      This change will simplify the implementation of system
      call table generation script and help to come up a common
      implementation across all architecture.
      Signed-off-by: NFiroz Khan <firoz.khan@linaro.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a11b763d
  2. 10 5月, 2018 2 次提交
    • M
      powerpc/syscalls: Add COMPAT_SPU_NEW() macro · 454d7ef8
      Michael Ellerman 提交于
      Currently the select system call is wired up with the SYSX_SPU()
      macro. The SYSX_SPU() is not handled by systbl_chk.c, which means the
      syscall number for select is not checked.
      
      That hides the fact that the syscall number for select is actually
      __NR__newselect not __NR_select.
      
      In a following patch we'd like to drop ppc32_select() which means
      select will become a regular COMPAT_SYS_SPU() syscall. But
      COMPAT_SYS_SPU() can't deal with the fact that the syscall number is
      actually __NR__newselect. We also can't just redefine __NR_select
      because that's still used for the old select call.
      
      So add a new COMPAT_NEW_SPU() that does the same thing as
      COMPAT_SYS_SPU() except it encodes that we're using the new number.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      454d7ef8
    • A
      powerpc/syscalls: switch rtas(2) to SYSCALL_DEFINE · 4c392e65
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      [mpe: Update sys_ni.c for s/ppc_rtas/sys_rtas/]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      4c392e65
  3. 31 8月, 2017 1 次提交
  4. 28 3月, 2015 1 次提交
    • M
      powerpc: Add a proper syscall for switching endianness · 529d235a
      Michael Ellerman 提交于
      We currently have a "special" syscall for switching endianness. This is
      syscall number 0x1ebe, which is handled explicitly in the 64-bit syscall
      exception entry.
      
      That has a few problems, firstly the syscall number is outside of the
      usual range, which confuses various tools. For example strace doesn't
      recognise the syscall at all.
      
      Secondly it's handled explicitly as a special case in the syscall
      exception entry, which is complicated enough without it.
      
      As a first step toward removing the special syscall, we need to add a
      regular syscall that implements the same functionality.
      
      The logic is simple, it simply toggles the MSR_LE bit in the userspace
      MSR. This is the same as the special syscall, with the caveat that the
      special syscall clobbers fewer registers.
      
      This version clobbers r9-r12, XER, CTR, and CR0-1,5-7.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      529d235a
  5. 28 7月, 2014 1 次提交
    • M
      powerpc: Use standard macros for sys_sigpending() & sys_old_getrlimit() · 2061f7be
      Michael Ellerman 提交于
      Currently we have sys_sigpending and sys_old_getrlimit defined to use
      COMPAT_SYS() in systbl.h, but then both are #defined to sys_ni_syscall
      in systbl.S.
      
      This seems to have been done when ppc and ppc64 were merged, in commit
      9994a338 "Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S".
      
      AFAICS there's no longer (or never was) any need for this, we can just
      use SYSX() for both and remove the #defines to sys_ni_syscall.
      
      The expansion before was:
      
        #define COMPAT_SYS(func)	.llong	.sys_##func,.compat_sys_##func
        #define sys_old_getrlimit sys_ni_syscall
        COMPAT_SYS(old_getrlimit)
        =>
        .llong	.sys_old_getrlimit,.compat_sys_old_getrlimit
        =>
        .llong	.sys_ni_syscall,.compat_sys_old_getrlimit
      
      After is:
      
        #define SYSX(f, f3264, f32)	.llong	.f,.f3264
        SYSX(sys_ni_syscall, compat_sys_old_getrlimit, sys_old_getrlimit)
        =>
        .llong	.sys_ni_syscall,.compat_sys_old_getrlimit
      
      ie. they are equivalent.
      
      Finally both COMPAT_SYS() and SYSX() evaluate to sys_ni_syscall in the
      Cell SPU code.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2061f7be
  6. 23 4月, 2014 2 次提交
  7. 11 10月, 2007 1 次提交
  8. 01 7月, 2006 1 次提交
  9. 21 6月, 2006 1 次提交
  10. 24 5月, 2006 1 次提交
  11. 28 4月, 2006 1 次提交
  12. 26 4月, 2006 1 次提交
    • J
      [PATCH] Add support for the sys_vmsplice syscall · 912d35f8
      Jens Axboe 提交于
      sys_splice() moves data to/from pipes with a file input/output. sys_vmsplice()
      moves data to a pipe, with the input being a user address range instead.
      
      This uses an approach suggested by Linus, where we can hold partial ranges
      inside the pages[] map. Hopefully this will be useful for network
      receive support as well.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      912d35f8
  13. 21 4月, 2006 1 次提交
  14. 11 4月, 2006 1 次提交
    • J
      [PATCH] splice: add support for sys_tee() · 70524490
      Jens Axboe 提交于
      Basically an in-kernel implementation of tee, which uses splice and the
      pipe buffers as an intelligent way to pass data around by reference.
      
      Where the user space tee consumes the input and produces a stdout and
      file output, this syscall merely duplicates the data inside a pipe to
      another pipe. No data is copied, the output just grabs a reference to the
      input pipe data.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      70524490
  15. 03 4月, 2006 1 次提交
  16. 01 4月, 2006 1 次提交
  17. 08 3月, 2006 1 次提交
    • P
      powerpc: Fix various syscall/signal/swapcontext bugs · 1bd79336
      Paul Mackerras 提交于
      A careful reading of the recent changes to the system call entry/exit
      paths revealed several problems, plus some things that could be
      simplified and improved:
      
      * 32-bit wasn't testing the _TIF_NOERROR bit in the syscall fast exit
        path, so it was only doing anything with it once it saw some other
        bit being set.  In other words, the noerror behaviour would apply to
        the next system call where we had to reschedule or deliver a signal,
        which is not necessarily the current system call.
      
      * 32-bit wasn't doing the call to ptrace_notify in the syscall exit
        path when the _TIF_SINGLESTEP bit was set.
      
      * _TIF_RESTOREALL was in both _TIF_USER_WORK_MASK and
        _TIF_PERSYSCALL_MASK, which is odd since _TIF_RESTOREALL is only set
        by system calls.  I took it out of _TIF_USER_WORK_MASK.
      
      * On 64-bit, _TIF_RESTOREALL wasn't causing the non-volatile registers
        to be restored (unless perhaps a signal was delivered or the syscall
        was traced or single-stepped).  Thus the non-volatile registers
        weren't restored on exit from a signal handler.  We probably got
        away with it mostly because signal handlers written in C wouldn't
        alter the non-volatile registers.
      
      * On 32-bit I simplified the code and made it more like 64-bit by
        making the syscall exit path jump to ret_from_except to handle
        preemption and signal delivery.
      
      * 32-bit was calling do_signal unnecessarily when _TIF_RESTOREALL was
        set - but I think because of that 32-bit was actually restoring the
        non-volatile registers on exit from a signal handler.
      
      * I changed the order of enabling interrupts and saving the
        non-volatile registers before calling do_syscall_trace_leave; now we
        enable interrupts first.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1bd79336
  18. 10 2月, 2006 2 次提交
  19. 19 1月, 2006 1 次提交
  20. 11 1月, 2006 1 次提交
  21. 10 1月, 2006 1 次提交
  22. 09 1月, 2006 3 次提交
    • A
      [PATCH] ppc64: fix time syscall · 002ec58e
      Anton Blanchard 提交于
      ppc64 has its own version of sys_time. It looks pretty scary, touching
      a whole bunch of variables without any locking or memory ordering.
      
      In fact, a recent bugreport has shown it can actually go backwards. Time
      to remove it and just use the generic sys_time, which is implemented on
      top of do_gettimeofday.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      002ec58e
    • A
      [PATCH] spufs: The SPU file system, base · 67207b96
      Arnd Bergmann 提交于
      This is the current version of the spu file system, used
      for driving SPEs on the Cell Broadband Engine.
      
      This release is almost identical to the version for the
      2.6.14 kernel posted earlier, which is available as part
      of the Cell BE Linux distribution from
      http://www.bsc.es/projects/deepcomputing/linuxoncell/.
      
      The first patch provides all the interfaces for running
      spu application, but does not have any support for
      debugging SPU tasks or for scheduling. Both these
      functionalities are added in the subsequent patches.
      
      See Documentation/filesystems/spufs.txt on how to use
      spufs.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      67207b96
    • D
      [PATCH] syscall entry/exit revamp · 401d1f02
      David Woodhouse 提交于
      This cleanup patch speeds up the null syscall path on ppc64 by about 3%,
      and brings the ppc32 and ppc64 code slightly closer together.
      
      The ppc64 code was checking current_thread_info()->flags twice in the
      syscall exit path; once for TIF_SYSCALL_T_OR_A before disabling
      interrupts, and then again for TIF_SIGPENDING|TIF_NEED_RESCHED etc after
      disabling interrupts. Now we do the same as ppc32 -- check the flags
      only once in the fast path, and re-enable interrupts if necessary in the
      ptrace case.
      
      The patch abolishes the 'syscall_noerror' member of struct thread_info
      and replaces it with a TIF_NOERROR bit in the flags, which is handled in
      the slow path. This shortens the syscall entry code, which no longer
      needs to clear syscall_noerror.
      
      The patch adds a TIF_SAVE_NVGPRS flag which causes the syscall exit slow
      path to save the non-volatile GPRs into a signal frame. This removes the
      need for the assembly wrappers around sys_sigsuspend(),
      sys_rt_sigsuspend(), et al which existed solely to save those registers
      in advance. It also means I don't have to add new wrappers for ppoll()
      and pselect(), which is what I was supposed to be doing when I got
      distracted into this...
      
      Finally, it unifies the ppc64 and ppc32 methods of handling syscall exit
      directly into a signal handler (as required by sigsuspend et al) by
      introducing a TIF_RESTOREALL flag which causes _all_ the registers to be
      reloaded from the pt_regs by taking the ret_from_exception path, instead
      of the normal syscall exit path which stomps on the callee-saved GPRs.
      
      It appears to pass an LTP test run on ppc64, and passes basic testing on
      ppc32 too. Brief tests of ptrace functionality with strace and gdb also
      appear OK. I wouldn't send it to Linus for 2.6.15 just yet though :)
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      401d1f02
  23. 18 10月, 2005 2 次提交
  24. 17 10月, 2005 1 次提交
  25. 10 10月, 2005 1 次提交