1. 20 2月, 2014 2 次提交
  2. 16 2月, 2014 1 次提交
    • K
      of: search the best compatible match first in __of_match_node() · 06b29e76
      Kevin Hao 提交于
      Currently, of_match_node compares each given match against all node's
      compatible strings with of_device_is_compatible.
      
      To achieve multiple compatible strings per node with ordering from
      specific to generic, this requires given matches to be ordered from
      specific to generic. For most of the drivers this is not true and also
      an alphabetical ordering is more sane there.
      
      Therefore, this patch introduces a function to match each of the node's
      compatible strings against all given compatible matches without type and
      name first, before checking the next compatible string. This implies
      that node's compatibles are ordered from specific to generic while
      given matches can be in any order. If we fail to find such a match
      entry, then fall-back to the old method in order to keep compatibility.
      
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Tested-by: NStephen Chivers <schivers@csc.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      06b29e76
  3. 15 2月, 2014 8 次提交
  4. 14 2月, 2014 24 次提交
  5. 13 2月, 2014 5 次提交
    • O
      md/raid5: Fix CPU hotplug callback registration · 789b5e03
      Oleg Nesterov 提交于
      Subsystems that want to register CPU hotplug callbacks, as well as perform
      initialization for the CPUs that are already online, often do it as shown
      below:
      
      	get_online_cpus();
      
      	for_each_online_cpu(cpu)
      		init_cpu(cpu);
      
      	register_cpu_notifier(&foobar_cpu_notifier);
      
      	put_online_cpus();
      
      This is wrong, since it is prone to ABBA deadlocks involving the
      cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
      with CPU hotplug operations).
      
      Interestingly, the raid5 code can actually prevent double initialization and
      hence can use the following simplified form of callback registration:
      
      	register_cpu_notifier(&foobar_cpu_notifier);
      
      	get_online_cpus();
      
      	for_each_online_cpu(cpu)
      		init_cpu(cpu);
      
      	put_online_cpus();
      
      A hotplug operation that occurs between registering the notifier and calling
      get_online_cpus(), won't disrupt anything, because the code takes care to
      perform the memory allocations only once.
      
      So reorganize the code in raid5 this way to fix the deadlock with callback
      registration.
      
      Cc: linux-raid@vger.kernel.org
      Cc: stable@vger.kernel.org (v2.6.32+)
      Fixes: 36d1c647Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      [Srivatsa: Fixed the unregister_cpu_notifier() deadlock, added the
      free_scratch_buffer() helper to condense code further and wrote the changelog.]
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      789b5e03
    • D
      intel_pstate: Remove energy reporting from pstate_sample tracepoint · 709c078e
      Dirk Brandewie 提交于
      Remove the reporting of energy since it does not provide any useful
      information about the state of the driver and will be a maintainance
      headache going forward since the RAPL energy units register is not
      architectural and subject to change between micro-architectures
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=69831
      Fixes: b69880f9 (intel_pstate: Add trace point to report internal state.)
      Signed-off-by: NDirk Brandewie <dirk.j.brandewie@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      709c078e
    • O
      dma: mv_xor: Silence a bunch of LPAE-related warnings · 31fd8f5b
      Olof Johansson 提交于
      Enabling some of the mvebu platforms in the multiplatform config for ARM
      enabled these drivers, which also triggered a bunch of warnings when LPAE
      is enabled (thus making phys_addr_t 64-bit).
      
      Most changes are switching printk formats, but also a bit of changes to what
      used to be array-based pointer arithmetic that could just be done with the
      address types instead.
      
      The warnings were:
      
      drivers/dma/mv_xor.c: In function 'mv_xor_tx_submit':
      drivers/dma/mv_xor.c:500:3: warning: format '%x' expects argument of type
          'unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat]
      drivers/dma/mv_xor.c: In function 'mv_xor_alloc_chan_resources':
      drivers/dma/mv_xor.c:553:13: warning: cast to pointer from integer of
          different size [-Wint-to-pointer-cast]
      drivers/dma/mv_xor.c:555:4: warning: cast from pointer to integer of
          different size [-Wpointer-to-int-cast]
      drivers/dma/mv_xor.c: In function 'mv_xor_prep_dma_memcpy':
      drivers/dma/mv_xor.c:584:2: warning: format '%x' expects argument of type
          'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat]
      drivers/dma/mv_xor.c:584:2: warning: format '%x' expects argument of type
          'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat]
      drivers/dma/mv_xor.c: In function 'mv_xor_prep_dma_xor':
      drivers/dma/mv_xor.c:628:2: warning: format '%u' expects argument of type
          'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat]
      Acked-by: NVinod Koul <vinod.koul@intel.com>
      Acked-by: NJason Cooper <jason@lakedaemon.net>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      31fd8f5b
    • S
      Target/sbc: Fix protection copy routine · d6a65fdc
      Sagi Grimberg 提交于
      Need to take into account that protection sg_list
      (copy-buffer) may consist of multiple entries.
      
      Changes from v0:
      - Changed commit description
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d6a65fdc
    • J
      IB/srpt: replace strict_strtoul() with kstrtoul() · 9d8abf45
      Jingoo Han 提交于
      The usage of strict_strtoul() is not preferred, because
      strict_strtoul() is obsolete. Thus, kstrtoul() should be
      used.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9d8abf45