1. 31 1月, 2011 4 次提交
    • N
      md: don't abort checking spares as soon as one cannot be added. · 50da0840
      NeilBrown 提交于
      As spares can be added manually before a reshape starts, we need to
      find them all to mark some of them as in_sync.
      
      Previously we would abort looking for spares when we found an
      unallocated spare what could not be added to the array (implying there
      was no room for new spares).  However already-added spares could be
      later in the list, so we need to keep searching.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      50da0840
    • N
      md: fix the test for finding spares in raid5_start_reshape. · 469518a3
      NeilBrown 提交于
      As spares can be added to the array before the reshape is started,
      we need to find and count them when checking there are enough.
      The array could have been degraded, so we need to check all devices,
      no just those out side of the range of devices in the array before
      the reshape.
      
      So instead of checking the index, check the In_sync flag as that
      reliably tells if the device is a spare or this purpose.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      469518a3
    • N
      md: simplify some 'if' conditionals in raid5_start_reshape. · 87a8dec9
      NeilBrown 提交于
      There are two consecutive 'if' statements.
      
       if (mddev->delta_disks >= 0)
            ....
       if (mddev->delta_disks > 0)
      
      The code in the second is equally valid if delta_disks == 0, and these
      two statements are the only place that 'added_devices' is used.
      
      So make them a single if statement, make added_devices a local
      variable, and re-indent it all.
      
      No functional change.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      87a8dec9
    • N
      md: revert change to raid_disks on failure. · de171cb9
      NeilBrown 提交于
      If we try to update_raid_disks and it fails, we should put
      'delta_disks' back to zero.  This is important because some code,
      such as slot_store, assumes that delta_disks has been validated.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      de171cb9
  2. 28 1月, 2011 16 次提交
  3. 27 1月, 2011 11 次提交
  4. 26 1月, 2011 9 次提交
    • H
      avr32: add missing include causing undefined pgtable_page_* references · 6cb8e872
      Hans-Christian Egtvedt 提交于
      This patch adds the linux/mm.h header file to the AVR32 arch pgalloc.c
      implementation to fix the undefined reference to pgtable_page_ctor() and
      pgtable_page_dtor().
      Signed-off-by: NHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
      6cb8e872
    • P
      sched: Use rq->clock_task instead of rq->clock for correctly maintaining load averages · 05ca62c6
      Paul Turner 提交于
      The delta in clock_task is a more fair attribution of how much time a tg has
      been contributing load to the current cpu.
      
      While not really important it also means we're more in sync (by magnitude)
      with respect to periodic updates (since __update_curr deltas are clock_task
      based).
      Signed-off-by: NPaul Turner <pjt@google.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20110122044852.007092349@google.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      05ca62c6
    • P
      sched: Fix/remove redundant cfs_rq checks · b815f196
      Paul Turner 提交于
      Since updates are against an entity's queuing cfs_rq it's not possible to
      enter update_cfs_{shares,load} with a NULL cfs_rq.  (Indeed, update_cfs_load
      would crash prior to the check if we did anyway since we load is examined
      during the initializers).
      
      Also, in the update_cfs_load case there's no point
      in maintaining averages for rq->cfs_rq since we don't perform shares
      distribution at that level -- NULL check is replaced accordingly.
      
      Thanks to Dan Carpenter for pointing out the deference before NULL check.
      Signed-off-by: NPaul Turner <pjt@google.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20110122044851.825284940@google.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b815f196
    • P
      sched: Fix sign under-flows in wake_affine · e37b6a7b
      Paul Turner 提交于
      While care is taken around the zero-point in effective_load to not exceed
      the instantaneous rq->weight, it's still possible (e.g. using wake_idx != 0)
      for (load + effective_load) to underflow.
      
      In this case the comparing the unsigned values can result in incorrect balanced
      decisions.
      Signed-off-by: NPaul Turner <pjt@google.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20110122044851.734245014@google.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e37b6a7b
    • D
      Merge branch 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes · 52bb4a73
      Dave Airlie 提交于
      * 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6:
        drm/nvc0/grctx: correct an off-by-one
        drm/nv50: Fix race with PFIFO during PGRAPH context destruction.
        drm/nouveau: Workaround incorrect DCB entry on a GeForce3 Ti 200.
        drm/nvc0: implement irq handler for whatever's at 0x14xxxx
        drm/nvc0: fix incorrect TPC register setup
        drm/nouveau: probe for adt7473 before f75375
        drm/nouveau: remove dead function definition
      52bb4a73
    • E
      percpu, x86: Fix percpu_xchg_op() · 889a7a6a
      Eric Dumazet 提交于
      These recent percpu commits:
      
        2485b646: x86,percpu: Move out of place 64 bit ops into X86_64 section
        8270137a: cpuops: Use cmpxchg for xchg to avoid lock semantics
      
      Caused this 'perf top' crash:
      
       Kernel panic - not syncing: Fatal exception in interrupt
       Pid: 0, comm: swapper Tainted: G     D
       2.6.38-rc2-00181-gef71723 #413 Call Trace: <IRQ> [<ffffffff810465b5>]
          ? panic
          ? kmsg_dump
          ? kmsg_dump
          ? oops_end
          ? no_context
          ? __bad_area_nosemaphore
          ? perf_output_begin
          ? bad_area_nosemaphore
          ? do_page_fault
          ? __task_pid_nr_ns
          ? perf_event_tid
          ? __perf_event_header__init_id
          ? validate_chain
          ? perf_output_sample
          ? trace_hardirqs_off
          ? page_fault
          ? irq_work_run
          ? update_process_times
          ? tick_sched_timer
          ? tick_sched_timer
          ? __run_hrtimer
          ? hrtimer_interrupt
          ? account_system_vtime
          ? smp_apic_timer_interrupt
          ? apic_timer_interrupt
       ...
      
      Looking at assembly code, I found:
      
      list = this_cpu_xchg(irq_work_list, NULL);
      
      gives this wrong code : (gcc-4.1.2 cross compiler)
      
      ffffffff810bc45e:
      	mov    %gs:0xead0,%rax
      	cmpxchg %rax,%gs:0xead0
      	jne    ffffffff810bc45e <irq_work_run+0x3e>
      	test   %rax,%rax
      	je     ffffffff810bc4aa <irq_work_run+0x8a>
      
      Tell gcc we dirty eax/rax register in percpu_xchg_op()
      
      Compiler must use another register to store pxo_new__
      
      We also dont need to reload percpu value after a jump,
      since a 'failed' cmpxchg already updated eax/rax
      
      Wrong generated code was :
      	xor     %rax,%rax   /* load 0 into %rax */
      1:	mov     %gs:0xead0,%rax
      	cmpxchg %rax,%gs:0xead0
      	jne     1b
      	test    %rax,%rax
      
      After patch :
      
      	xor     %rdx,%rdx   /* load 0 into %rdx */
      	mov     %gs:0xead0,%rax
      1:	cmpxchg %rdx,%gs:0xead0
      	jne     1b:
      	test    %rax,%rax
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Tejun Heo <tj@kernel.org>
      LKML-Reference: <1295973114.3588.312.camel@edumazet-laptop>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      889a7a6a
    • Y
      x86: Remove left over system_64.h · 9a57c3e4
      Yinghai Lu 提交于
      Left-over from the x86 merge ...
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4D3E23D1.7010405@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9a57c3e4
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 6fb1b304
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: wacom - pass touch resolution to clients through input_absinfo
        Input: wacom - add 2 Bamboo Pen and touch models
        Input: sysrq - ensure sysrq_enabled and __sysrq_enabled are consistent
        Input: sparse-keymap - fix KEY_VSW handling in sparse_keymap_setup
        Input: tegra-kbc - add tegra keyboard driver
        Input: gpio_keys - switch to using request_any_context_irq
        Input: serio - allow registered drivers to get status flag
        Input: ct82710c - return proper error code for ct82c710_open
        Input: bu21013_ts - added regulator support
        Input: bu21013_ts - remove duplicate resolution parameters
        Input: tnetv107x-ts - don't treat NULL clk as an error
        Input: tnetv107x-keypad - don't treat NULL clk as an error
      
      Fix up trivial conflicts in drivers/input/keyboard/Makefile due to
      additions of tc3589x/Tegra drivers
      6fb1b304
    • S
      mmc: bfin_sdh: fix alloc size for private data · a34650f0
      Sonic Zhang 提交于
      The bfin_sdh driver allocates the wrong size for the private data
      in the mmc_host.  The first parameter of mmc_alloc_host should be
      the size of the local driver struct rather than the common mmc_host.
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      a34650f0