1. 02 7月, 2007 1 次提交
  2. 29 6月, 2007 2 次提交
  3. 27 6月, 2007 2 次提交
    • T
      libata: kill ATA_HORKAGE_DMA_RW_ONLY · 40a1d531
      Tejun Heo 提交于
      ATA_HORKAGE_DMA_RW_ONLY for TORiSAN is verified to be subset of using
      DMA for ATAPI commands which aren't aligned to 16 bytes.  As libata
      now doesn't use DMA for unaligned ATAPI commands, the horkage is
      redundant.  Kill it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      40a1d531
    • T
      libata: kill the infamous abnormal status message · 55f3952d
      Tejun Heo 提交于
      The infamous abnormal status message triggers on not so abnormal cases
      including empty port and even when it's being triggered on actual
      errors the info it provides is redundant and out of context - higher
      level functions will print the info in better safe later anyway.
      
      Also, by being triggered all the time, it leads people to think that
      the abnormality is somehow related to all ATA and system problems
      they're experiencing and gives owners of healthy systems unfounded
      doubts about the integrity of the universe.  Make it a DPRINTK and
      save the universe.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      55f3952d
  4. 24 6月, 2007 4 次提交
  5. 23 6月, 2007 1 次提交
  6. 22 6月, 2007 1 次提交
    • H
      page_mapping must avoid slub pages · b9bae340
      Hugh Dickins 提交于
      Nicolas Ferre reports oops from flush_dcache_page() on ARM when using
      SLUB: which reuses page->mapping as page->slab.  The page_mapping()
      function, used by ARM and PA-RISC flush_dcache_page() implementations,
      must not confuse SLUB pages with those which have page->mapping set.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Cc: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b9bae340
  7. 19 6月, 2007 2 次提交
    • T
      Revert "futex_requeue_pi optimization" · bd197234
      Thomas Gleixner 提交于
      This reverts commit d0aa7a70.
      
      It not only introduced user space visible changes to the futex syscall,
      it is also non-functional and there is no way to fix it proper before
      the 2.6.22 release.
      
      The breakage report ( http://lkml.org/lkml/2007/5/12/17 ) went
      unanswered, and unfortunately it turned out that the concept is not
      feasible at all.  It violates the rtmutex semantics badly by introducing
      a virtual owner, which hacks around the coupling of the user-space
      pi_futex and the kernel internal rt_mutex representation.
      
      At the moment the only safe option is to remove it fully as it contains
      user-space visible changes to broken kernel code, which we do not want
      to expose in the 2.6.22 release.
      
      The patch reverts the original patch mostly 1:1, but contains a couple
      of trivial manual cleanups which were necessary due to patches, which
      touched the same area of code later.
      
      Verified against the glibc tests and my own PI futex tests.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NUlrich Drepper <drepper@redhat.com>
      Cc: Pierre Peiffer <pierre.peiffer@bull.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bd197234
    • R
      IB/mlx4: Make sure inline data segments don't cross a 64 byte boundary · e61ef241
      Roland Dreier 提交于
      Inline data segments in send WQEs are not allowed to cross a 64 byte
      boundary.  We use inline data segments to hold the UD headers for MLX
      QPs (QP0 and QP1).  A send with GRH on QP1 will have a UD header that
      is too big to fit in a single inline data segment without crossing a
      64 byte boundary, so split the header into two inline data segments.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      e61ef241
  8. 18 6月, 2007 1 次提交
    • R
      IB/mlx4: Handle FW command interface rev 3 · 5ae2a7a8
      Roland Dreier 提交于
      Upcoming firmware introduces command interface revision 3, which
      changes the way port capabilities are queried and set.  Update the
      driver to handle both the new and old command interfaces by adding a
      new MLX4_FLAG_OLD_PORT_CMDS that it is set after querying the firmware
      interface revision and then using the correct interface based on the
      setting of the flag.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      5ae2a7a8
  9. 17 6月, 2007 3 次提交
    • E
      shm: fix the filename of hugetlb sysv shared memory · 9d66586f
      Eric W. Biederman 提交于
      Some user space tools need to identify SYSV shared memory when examining
      /proc/<pid>/maps.  To do so they look for a block device with major zero, a
      dentry named SYSV<sysv key>, and having the minor of the internal sysv
      shared memory kernel mount.
      
      To help these tools and to make it easier for people just browsing
      /proc/<pid>/maps this patch modifies hugetlb sysv shared memory to use the
      SYSV<key> dentry naming convention.
      
      User space tools will still have to be aware that hugetlb sysv shared
      memory lives on a different internal kernel mount and so has a different
      block device minor number from the rest of sysv shared memory.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Cc: "Serge E. Hallyn" <serge@hallyn.com>
      Cc: Albert Cahalan <acahalan@gmail.com>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9d66586f
    • C
      SLUB: minimum alignment fixes · 4b356be0
      Christoph Lameter 提交于
      If ARCH_KMALLOC_MINALIGN is set to a value greater than 8 (SLUBs smallest
      kmalloc cache) then SLUB may generate duplicate slabs in sysfs (yes again)
      because the object size is padded to reach ARCH_KMALLOC_MINALIGN.  Thus the
      size of the small slabs is all the same.
      
      No arch sets ARCH_KMALLOC_MINALIGN larger than 8 though except mips which
      for some reason wants a 128 byte alignment.
      
      This patch increases the size of the smallest cache if
      ARCH_KMALLOC_MINALIGN is greater than 8.  In that case more and more of the
      smallest caches are disabled.
      
      If we do that then the count of the active general caches that is displayed
      on boot is not correct anymore since we may skip elements of the kmalloc
      array.  So count them separately.
      
      This approach was tested by Havard yesterday.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4b356be0
    • D
      spi doc updates · f5a9c77d
      David Brownell 提交于
      Update two points in the SPI interface documentation:
      
      - Update description of the "chip stays selected after message ends"
        mode.  In some cases it's required for correctness; it isn't just a
        performance tweak.  (Yes: to use this mode on mult-device busses, another
        programming interface will be needed.  One draft has been circulated
        already.)
      
      - Clarify spi_setup(), highlighting that callers must ensure that no
        requests are queued (can't change configuration except between I/Os), and
        that the device must be deselected when this returns (which is a key part
        of why it's called during device init).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f5a9c77d
  10. 16 6月, 2007 1 次提交
  11. 10 6月, 2007 3 次提交
  12. 09 6月, 2007 4 次提交
    • R
      Protect <linux/console_struct.h> from multiple inclusion · 217397d7
      Robert P. J. Day 提交于
      Prevent <linux/console_struct.h> from being included more than once,
      otherwise you get a redefinition error if you happen to include
      <linux/vt_kern.h> first.
      Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      217397d7
    • R
      hexdump: more output formatting · c7909234
      Randy Dunlap 提交于
      Add a prefix string parameter.  Callers are responsible for any string
      length/alignment that they want to see in the output.  I.e., callers should
      pad strings to achieve alignment if they want that.
      
      Add rowsize parameter.  This is the number of raw data bytes to be printed
      per line.  Must be 16 or 32.
      
      Add a groupsize parameter.  This allows callers to dump values as 1-byte,
      2-byte, 4-byte, or 8-byte numbers.  Default is 1-byte numbers.  If the
      total length is not an even multiple of groupsize, 1-byte numbers are
      printed.
      
      Add an "ascii" output parameter.  This causes ASCII data output following
      the hex data output.
      
      Clean up some doc examples.
      
      Align the ASCII output on all lines that are produced by one call.
      
      Add a new interface, print_hex_dump_bytes(), that is a shortcut to
      print_hex_dump(), using default parameter values to print 16 bytes in
      byte-size chunks of hex + ASCII output, using printk level KERN_DEBUG.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c7909234
    • A
      pi-futex: fix exit races and locking problems · 778e9a9c
      Alexey Kuznetsov 提交于
      1. New entries can be added to tsk->pi_state_list after task completed
         exit_pi_state_list(). The result is memory leakage and deadlocks.
      
      2. handle_mm_fault() is called under spinlock. The result is obvious.
      
      3. results in self-inflicted deadlock inside glibc.
         Sometimes futex_lock_pi returns -ESRCH, when it is not expected
         and glibc enters to for(;;) sleep() to simulate deadlock. This problem
         is quite obvious and I think the patch is right. Though it looks like
         each "if" in futex_lock_pi() got some stupid special case "else if". :-)
      
      4. sometimes futex_lock_pi() returns -EDEADLK,
         when nobody has the lock. The reason is also obvious (see comment
         in the patch), but correct fix is far beyond my comprehension.
         I guess someone already saw this, the chunk:
      
                              if (rt_mutex_trylock(&q.pi_state->pi_mutex))
                                      ret = 0;
      
         is obviously from the same opera. But it does not work, because the
         rtmutex is really taken at this point: wake_futex_pi() of previous
         owner reassigned it to us. My fix works. But it looks very stupid.
         I would think about removal of shift of ownership in wake_futex_pi()
         and making all the work in context of process taking lock.
      
      From: Thomas Gleixner <tglx@linutronix.de>
      
      Fix 1) Avoid the tasklist lock variant of the exit race fix by adding
          an additional state transition to the exit code.
      
          This fixes also the issue, when a task with recursive segfaults
          is not able to release the futexes.
      
      Fix 2) Cleanup the lookup_pi_state() failure path and solve the -ESRCH
          problem finally.
      
      Fix 3) Solve the fixup_pi_state_owner() problem which needs to do the fixup
          in the lock protected section by using the in_atomic userspace access
          functions.
      
          This removes also the ugly lock drop / unqueue inside of fixup_pi_state()
      
      Fix 4) Fix a stale lock in the error path of futex_wake_pi()
      
      Added some error checks for verification.
      
      The -EDEADLK problem is solved by the rtmutex fixups.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Eric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      778e9a9c
    • C
      SLUB: return ZERO_SIZE_PTR for kmalloc(0) · 272c1d21
      Christoph Lameter 提交于
      Instead of returning the smallest available object return ZERO_SIZE_PTR.
      
      A ZERO_SIZE_PTR can be legitimately used as an object pointer as long as it
      is not deferenced.  The dereference of ZERO_SIZE_PTR causes a distinctive
      fault.  kfree can handle a ZERO_SIZE_PTR in the same way as NULL.
      
      This enables functions to use zero sized object. e.g. n = number of objects.
      
      	objects = kmalloc(n * sizeof(object));
      
      	for (i = 0; i < n; i++)
      		objects[i].x = y;
      
      	kfree(objects);
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Acked-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      272c1d21
  13. 08 6月, 2007 10 次提交
  14. 05 6月, 2007 1 次提交
    • T
      libata: always use polling SETXFER · 464cf177
      Tejun Heo 提交于
      Several people have reported LITE-ON LTR-48246S detection failed
      because SETXFER fails.  It seems the device raises IRQ too early after
      SETXFER.  This is controller independent.  The same problem has been
      reported for different controllers.
      
      So, now we have pata_via where the controller raises IRQ before it's
      ready after SETXFER and a device which does similar thing.  This patch
      makes libata always execute SETXFER via polling.  As this only happens
      during EH, performance impact is nil.  Setting ATA_TFLAG_POLLING is
      also moved from issue hot path to ata_dev_set_xfermode() - the only
      place where SETXFER can be issued.
      
      Note that ATA_TFLAG_POLLING applies only to drivers which implement
      SFF TF interface and use libata HSM.  More advanced controllers ignore
      the flag.  This doesn't matter for this fix as SFF TF controllers are
      the problematic ones.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      464cf177
  15. 01 6月, 2007 4 次提交