1. 03 10月, 2012 1 次提交
  2. 31 7月, 2012 1 次提交
  3. 27 7月, 2012 11 次提交
  4. 12 6月, 2012 1 次提交
  5. 02 6月, 2012 3 次提交
  6. 31 5月, 2012 1 次提交
  7. 30 5月, 2012 1 次提交
    • S
      sparc: fix sparc64 build due to leon.h inclusion · e49e6ff5
      Sam Ravnborg 提交于
      Stephen Rothwell <sfr@canb.auug.org.au> reported following error:
      In file included from arch/sparc/kernel/prom_common.c:26:0:
      arch/sparc/include/asm/leon.h:221:9: error: unknown type name 'irq_flow_handler_t'
      arch/sparc/include/asm/leon.h:224:10: error: unknown type name 'irq_flow_handler_t'
      
      Fix this by:
      1) Avoid including leon.h in prom_commen.h (not needed)
      2) Include irq.h in leon.h to avoid the missing symbol error
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e49e6ff5
  8. 28 5月, 2012 10 次提交
  9. 27 5月, 2012 2 次提交
    • D
      sparc: use the new generic strnlen_user() function · 2c66f623
      David Miller 提交于
      This throws away the sparc-specific functions in favor of the generic
      optimized version.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2c66f623
    • L
      word-at-a-time: make the interfaces truly generic · 36126f8f
      Linus Torvalds 提交于
      This changes the interfaces in <asm/word-at-a-time.h> to be a bit more
      complicated, but a lot more generic.
      
      In particular, it allows us to really do the operations efficiently on
      both little-endian and big-endian machines, pretty much regardless of
      machine details.  For example, if you can rely on a fast population
      count instruction on your architecture, this will allow you to make your
      optimized <asm/word-at-a-time.h> file with that.
      
      NOTE! The "generic" version in include/asm-generic/word-at-a-time.h is
      not truly generic, it actually only works on big-endian.  Why? Because
      on little-endian the generic algorithms are wasteful, since you can
      inevitably do better. The x86 implementation is an example of that.
      
      (The only truly non-generic part of the asm-generic implementation is
      the "find_zero()" function, and you could make a little-endian version
      of it.  And if the Kbuild infrastructure allowed us to pick a particular
      header file, that would be lovely)
      
      The <asm/word-at-a-time.h> functions are as follows:
      
       - WORD_AT_A_TIME_CONSTANTS: specific constants that the algorithm
         uses.
      
       - has_zero(): take a word, and determine if it has a zero byte in it.
         It gets the word, the pointer to the constant pool, and a pointer to
         an intermediate "data" field it can set.
      
         This is the "quick-and-dirty" zero tester: it's what is run inside
         the hot loops.
      
       - "prep_zero_mask()": take the word, the data that has_zero() produced,
         and the constant pool, and generate an *exact* mask of which byte had
         the first zero.  This is run directly *outside* the loop, and allows
         the "has_zero()" function to answer the "is there a zero byte"
         question without necessarily getting exactly *which* byte is the
         first one to contain a zero.
      
         If you do multiple byte lookups concurrently (eg "hash_name()", which
         looks for both NUL and '/' bytes), after you've done the prep_zero_mask()
         phase, the result of those can be or'ed together to get the "either
         or" case.
      
       - The result from "prep_zero_mask()" can then be fed into "find_zero()"
         (to find the byte offset of the first byte that was zero) or into
         "zero_bytemask()" (to find the bytemask of the bytes preceding the
         zero byte).
      
         The existence of zero_bytemask() is optional, and is not necessary
         for the normal string routines.  But dentry name hashing needs it, so
         if you enable DENTRY_WORD_AT_A_TIME you need to expose it.
      
      This changes the generic strncpy_from_user() function and the dentry
      hashing functions to use these modified word-at-a-time interfaces.  This
      gets us back to the optimized state of the x86 strncpy that we lost in
      the previous commit when moving over to the generic version.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      36126f8f
  10. 25 5月, 2012 2 次提交
  11. 23 5月, 2012 2 次提交
  12. 21 5月, 2012 1 次提交
    • S
      sparc32: use flushi when run-time patching in per_cpu_patch · 1edc1783
      Sam Ravnborg 提交于
      Davis S. Miller wrote:
      "
      The way we do that now is overkill.  We only needed to use the MMU
      cache ops when we had sun4c around because sun4c lacked support for
      the "flush" instruction.
      
      But all sun4m and later chips have it so we can use it
      unconditionally.
      
      So in the per_cpu_patch() code, get rid of the cache ops invocation,
      and instead execute a "flush %reg" after each of the instruction patch
      assignments, where %reg is set to the address of the instruction that
      was stored into.
      
      Perhaps take the flushi() definition from asm/cacheflush_64.h and
      place it into asm/cacheflush.h, then you can simply use that.
      "
      
      Implemented as per suggestion.
      Moved run-time patching before we call paging_init(),
      so helper methods in paging_init() may utilise run-time patching too.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1edc1783
  13. 20 5月, 2012 4 次提交