1. 09 2月, 2009 2 次提交
    • D
      sparc64: Fix probe_kernel_{read,write}(). · aeb39876
      David S. Miller 提交于
      This is based upon a report from Chris Torek and his initial patch.
      From Chris's report:
      
      --------------------
      This came up in testing kgdb, using the built-in tests -- turn
      on CONFIG_KGDB_TESTS, then
      
          echo V1 > /sys/module/kgdbts/parameters/kgdbts
      
      -- but it would affect using kgdb if you were debugging and looking
      at bad pointers.
      --------------------
      
      When we get a copy_{from,to}_user() request and the %asi is set to
      something other than ASI_AIUS (which is userspace) then we branch off
      to a routine called memcpy_user_stub().  It just does a straight
      memcpy since we are copying from kernel to kernel in this case.
      
      The logic was that since source and destination are both kernel
      pointers we don't need to have exception checks.
      
      But for what probe_kernel_{read,write}() is trying to do, we have to
      have the checks, otherwise things like kgdb bad kernel pointer
      accesses don't do the right thing.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aeb39876
    • D
      sparc64: Kill .fixup section bloat. · 40bdac7d
      David S. Miller 提交于
      This is an implementation of a suggestion made by Chris Torek:
      --------------------
      Something else I noticed in passing: the EX and EX_LD/EX_ST macros
      scattered throughout the various .S files make a fair bit of .fixup
      code, all of which does the same thing.  At the cost of one symbol
      in copy_in_user.S, you could just have one common two-instruction
      retl-and-mov-1 fixup that they all share.
      --------------------
      
      The following is with a defconfig build:
      
         text	   data	    bss	    dec	    hex	filename
      3972767	 344024	 584449	4901240	 4ac978	vmlinux.orig
      39688877	 344024	 584449	4897360	 4aba50	vmlinux
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      40bdac7d
  2. 05 12月, 2008 1 次提交
  3. 02 10月, 2007 1 次提交
    • D
      [SPARC64]: Fix missing load-twin usage in Niagara-1 memcpy. · 25e5566e
      David S. Miller 提交于
      For the case where the source is not aligned modulo 8
      we don't use load-twins to suck the data in and this
      kills performance since normal loads allocate in the
      L1 cache (unlike load-twin) and thus big memcpys swipe
      the entire L1 D-cache.
      
      We need to allocate a register window to implement this
      properly, but that actually simplifies a lot of things
      as a nice side-effect.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25e5566e
  4. 20 3月, 2006 1 次提交