1. 03 12月, 2008 2 次提交
  2. 04 8月, 2008 1 次提交
  3. 28 7月, 2008 1 次提交
  4. 26 7月, 2008 1 次提交
  5. 25 7月, 2008 1 次提交
  6. 15 7月, 2008 1 次提交
  7. 09 7月, 2008 1 次提交
  8. 03 7月, 2008 1 次提交
  9. 01 7月, 2008 3 次提交
  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. 24 4月, 2008 1 次提交
  12. 18 4月, 2008 1 次提交
  13. 28 3月, 2008 1 次提交
    • M
      [POWERPC] Fix missed hardware breakpoints across multiple threads · a2ceff5e
      Michael Ellerman 提交于
      There is a bug in the powerpc DABR (data access breakpoint) handling,
      which can result in us missing breakpoints if several threads are trying
      to break on the same address.
      
      The circumstances are that do_page_fault() calls do_dabr(), this clears
      the DABR (sets it to 0) and sets up the signal which will report to
      userspace that the DABR was hit. The do_signal() code will restore the DABR
      value on the way out to userspace.
      
      If we reschedule before calling do_signal(), __switch_to() will check the
      cached DABR value and compare it to the new thread's value, if they match
      we don't set the DABR in hardware.
      
      So if two threads have the same DABR value, and we schedule from one to
      the other after taking the interrupt for the first thread hitting the DABR,
      the second thread will run without the DABR set in hardware.
      
      The cleanest fix is to move the cache update into set_dabr(), that way we
      can't forget to do it.
      Reported-by: NJan Kratochvil <jan.kratochvil@redhat.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a2ceff5e
  14. 26 3月, 2008 1 次提交
  15. 20 3月, 2008 1 次提交
  16. 14 2月, 2008 1 次提交
  17. 06 12月, 2007 1 次提交
    • T
      [POWERPC] Fix hardware IRQ time accounting problem. · 81a3843f
      Tony Breeds 提交于
      The commit fa13a5a1 (sched: restore
      deterministic CPU accounting on powerpc), unconditionally calls
      update_process_tick() in system context.  In the deterministic
      accounting case this is the correct thing to do.  However, in the
      non-deterministic accounting case we need to not do this, since doing
      this results in the time accounted as hardware irq time being
      artificially elevated.
      
      Also this collapses 2 consecutive '#ifdef CONFIG_VIRT_CPU_ACCOUNTING'
      checks in time.h into one for neatness.
      Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      81a3843f
  18. 10 11月, 2007 1 次提交
    • P
      sched: restore deterministic CPU accounting on powerpc · fa13a5a1
      Paul Mackerras 提交于
      Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the
      deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been
      broken on powerpc, because we end up counting user time twice: once in
      timer_interrupt() and once in update_process_times().
      
      This fixes the problem by pulling the code in update_process_times
      that updates utime and stime into a separate function called
      account_process_tick.  If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
      there is a version of account_process_tick in kernel/timer.c that
      simply accounts a whole tick to either utime or stime as before.  If
      CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
      implement account_process_tick.
      
      This also lets us simplify the s390 code a bit; it means that the s390
      timer interrupt can now call update_process_times even when
      CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a
      suitable account_process_tick().
      
      account_process_tick() now takes the task_struct * as an argument.
      Tested both with and without CONFIG_VIRT_CPU_ACCOUNTING.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fa13a5a1
  19. 20 10月, 2007 1 次提交
  20. 17 10月, 2007 1 次提交
  21. 12 10月, 2007 1 次提交
    • P
      [POWERPC] Use 1TB segments · 1189be65
      Paul Mackerras 提交于
      This makes the kernel use 1TB segments for all kernel mappings and for
      user addresses of 1TB and above, on machines which support them
      (currently POWER5+, POWER6 and PA6T).
      
      We detect that the machine supports 1TB segments by looking at the
      ibm,processor-segment-sizes property in the device tree.
      
      We don't currently use 1TB segments for user addresses < 1T, since
      that would effectively prevent 32-bit processes from using huge pages
      unless we also had a way to revert to using 256MB segments.  That
      would be possible but would involve extra complications (such as
      keeping track of which segment size was used when HPTEs were inserted)
      and is not addressed here.
      
      Parts of this patch were originally written by Ben Herrenschmidt.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1189be65
  22. 03 10月, 2007 1 次提交
  23. 25 9月, 2007 1 次提交
  24. 14 9月, 2007 1 次提交
  25. 29 8月, 2007 1 次提交
    • K
      [POWERPC] Flush registers to proper task context · 0ee6c15e
      Kumar Gala 提交于
      When we flush register state for FP, Altivec, or SPE in flush_*_to_thread
      we need to respect the task_struct that the caller has passed to us.
      
      Most cases we are called with current, however sometimes (ptrace) we may
      be passed a different task_struct.
      
      This showed up when using gdbserver debugging a simple program that used
      floating point. When gdb tried to show the FP regs they all showed up as
      0, because the child's FP registers were never properly flushed to memory.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      0ee6c15e
  26. 26 7月, 2007 1 次提交
  27. 14 6月, 2007 1 次提交
  28. 09 5月, 2007 1 次提交
  29. 13 4月, 2007 1 次提交
    • B
      [POWERPC] Make tlb flush batch use lazy MMU mode · a741e679
      Benjamin Herrenschmidt 提交于
      The current tlb flush code on powerpc 64 bits has a subtle race since we
      lost the page table lock due to the possible faulting in of new PTEs
      after a previous one has been removed but before the corresponding hash
      entry has been evicted, which can leads to all sort of fatal problems.
      
      This patch reworks the batch code completely. It doesn't use the mmu_gather
      stuff anymore. Instead, we use the lazy mmu hooks that were added by the
      paravirt code. They have the nice property that the enter/leave lazy mmu
      mode pair is always fully contained by the PTE lock for a given range
      of PTEs. Thus we can guarantee that all batches are flushed on a given
      CPU before it drops that lock.
      
      We also generalize batching for any PTE update that require a flush.
      
      Batching is now enabled on a CPU by arch_enter_lazy_mmu_mode() and
      disabled by arch_leave_lazy_mmu_mode(). The code epects that this is
      always contained within a PTE lock section so no preemption can happen
      and no PTE insertion in that range from another CPU. When batching
      is enabled on a CPU, every PTE updates that need a hash flush will
      use the batch for that flush.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a741e679
  30. 26 3月, 2007 1 次提交
  31. 22 3月, 2007 1 次提交
  32. 16 3月, 2007 1 次提交
    • M
      [POWERPC] Fix atomicity of TIF update in flush_thread() · f144e7c7
      Mathieu Desnoyers 提交于
      Fix atomicity of TIF update in flush_thread() for powerpc
      
      Fixes it correctly with *_ti_thread_flag.
      
      Race :
      
      parent process executing :
      sys_ptrace()
       (lock_kernel())
       (ptrace_get_task_struct(pid))
       arch_ptrace()
         ptrace_detach()
           ptrace_disable(child);
             clear_singlestep(child);
               clear_tsk_thread_flag(child, TIF_SINGLESTEP);
               (which clears the TIF_SINGLESTEP flag atomically from a different
                process)
       (put_task_struct(child))
       (unlock_kernel())
      
      And at the same time, in the child process :
      sys_execve()
       do_execve()
         search_binary_handler()
           load_elf_binary()
             flush_old_exec()
               flush_thread()
                 doing a non-atomic thread flag update
      
      Applies on 2.6.20.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f144e7c7
  33. 08 3月, 2007 1 次提交
    • P
      [POWERPC] Harden validate_sp against stack corruption · bb72c481
      Paul Mackerras 提交于
      If something has overflowed or corrupted the stack and causes an oops,
      and we try to print a stack trace, that will call validate_sp, which
      can itself cause an oops if the cpu field of the thread_info struct at
      the bottom of the stack has been corrupted (if CONFIG_IRQSTACKS is
      set).  This makes debugging harder.
      
      To avoid the second oops, this adds a check to make sure that the cpu
      number is reasonable before using it to check whether the stack is on
      the softirq or hardirq stack.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      bb72c481
  34. 16 10月, 2006 1 次提交
  35. 02 10月, 2006 1 次提交
    • S
      [PATCH] namespaces: utsname: use init_utsname when appropriate · 96b644bd
      Serge E. Hallyn 提交于
      In some places, particularly drivers and __init code, the init utsns is the
      appropriate one to use.  This patch replaces those with a the init_utsname
      helper.
      
      Changes: Removed several uses of init_utsname().  Hope I picked all the
      	right ones in net/ipv4/ipconfig.c.  These are now changed to
      	utsname() (the per-process namespace utsname) in the previous
      	patch (2/7)
      
      [akpm@osdl.org: CIFS fix]
      Signed-off-by: NSerge E. Hallyn <serue@us.ibm.com>
      Cc: Kirill Korotaev <dev@openvz.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Herbert Poetzl <herbert@13thfloor.at>
      Cc: Andrey Savochkin <saw@sw.ru>
      Cc: Serge Hallyn <serue@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      96b644bd
  36. 01 7月, 2006 1 次提交
  37. 09 6月, 2006 1 次提交