1. 28 7月, 2008 3 次提交
  2. 25 7月, 2008 1 次提交
  3. 26 6月, 2008 1 次提交
  4. 24 6月, 2008 1 次提交
  5. 03 6月, 2008 2 次提交
    • K
      [POWERPC] 40x/Book-E: Save/restore volatile exception registers · fca622c5
      Kumar Gala 提交于
      On machines with more than one exception level any system register that
      might be modified by the "normal" exception level needs to be saved and
      restored on taking a higher level exception.  We already are saving
      and restoring ESR and DEAR.
      
      For critical level add SRR0/1.
      For debug level add CSRR0/1 and SRR0/1.
      For machine check level add DSRR0/1, CSRR0/1, and SRR0/1.
      
      On FSL Book-E parts we always save/restore the MAS registers for critical,
      debug, and machine check level exceptions.  On 44x we always save/restore
      the MMUCR.
      
      Additionally, we save and restore the ksp_limit since we have to adjust it
      for each exception level.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      fca622c5
    • K
      [POWERPC] Rework EXC_LEVEL_EXCEPTION_PROLOG code · 369e757b
      Kumar Gala 提交于
      * Cleanup the code a bit my allocating an INT_FRAME on our exception
        stack there by make references go from GPR11-INT_FRAME_SIZE(r8) to
        just GPR11(r8)
      * simplify {lvl}_transfer_to_handler code by moving the copying of the
        temp registers we use if we come from user space into the PROLOG
      * If the exception came from kernel mode copy thread_info flags,
        preempt, and task pointer from the process thread_info.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      369e757b
  6. 27 5月, 2008 1 次提交
    • S
      ftrace: powerpc clean ups · ccbfac29
      Steven Rostedt 提交于
      This patch cleans up the ftrace code in PowerPC based on the comments from
      Michael Ellerman.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: proski@gnu.org
      Cc: a.p.zijlstra@chello.nl
      Cc: Pekka Paalanen <pq@iki.fi>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: linuxppc-dev@ozlabs.org
      Cc: Soeren Sandmann Pedersen <sandmann@redhat.com>
      Cc: paulus@samba.org
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ccbfac29
  7. 24 5月, 2008 1 次提交
  8. 16 5月, 2008 1 次提交
    • P
      [POWERPC] Defer processing of interrupts when the CPU wakes from sleep mode · a560643e
      Paul Mackerras 提交于
      This provides a way to defer processing of an interrupt that wakes the
      processor out of sleep mode.  On 32-bit platforms that use an
      interrupt to wake the processor, we have to have interrupts enabled in
      hardware at the point where we go to sleep, otherwise the processor
      will never wake up.  However, because interrupts are logically
      disabled at this point, we don't want to process the interrupt
      straight away.
      
      This is handled by setting the _TLF_SLEEPING flag.  When we get an
      interrupt and _TLF_SLEEPING is set, we firstly clear the MSR_EE
      (external interrupt enable) bit in the saved MSR value, and secondly
      we then return to the address in the link register, like we do for
      _TLF_NAPPING, but without actually handling the interrupt.
      
      Note that this is handled somewhat differently on powerbooks, so this
      new code will only be used on non-Apple machines.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a560643e
  9. 14 5月, 2008 1 次提交
  10. 29 4月, 2008 1 次提交
    • K
      [POWERPC] Add IRQSTACKS support on ppc32 · 85218827
      Kumar Gala 提交于
      This makes it possible to use separate stacks for hard and soft IRQs
      on 32-bit powerpc as well as on 64-bit.  The code for 32-bit is just
      the 32-bit analog of the 64-bit code.
      
      * Added allocation and initialization of the irq stacks.  We limit the
        stacks to be in lowmem for ppc32.
      * Implemented ppc32 versions of call_do_softirq() and call_handle_irq()
        to switch the stack pointers
      * Reworked how we do stack overflow detection.  We now keep around the
        limit of the stack in the thread_struct and compare against the limit
        to see if we've overflowed.  We can now use this on ppc64 if desired.
      
      [ paulus@samba.org: Fixed bug on 6xx where we need to reload r9 with the
        thread_info pointer. ]
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      85218827
  11. 17 4月, 2008 1 次提交
    • K
      [POWERPC] Make Book-E debug handling SMP safe · 4eaddb4d
      Kumar Gala 提交于
      global_dbcr0 needs to be a per cpu set of save areas instead of a single
      global on all processors.
      
      Also, we switch to using DBCR0_IDM to determine if the user space app is
      being debugged as its a more consistent way.  In the future we should
      support features like hardware breakpoint and watchpoints which will
      have DBCR0_IDM set but not necessarily DBCR0_IC (single step).
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      4eaddb4d
  12. 13 11月, 2007 1 次提交
    • B
      [POWERPC] Avoid unpaired stwcx. on some processors · b64f87c1
      Becky Bruce 提交于
      The context switch code in the kernel issues a dummy stwcx. to clear the
      reservation, as recommended by the architecture.  However, some processors
      can have issues if this stwcx to address A occurs while the reservation
      is already held to a different address B.  To avoid this problem, the dummy
      stwcx. needs to be paired with a dummy lwarx to the same address.
      
      This adds the dummy lwarx, and creates a cpu feature bit to indicate
      which cpus are affected.  Tested on mpc8641_hpcn_defconfig in
      arch/powerpc; build tested in arch/ppc.
      Signed-off-by: NBecky Bruce <becky.bruce@freescale.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b64f87c1
  13. 01 11月, 2007 1 次提交
    • B
      [POWERPC] 4xx: Deal with 44x virtually tagged icache · b98ac05d
      Benjamin Herrenschmidt 提交于
      The 44x family has an interesting "feature" which is a virtually
      tagged instruction cache (yuck !). So far, we haven't dealt with
      it properly, which means we've been mostly lucky or people didn't
      report the problems, unless people have been running custom patches
      in their distro...
      
      This is an attempt at fixing it properly. I chose to do it by
      setting a global flag whenever we change a PTE that was previously
      marked executable, and flush the entire instruction cache upon
      return to user space when that happens.
      
      This is a bit heavy handed, but it's hard to do more fine grained
      flushes as the icbi instruction, on those processor, for some very
      strange reasons (since the cache is virtually mapped) still requires
      a valid TLB entry for reading in the target address space, which
      isn't something I want to deal with.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      b98ac05d
  14. 14 9月, 2007 1 次提交
  15. 17 5月, 2007 1 次提交
    • K
      [POWERPC] Fix COMMON symbol warnings · 991eb43a
      Kumar Gala 提交于
      We get the following warnings in various ARCH=powerpc builds:
      
      WARNING: "ee_restarts" [arch/powerpc/kernel/built-in] is COMMON symbol
      WARNING: "fee_restarts" [arch/powerpc/kernel/built-in] is COMMON symbol
      WARNING: "htab_hash_searches" [arch/powerpc/mm/built-in] is COMMON symbol
      WARNING: "next_slot" [arch/powerpc/mm/built-in] is COMMON symbol
      WARNING: "mmu_hash_lock" [arch/powerpc/mm/built-in] is COMMON symbol
      WARNING: "primary_pteg_full" [arch/powerpc/mm/built-in] is COMMON symbol
      WARNING: "global_dbcr0" [arch/powerpc/kernel/built-in] is COMMON symbol
      
      Switch to moving local symbols (except mmu_hash_lock which is global) and
      space directive instead.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      991eb43a
  16. 22 3月, 2007 1 次提交
  17. 01 7月, 2006 1 次提交
  18. 18 4月, 2006 1 次提交
    • P
      powerpc: Use correct sequence for putting CPU into nap mode · f39224a8
      Paul Mackerras 提交于
      We weren't using the recommended sequence for putting the CPU into
      nap mode.  When I changed the idle loop, for some reason 7447A cpus
      started hanging when we put them into nap mode.  Changing to the
      recommended sequence fixes that.
      
      The complexity here is that the recommended sequence is a loop that
      keeps putting the cpu back into nap mode.  Clearly we need some way
      to break out of the loop when an interrupt (external interrupt,
      decrementer, performance monitor) occurs.  Here we use a bit in
      the thread_info struct to indicate that we need this, and the exception
      entry code notices this and arranges for the exception to return
      to the value in the link register, thus breaking out of the loop.
      We use a new `local_flags' field in the thread_info which we can
      alter without needing to use an atomic update sequence.
      
      The PPC970 has the same recommended sequence, so we do the same thing
      there too.
      
      This also fixes a bug in the kernel stack overflow handling code on
      32-bit, since it was causing a value that we needed in a register to
      get trashed.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f39224a8
  19. 27 3月, 2006 1 次提交
    • P
      powerpc: Unify the 32 and 64 bit idle loops · a0652fc9
      Paul Mackerras 提交于
      This unifies the 32-bit (ARCH=ppc and ARCH=powerpc) and 64-bit idle
      loops.  It brings over the concept of having a ppc_md.power_save
      function from 32-bit to ARCH=powerpc, which lets us get rid of
      native_idle().  With this we will also be able to simplify the idle
      handling for pSeries and cell.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a0652fc9
  20. 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
  21. 19 1月, 2006 1 次提交
  22. 13 1月, 2006 1 次提交
    • D
      [PATCH] powerpc: Cleanup LOADADDR etc. asm macros · e58c3495
      David Gibson 提交于
      This patch consolidates the variety of macros used for loading 32 or
      64-bit constants in assembler (LOADADDR, LOADBASE, SET_REG_TO_*).  The
      idea is to make the set of macros consistent across 32 and 64 bit and
      to make it more obvious which is the appropriate one to use in a given
      situation.  The new macros and their semantics are described in the
      comments in ppc_asm.h.
      
      In the process, we change several places that were unnecessarily using
      immediate loads on ppc64 to use the GOT/TOC.  Likewise we cleanup a
      couple of places where we were clumsily subtracting PAGE_OFFSET with
      asm instructions to use assemble-time arithmetic or the toreal() macro
      instead.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e58c3495
  23. 09 1月, 2006 2 次提交
    • D
      [PATCH] Fix code that saves NVGPRS in 32-bit signal frame · 623703f6
      David Woodhouse 提交于
      On Thu, 2005-11-24 at 12:51 +0000, David Woodhouse wrote:
      > Somehow this one slipped through the cracks; when we ended up in
      > do_signal() on a 32-bit kernel but without having the caller-saved
      > registers into the regs, we didn't set the TIF_SAVE_NVGPRS flag to
      > ensure they got saved later.
      
      Oh, and if we actually set the flag, then we fairly quickly find out
      that I was a bit overzealous in copying code from entry_64.S ... :)
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      623703f6
    • 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
  24. 28 10月, 2005 1 次提交
  25. 26 10月, 2005 1 次提交
    • P
      powerpc: Merge rtas.c into arch/powerpc/kernel · 033ef338
      Paul Mackerras 提交于
      This splits arch/ppc64/kernel/rtas.c into arch/powerpc/kernel/rtas.c,
      which contains generic RTAS functions useful on any CHRP platform,
      and arch/powerpc/platforms/pseries/rtas-fw.[ch], which contain
      some pSeries-specific firmware flashing bits.  The parts of rtas.c
      that are to do with pSeries-specific error logging are protected
      by a new CONFIG_RTAS_ERROR_LOGGING symbol.  The inclusion of rtas.o
      is controlled by the CONFIG_PPC_RTAS symbol, and the relevant
      platforms select that.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      033ef338
  26. 21 10月, 2005 1 次提交
    • D
      [PATCH] powerpc: Merge thread_info.h · 6cb7bfeb
      David Gibson 提交于
      Merge ppc32 and ppc64 versions of thread_info.h.  They were pretty
      similar already, the chief changes are:
      
      	- Instead of inline asm to implement current_thread_info(),
      which needs to be different for ppc32 and ppc64, we use C with an
      asm("r1") register variable.  gcc turns it into the same asm as we
      used to have for both platforms.
      	- We replace ppc32's 'local_flags' with the ppc64
      'syscall_noerror' field.  The noerror flag was in fact the only thing
      in the local_flags field anyway, so the ppc64 approach is simpler, and
      means we only need a load-immediate/store instead of load/mask/store
      when clearing the flag.
      	- In readiness for 64k pages, when THREAD_SIZE will be less
      than a page, ppc64 used kmalloc() rather than get_free_pages() to
      allocate the kernel stack.  With this patch we do the same for ppc32,
      since there's no strong reason not to.
      	- For ppc64, we no longer export THREAD_SHIFT and THREAD_SIZE
      via asm-offsets, thread_info.h can now be safely included in asm, as
      on ppc32.
      
      Built and booted on G4 Powerbook (ARCH=ppc and ARCH=powerpc) and
      Power5 (ARCH=ppc64 and ARCH=powerpc).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6cb7bfeb
  27. 20 10月, 2005 1 次提交
  28. 10 10月, 2005 1 次提交
  29. 10 9月, 2005 1 次提交
  30. 02 8月, 2005 1 次提交
  31. 26 6月, 2005 1 次提交
  32. 22 6月, 2005 1 次提交
  33. 08 5月, 2005 1 次提交
  34. 01 5月, 2005 1 次提交
  35. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4