1. 02 9月, 2009 1 次提交
  2. 31 8月, 2009 6 次提交
  3. 28 8月, 2009 18 次提交
  4. 27 8月, 2009 4 次提交
    • G
      powerpc/pseries: Reduce the polling interval in __cpu_up() · 67764263
      Gautham R Shenoy 提交于
      Time time taken for a single cpu online operation on a pseries machine
      is as follows:
      Dedicated LPAR (POWER6): ~220ms.
      Shared LPAR (POWER5)   : ~240ms.
      
      Of this time, approximately 200ms is taken up by __cpu_up(). This is because
      we poll every 200ms to check if the new cpu has notified it's presence
      through the cpu_callin_map. We repeat this operation until the new cpu sets
      the value in cpu_callin_map or 5 seconds elapse, whichever comes earlier.
      
      However, using completion_structs instead of polling loops,
      the time taken by the new processor to indicate it's presence has
      found to be less than 1ms on pseries. This method however may not
      work on all powerpc platforms due to the time-base synchronization code.
      
      Keeping this in mind, we could reduce msleep polling interval from
      200ms to 1ms while retaining the 5 second timeout.
      
      With this, the time taken for a cpu online operation changes as follows:
      Dedicated LPAR (POWER6): 20-25ms.
      Shared LPAR (POWER5)   : 60-80ms.
      
      In both these cases, it was found that the code polls through the loop
      only once indicating that 1ms is a reasonable value, atleast on pseries.
      
      The code needs testing on other powerpc platforms.
      Signed-off-by: NGautham R Shenoy <ego@in.ibm.com>
      Acked-by: NJoel Schopp <jschopp@austin.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      67764263
    • B
      powerpc: Remove SMP warning from PowerMac cpufreq · 6fdc31a2
      Bastian Blank 提交于
      On Thu, Aug 13, 2009 at 04:14:58PM +1000, Benjamin Herrenschmidt wrote:
      > On Tue, 2009-08-11 at 11:39 +0200, Bastian Blank wrote:
      > > This patch just disables this driver on SMP kernels, as it is obviously
      > > not supported.
      > Why not remove the #error instead ? :-) I don't think it's still
      > meaningful, especially since we use the timebase for delays nowadays
      > which doesn't depend on the CPU frequency...
      
      Your call. Take this one:
      
      The build of a PowerMac 32bit kernel currently fails with
      
      error: #warning "WARNING, CPUFREQ not recommended on SMP kernels"
      
      Thie patch removes the not longer applicable SMP warning from the
      PowerMac cpufreq code.
      Signed-off-by: NBastian Blank <waldi@debian.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6fdc31a2
    • J
      powerpc: Fix __flush_icache_range on 44x · 14d75752
      Josh Boyer 提交于
      The ptrace POKETEXT interface allows a process to modify the text pages of
      a child process being ptraced, usually to insert breakpoints via trap
      instructions.  The kernel eventually calls copy_to_user_page, which in turn
      calls __flush_icache_range to invalidate the icache lines for the child
      process.
      
      However, this function does not work on 44x due to the icache being virtually
      indexed.  This was noticed by a breakpoint being triggered after it had been
      cleared by ltrace on a 440EPx board.  The convenient solution is to do a
      flash invalidate of the icache in the __flush_icache_range function.
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      14d75752
    • B
      powerpc/mm: Cleanup handling of execute permission · ea3cc330
      Benjamin Herrenschmidt 提交于
      This is an attempt at cleaning up a bit the way we handle execute
      permission on powerpc. _PAGE_HWEXEC is gone, _PAGE_EXEC is now only
      defined by CPUs that can do something with it, and the myriad of
      #ifdef's in the I$/D$ coherency code is reduced to 2 cases that
      hopefully should cover everything.
      
      The logic on BookE is a little bit different than what it was though
      not by much. Since now, _PAGE_EXEC will be set by the generic code
      for executable pages, we need to filter out if they are unclean and
      recover it. However, I don't expect the code to be more bloated than
      it already was in that area due to that change.
      
      I could boast that this brings proper enforcing of per-page execute
      permissions to all BookE and 40x but in fact, we've had that now for
      some time as a side effect of my previous rework in that area (and
      I didn't even know it :-) We would only enable execute permission if
      the page was cache clean and we would only cache clean it if we took
      and exec fault. Since we now enforce that the later only work if
      VM_EXEC is part of the VMA flags, we de-fact already enforce per-page
      execute permissions... Unless I missed something
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ea3cc330
  5. 26 8月, 2009 2 次提交
    • M
      powerpc/qe_lib: Set gpio data before changing the direction to output · 1dcd8ffc
      Michael Barkowski 提交于
      This avoids having a short glitch if the desired initial value is not
      the same as what was previously in the data register.
      Signed-off-by: NMichael Barkowski <michaelbarkowski@ruggedcom.com>
      Acked-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      1dcd8ffc
    • D
      sparc64: Validate linear D-TLB misses. · d8ed1d43
      David S. Miller 提交于
      When page alloc debugging is not enabled, we essentially accept any
      virtual address for linear kernel TLB misses.  But with kgdb, kernel
      address probing, and other facilities we can try to access arbitrary
      crap.
      
      So, make sure the address we miss on will translate to physical memory
      that actually exists.
      
      In order to make this work we have to embed the valid address bitmap
      into the kernel image.  And in order to make that less expensive we
      make an adjustment, in that the max physical memory address is
      decreased to "1 << 41", even on the chips that support a 42-bit
      physical address space.  We can do this because bit 41 indicates
      "I/O space" and thus covers non-memory ranges.
      
      The result of this is that:
      
      1) kpte_linear_bitmap shrinks from 2K to 1K in size
      
      2) we need 64K more for the valid address bitmap
      
      We can't let the valid address bitmap be dynamically allocated
      once we start using it to validate TLB misses, otherwise we have
      crazy issues to deal with wrt. recursive TLB misses and such.
      
      If we're in a TLB miss it could be the deepest trap level that's legal
      inside of the cpu.  So if we TLB miss referencing the bitmap, the cpu
      will be out of trap levels and enter RED state.
      
      To guard against out-of-range accesses to the bitmap, we have to check
      to make sure no bits in the physical address above bit 40 are set.  We
      could export and use last_valid_pfn for this check, but that's just an
      unnecessary extra memory reference.
      
      On the plus side of all this, since we load all of these translations
      into the special 4MB mapping TSB, and we check the TSB first for TLB
      misses, there should be absolutely no real cost for these new checks
      in the TLB miss path.
      
      Reported-by: heyongli@gmail.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8ed1d43
  6. 25 8月, 2009 9 次提交