1. 26 4月, 2007 4 次提交
  2. 25 4月, 2007 1 次提交
  3. 24 4月, 2007 1 次提交
    • B
      Taskstats fix the structure members alignment issue · 7e40f2ab
      Balbir Singh 提交于
      We broke the the alignment of members of taskstats to the 8 byte boundary
      with the CSA patches.  In the current kernel, the taskstats structure is
      not suitable for use by 32 bit applications in a 64 bit kernel.
      
      On x86_64
      
      Offsets of taskstats' members (64 bit kernel, 64 bit application)
      
      @taskstats'offsetof[@taskstats'indices] = (
              0,      # version
              4,      # ac_exitcode
              8,      # ac_flag
              9,      # ac_nice
              16,     # cpu_count
              24,     # cpu_delay_total
              32,     # blkio_count
              40,     # blkio_delay_total
              48,     # swapin_count
              56,     # swapin_delay_total
              64,     # cpu_run_real_total
              72,     # cpu_run_virtual_total
              80,     # ac_comm
              112,    # ac_sched
              113,    # ac_pad
              116,    # ac_uid
              120,    # ac_gid
              124,    # ac_pid
              128,    # ac_ppid
              132,    # ac_btime
              136,    # ac_etime
              144,    # ac_utime
              152,    # ac_stime
              160,    # ac_minflt
              168,    # ac_majflt
              176,    # coremem
              184,    # virtmem
              192,    # hiwater_rss
              200,    # hiwater_vm
              208,    # read_char
              216,    # write_char
              224,    # read_syscalls
              232,    # write_syscalls
              240,    # read_bytes
              248,    # write_bytes
              256,    # cancelled_write_bytes
          );
      
      Offsets of taskstats' members (64 bit kernel, 32 bit application)
      
      @taskstats'offsetof[@taskstats'indices] = (
              0,      # version
              4,      # ac_exitcode
              8,      # ac_flag
              9,      # ac_nice
              12,     # cpu_count
              20,     # cpu_delay_total
              28,     # blkio_count
              36,     # blkio_delay_total
              44,     # swapin_count
              52,     # swapin_delay_total
              60,     # cpu_run_real_total
              68,     # cpu_run_virtual_total
              76,     # ac_comm
              108,    # ac_sched
              109,    # ac_pad
              112,    # ac_uid
              116,    # ac_gid
              120,    # ac_pid
              124,    # ac_ppid
              128,    # ac_btime
              132,    # ac_etime
              140,    # ac_utime
              148,    # ac_stime
              156,    # ac_minflt
              164,    # ac_majflt
              172,    # coremem
              180,    # virtmem
              188,    # hiwater_rss
              196,    # hiwater_vm
              204,    # read_char
              212,    # write_char
              220,    # read_syscalls
              228,    # write_syscalls
              236,    # read_bytes
              244,    # write_bytes
              252,    # cancelled_write_bytes
          );
      
      This is one way to solve the problem without re-arranging structure members
      is to pack the structure.  The patch adds an __attribute__((aligned(8))) to
      the taskstats structure members so that 32 bit applications using taskstats
      can work with a 64 bit kernel.
      
      Using __attribute__((packed)) would break the 64 bit alignment of members.
      
      The fix was tested on x86_64. After the fix, we got
      
      Offsets of taskstats' members (64 bit kernel, 64 bit application)
      
      @taskstats'offsetof[@taskstats'indices] = (
              0,      # version
              4,      # ac_exitcode
              8,      # ac_flag
              9,      # ac_nice
              16,     # cpu_count
              24,     # cpu_delay_total
              32,     # blkio_count
              40,     # blkio_delay_total
              48,     # swapin_count
              56,     # swapin_delay_total
              64,     # cpu_run_real_total
              72,     # cpu_run_virtual_total
              80,     # ac_comm
              112,    # ac_sched
              113,    # ac_pad
              120,    # ac_uid
              124,    # ac_gid
              128,    # ac_pid
              132,    # ac_ppid
              136,    # ac_btime
              144,    # ac_etime
              152,    # ac_utime
              160,    # ac_stime
              168,    # ac_minflt
              176,    # ac_majflt
              184,    # coremem
              192,    # virtmem
              200,    # hiwater_rss
              208,    # hiwater_vm
              216,    # read_char
              224,    # write_char
              232,    # read_syscalls
              240,    # write_syscalls
              248,    # read_bytes
              256,    # write_bytes
              264,    # cancelled_write_bytes
          );
      
      Offsets of taskstats' members (64 bit kernel, 32 bit application)
      
      @taskstats'offsetof[@taskstats'indices] = (
              0,      # version
              4,      # ac_exitcode
              8,      # ac_flag
              9,      # ac_nice
              16,     # cpu_count
              24,     # cpu_delay_total
              32,     # blkio_count
              40,     # blkio_delay_total
              48,     # swapin_count
              56,     # swapin_delay_total
              64,     # cpu_run_real_total
              72,     # cpu_run_virtual_total
              80,     # ac_comm
              112,    # ac_sched
              113,    # ac_pad
              120,    # ac_uid
              124,    # ac_gid
              128,    # ac_pid
              132,    # ac_ppid
              136,    # ac_btime
              144,    # ac_etime
              152,    # ac_utime
              160,    # ac_stime
              168,    # ac_minflt
              176,    # ac_majflt
              184,    # coremem
              192,    # virtmem
              200,    # hiwater_rss
              208,    # hiwater_vm
              216,    # read_char
              224,    # write_char
              232,    # read_syscalls
              240,    # write_syscalls
              248,    # read_bytes
              256,    # write_bytes
              264,    # cancelled_write_bytes
          );
      Signed-off-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7e40f2ab
  4. 21 4月, 2007 1 次提交
  5. 18 4月, 2007 4 次提交
  6. 15 4月, 2007 1 次提交
  7. 11 4月, 2007 1 次提交
    • S
      ide: correctly prevent IDE timer expiry function to run if request was already handled · 23450319
      Suleiman Souhlal 提交于
      It is possible for the timer expiry function to run even though the
      request has already been handled: ide_timer_expiry() only checks that
      the handler is not NULL, but it is possible that we have handled a
      request (thus clearing the handler) and then started a new request
      (thus starting the timer again, and setting a handler). 
      
      A simple way to exhibit this is to set the DMA timeout to 1 jiffy and
      run dd: The kernel will panic after a few minutes because
      ide_timer_expiry() tries to add a timer when it's already active.
      
      To fix this, we simply add a request generation count that gets
      incremented at every interrupt, and check in ide_timer_expiry() that
      we have not already handled a new interrupt before running the expiry
      function.
      Signed-off-by: NSuleiman Souhlal <suleiman@google.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      23450319
  8. 08 4月, 2007 1 次提交
    • I
      [PATCH] high-res timers: resume fix · 995f054f
      Ingo Molnar 提交于
      Soeren Sonnenburg reported that upon resume he is getting
      this backtrace:
      
       [<c0119637>] smp_apic_timer_interrupt+0x57/0x90
       [<c0142d30>] retrigger_next_event+0x0/0xb0
       [<c0104d30>] apic_timer_interrupt+0x28/0x30
       [<c0142d30>] retrigger_next_event+0x0/0xb0
       [<c0140068>] __kfifo_put+0x8/0x90
       [<c0130fe5>] on_each_cpu+0x35/0x60
       [<c0143538>] clock_was_set+0x18/0x20
       [<c0135cdc>] timekeeping_resume+0x7c/0xa0
       [<c02aabe1>] __sysdev_resume+0x11/0x80
       [<c02ab0c7>] sysdev_resume+0x47/0x80
       [<c02b0b05>] device_power_up+0x5/0x10
      
      it turns out that on resume we mistakenly re-enable interrupts too
      early.  Do the timer retrigger only on the current CPU.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NSoeren Sonnenburg <kernel@nn7.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      995f054f
  9. 05 4月, 2007 2 次提交
  10. 04 4月, 2007 3 次提交
  11. 03 4月, 2007 2 次提交
  12. 30 3月, 2007 1 次提交
  13. 28 3月, 2007 4 次提交
  14. 27 3月, 2007 3 次提交
    • M
      Export __splice_from_pipe() · 40bee44e
      Mark Fasheh 提交于
      Ocfs2 wants to implement it's own splice write actor so that it can better
      manage cluster / page locks. This lets us re-use the rest of splice write
      while only providing our own code where it's actually important.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      40bee44e
    • R
      [PATCH] Add const to pointer qualifiers for __chk_user_ptr and __chk_io_ptr. · 04a39523
      Russ Cox 提交于
      Change prototypes for __chk_user_ptr and __chk_io_ptr to take const
      void* instead of void*, so that code can pass "const void *" to them.
      
      (Right now sparse does not warn about passing const void* to void*
      functions, but that is a separate bug that I believe Josh is working on,
      and once sparse does check this, the changed prototypes will be
      necessary.)
      Signed-off-by: NRuss Cox <rsc@swtch.com>
      Signed-off-by: NJosh Triplett <josh@freedesktop.org>
      Acked-by: NChristopher Li <sparse@chrisli.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      04a39523
    • S
      ide: use correct IDE error recovery · 513daadd
      Suleiman Souhlal 提交于
      IDE error recovery is using IDLE IMMEDIATE if the drive is busy or has DRQ set.
      This violates the ATA spec (can only send IDLE IMMEDIATE when drive is not
      busy) and really hoses up some drives (modern drives will not be able to
      recover using this error handling).  The correct thing to do is issue a SRST
      followed by a SET FEATURES command.  This is what Western Digital recommends
      for error recovery and what Western Digital says Windows does.  It also does
      not violate the ATA spec as far as I can tell.
      
      Bart:
      * port the patch over the current tree
      * undo the recalibration code removal
      * send SET FEATURES command after checking for good drive status
      * don't check whether the current request is of REQ_TYPE_ATA_{CMD,TASK}
        type because we need to send SET FEATURES before handling any requests
      * some pre-ATA4 drives require INITIALIZE DEVICE PARAMETERS command before
        other commands (except IDENTIFY) so send SET FEATURES only if there are
        no pending drive->special requests
      * update comments and patch description
      * any bugs introduced by this patch are mine and not Suleiman's :-)
      Signed-off-by: NSuleiman Souhlal <suleiman@google.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      513daadd
  15. 23 3月, 2007 2 次提交
  16. 19 3月, 2007 1 次提交
  17. 17 3月, 2007 5 次提交
  18. 16 3月, 2007 1 次提交
    • A
      [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390 · d9a9cdfb
      Alan Stern 提交于
      This patch (as868) adds a helper routine for device drivers that need
      to set up a callback to perform some action in a different process's
      context.  This is intended for use by attribute methods that want to
      unregister themselves or their parent device.  Attribute method calls
      are mutually exclusive with unregistration, so such actions cannot be
      taken directly.
      
      Two attribute methods are converted to use the new helper routine: one
      for SCSI device deletion and one for System/390 ccwgroup devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9a9cdfb
  19. 15 3月, 2007 1 次提交
  20. 13 3月, 2007 1 次提交