Skip to content
  1. Jan 09, 2006
    • David Woodhouse's avatar
      [PATCH] syscall entry/exit revamp · 401d1f02
      David Woodhouse authored
      
      
      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: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      401d1f02
    • Michael Ellerman's avatar
      [PATCH] powerpc: Merge kexec · 3d1229d6
      Michael Ellerman authored
      
      
      This patch merges, to some extent, the PPC32 and PPC64 kexec implementations.
      
      We adopt the PPC32 approach of having ppc_md callbacks for the kexec functions.
      The current PPC64 implementation becomes the "default" implementation for PPC64
      which platforms can select if they need no special treatment.
      
      I've added these default callbacks to pseries/maple/cell/powermac, this means
      iSeries no longer supports kexec - but it never worked anyway.
      
      I've renamed PPC32's machine_kexec_simple to default_machine_kexec, inline with
      PPC64. Judging by the comments it might be better named machine_kexec_non_of,
      or something, but at the moment it's the only implementation for PPC32 so it's
      the "default".
      
      Kexec requires machine_shutdown(), which is in machine_kexec.c on PPC32, but we
      already have in setup-common.c on powerpc. All this does is call
      ppc_md.nvram_sync, which only powermac implements, so instead make
      machine_shutdown a ppc_md member and have it call core99_nvram_sync directly
      on powermac.
      
      I've also stuck relocate_kernel.S into misc_32.S for powerpc.
      
      Built for ARCH=ppc, and 32 & 64 bit ARCH=powerpc, with KEXEC=y/n. Booted on
      P5 LPAR and successfully kexec'ed.
      
      Should apply on top of 493f25ef.
      
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      3d1229d6
    • Adrian Bunk's avatar
      [PATCH] PPC_PREP: remove unneeded exports · afcc2472
      Adrian Bunk authored
      
      
      This patch removes the EXPORT_SYMBOL'ed but completely unused variable
      ucSystemType and removes the unneeded EXPORT_SYMBOL(_prep_type).
      
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Acked-by: default avatarTom Rini <trini@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      afcc2472
  2. Jan 05, 2006
  3. Dec 20, 2005
  4. Dec 15, 2005
  5. Dec 12, 2005
  6. Dec 09, 2005
    • Olof Johansson's avatar
      [PATCH] powerpc: Set cache info defaults · dabcafd3
      Olof Johansson authored
      
      
      Cache info is setup by walking the device tree in initialize_cache_info().
      However, icache_flush_range might be called before that, in
      slb_initialize()->patch_slb_encoding, which modifies the load immediate
      instructions used with SLB fault code.
      
      Not only that, but depending on memory layout, we might take SLB faults
      during unflatten_device_tree. So that fault will load an SLB entry that
      might not contain the right LLP flags for the segment.
      
      Either we can walk the flattened device tree to setup cache info, or
      we can pick the known defaults that are known to work. Doing it in the
      flattened device tree is hairier since we need to know the machine type
      to know what property to look for, etc, etc.
      
      For now, it's just easier to go with the defaults. Worst thing that
      happens from it is that we might waste a few cycles doing too small
      dcbst/icbi increments.
      
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      dabcafd3
  7. Nov 30, 2005
  8. Nov 29, 2005
  9. Nov 28, 2005
    • Linus Torvalds's avatar
      mm: re-architect the VM_UNPAGED logic · 6aab341e
      Linus Torvalds authored
      
      
      This replaces the (in my opinion horrible) VM_UNMAPPED logic with very
      explicit support for a "remapped page range" aka VM_PFNMAP.  It allows a
      VM area to contain an arbitrary range of page table entries that the VM
      never touches, and never considers to be normal pages.
      
      Any user of "remap_pfn_range()" automatically gets this new
      functionality, and doesn't even have to mark the pages reserved or
      indeed mark them any other way.  It just works.  As a side effect, doing
      mmap() on /dev/mem works for arbitrary ranges.
      
      Sparc update from David in the next commit.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6aab341e
  10. Nov 24, 2005
    • Jim Keniston's avatar
      [PATCH] kprobes: Fix return probes on sys_execve · 8bf1101b
      Jim Keniston authored
      
      
      Fix a bug in kprobes that can cause an Oops or even a crash when a return
      probe is installed on one of the following functions: sys_execve,
      do_execve, load_*_binary, flush_old_exec, or flush_thread.  The fix is to
      remove the call to kprobe_flush_task() in flush_thread().  This fix has
      been tested on all architectures for which the return-probes feature has
      been implemented (i386, x86_64, ppc64, ia64).  Please apply.
      
      BACKGROUND
      
      Up to now, we have called kprobe_flush_task() under two situations: when a
      task exits, and when it execs.  Flushing kretprobe_instances on exit is
      correct because (a) do_exit() doesn't return, and (b) one or more
      return-probed functions may be active when a task calls do_exit().  Neither
      is the case for sys_execve() and its callees.
      
      Initially, the mistaken call to kprobe_flush_task() on exec was harmless
      because we put the "real" return address of each active probed function
      back in the stack, just to be safe, when we recycled its
      kretprobe_instance.  When support for ppc64 and ia64 was added, this safety
      measure couldn't be employed, and was eventually dropped even for i386 and
      x86_64.  sys_execve() and its callees were informally blacklisted for
      return probes until this fix was developed.
      
      Acked-by: default avatarPrasanna S Panchamukhi <prasanna@in.ibm.com>
      Signed-off-by: default avatarJim Keniston <jkenisto@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      8bf1101b
  11. Nov 22, 2005
    • Hugh Dickins's avatar
      [PATCH] unpaged: VM_UNPAGED · 0b14c179
      Hugh Dickins authored
      
      
      Although we tend to associate VM_RESERVED with remap_pfn_range, quite a few
      drivers set VM_RESERVED on areas which are then populated by nopage.  The
      PageReserved removal in 2.6.15-rc1 changed VM_RESERVED not to free pages in
      zap_pte_range, without changing those drivers not to set it: so their pages
      just leak away.
      
      Let's not change miscellaneous drivers now: introduce VM_UNPAGED at the core,
      to flag the special areas where the ptes may have no struct page, or if they
      have then it's not to be touched.  Replace most instances of VM_RESERVED in
      core mm by VM_UNPAGED.  Force it on in remap_pfn_range, and the sparc and
      sparc64 io_remap_pfn_range.
      
      Revert addition of VM_RESERVED to powerpc vdso, it's not needed there.  Is it
      needed anywhere?  It still governs the mm->reserved_vm statistic, and special
      vmas not to be merged, and areas not to be core dumped; but could probably be
      eliminated later (the drivers are probably specifying it because in 2.4 it
      kept swapout off the vma, but in 2.6 we work from the LRU, which these pages
      don't get on).
      
      Use the VM_SHM slot for VM_UNPAGED, and define VM_SHM to 0: it serves no
      purpose whatsoever, and should be removed from drivers when we clean up.
      
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Acked-by: default avatarWilliam Irwin <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0b14c179
  12. Nov 19, 2005
  13. Nov 18, 2005
  14. Nov 16, 2005
  15. Nov 15, 2005
  16. Nov 14, 2005
  17. Nov 12, 2005
    • Christoph Hellwig's avatar
      [SPARC]: Fix RTC compat ioctl kernel log spam. · 535f8d65
      Christoph Hellwig authored
      
      
      On Fri, Nov 11, 2005 at 12:58:40PM -0800, David S. Miller wrote:
      > 
      > This change:
      > 
      > diff-tree 8ca2bdc7 (from feee207e44d3643d19e648aAuthor: Christoph Hellwig <hch@lst.de>
      > Date:   Wed Nov 9 12:07:18 2005 -0800
      > 
      >     [SPARC] sbus rtc: implement ->compat_ioctl
      >     
      >     Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      >     Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      > 
      > results in the console now getting spewed on sparc64 systems
      > with messages like:
      > 
      > [   11.968298] ioctl32(hwclock:464): Unknown cmd fd(3) cmd(401c7014){00} arg(efc
      > What's happening is hwclock tries first the SBUS rtc device ioctls
      > then the normal rtc driver ones.
      > 
      > So things actually worked better when we had the SBUS rtc compat ioctl
      > directly handled via the generic compat ioctl code.
      > 
      > There are _so_ many rtc drivers in the kernel implementing the
      > generic rtc ioctls that I don't think putting a ->compat_ioctl
      > into all of them to fix this problem is feasible.  Unless we
      > write a single rtc_compat_ioctl(), export it to modules, and hook
      > it into all of those somehow.
      > 
      > But even that doesn't appear to have any pretty implementation.
      > 
      > Any better ideas?
      
      We had similar problems with other ioctls where userspace did things
      like that.  What we did there was to put the compat handler to generic
      code.  The patch below does that, adding a big comment about what's
      going on and removing the COMPAT_IOCTL entires for these on powerpc
      that not only weren't ever useful but are duplicated now aswell.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      535f8d65
  18. Nov 11, 2005
Loading