1. 03 8月, 2010 1 次提交
    • J
      arch/sparc/mm: Use GFP_KERNEL · 71cd03b0
      Julia Lawall 提交于
      GFP_ATOMIC is not needed here, as evidenced by the other two uses of
      GFP_KERNEL in the same function.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@ identifier f; @@
      
      *f(...,GFP_ATOMIC,...)
      ... when != spin_unlock(...)
          when != read_unlock(...)
          when != write_unlock(...)
          when != read_unlock_irq(...)
          when != write_unlock_irq(...)
          when != read_unlock_irqrestore(...)
          when != write_unlock_irqrestore(...)
          when != spin_unlock_irq(...)
          when != spin_unlock_irqrestore(...)
      *f(...,GFP_KERNEL,...)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71cd03b0
  2. 21 7月, 2010 3 次提交
    • D
      MAINTAINERS: Add trailing slash to SBUS path. · 7765b8bb
      David S. Miller 提交于
      Noticed by Joe Perches.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7765b8bb
    • A
      sbus: autoconvert trivial BKL users to private mutex · a3108ca2
      Arnd Bergmann 提交于
      All these files use the big kernel lock in a trivial
      way to serialize their private file operations,
      typically resulting from an earlier semi-automatic
      pushdown from VFS.
      
      None of these drivers appears to want to lock against
      other code, and they all use the BKL as the top-level
      lock in their file operations, meaning that there
      is no lock-order inversion problem.
      
      Consequently, we can remove the BKL completely,
      replacing it with a per-file mutex in every case.
      Using a scripted approach means we can avoid
      typos.
      
      file=$1
      name=$2
      if grep -q lock_kernel ${file} ; then
          if grep -q 'include.*linux.mutex.h' ${file} ; then
                  sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
          else
                  sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
          fi
          sed -i ${file} \
              -e "/^#include.*linux.mutex.h/,$ {
                      1,/^\(static\|int\|long\)/ {
                           /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);
      
      } }"  \
          -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
          -e '/[      ]*cycle_kernel_lock();/d'
      else
          sed -i -e '/include.*\<smp_lock.h\>/d' ${file}  \
                      -e '/cycle_kernel_lock()/d'
      fi
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3108ca2
    • M
      math-emu: correct test for downshifting fraction in _FP_FROM_INT() · f8324e20
      Mikael Pettersson 提交于
      The kernel's math-emu code contains a macro _FP_FROM_INT() which is
      used to convert an integer to a raw normalized floating-point value.
      It does this basically in three steps:
      
      1. Compute the exponent from the number of leading zero bits.
      2. Downshift large fractions to put the MSB in the right position
         for normalized fractions.
      3. Upshift small fractions to put the MSB in the right position.
      
      There is an boundary error in step 2, causing a fraction with its
      MSB exactly one bit above the normalized MSB position to not be
      downshifted.  This results in a non-normalized raw float, which when
      packed becomes a massively inaccurate representation for that input.
      
      The impact of this depends on a number of arch-specific factors,
      but it is known to have broken emulation of FXTOD instructions
      on UltraSPARC III, which was originally reported as GCC bug 44631
      <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44631>.
      
      Any arch which uses math-emu to emulate conversions from integers to
      same-size floats may be affected.
      
      The fix is simple: the exponent comparison used to determine if the
      fraction should be downshifted must be "<=" not "<".
      
      I'm sending a kernel module to test this as a reply to this message.
      There are also SPARC user-space test cases in the GCC bug entry.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8324e20
  3. 15 7月, 2010 1 次提交
  4. 13 7月, 2010 2 次提交
  5. 29 6月, 2010 1 次提交
  6. 27 6月, 2010 1 次提交
  7. 26 6月, 2010 1 次提交
  8. 24 6月, 2010 1 次提交
  9. 12 6月, 2010 27 次提交
  10. 11 6月, 2010 2 次提交