1. 06 6月, 2014 1 次提交
  2. 27 5月, 2014 5 次提交
  3. 20 5月, 2014 3 次提交
    • H
      acer-wmi: Add Aspire 5741 to video_vendor_dmi_table · 9404cd95
      Hans de Goede 提交于
      The Aspire 5741 has broken acpi-video backlight control, so add it to the
      quirk table.
      
      References: https://bugzilla.redhat.com/show_bug.cgi?id=1012674Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9404cd95
    • H
      acer-wmi: Switch to acpi_video_unregister_backlight · d1337415
      Hans de Goede 提交于
      Switch from acpi_video_unregister(), to acpi_video_unregister_backlight(),
      so that the hotkeys handler registered by acpi-video stays in place.
      
      Since there are no mappings for the atkbd raw codes for the brightness
      keys used by newer Acer models in /lib/udev/hwdb.d/60-keyboard.hwdb, and
      since we map the wmi events with a code of KE_IGNORE, we rely on acpi-video
      to do the hotkey handling for us.
      
      For laptops such as the Acer Aspire 5750 which uses intel gfx this works
      despite us calling acpi_video_unregister() because the following happens:
      
       1) acpi-video module gets loaded (as it is a dependency of acer-wmi and i915)
       2) acpi-video does NOT call acpi_video_register()
       3) acer-wmi loads (assume it loads before i915), calls
          acpi_video_dmi_promote_vendor(); which sets
          ACPI_VIDEO_BACKLIGHT_DMI_VENDOR
       4) calls acpi_video_unregister -> not registered, nop
       5) i915 loads, calls acpi_video_register
       6) acpi_video_register registers the acpi_notifier for the hotkeys,
          does NOT register a backlight device because of
          ACPI_VIDEO_BACKLIGHT_DMI_VENDOR
      
      But on the Acer Aspire 5750G, which uses nvidia graphics the following happens:
       1) acpi-video module gets loaded (as it is a dependency of acer-wmi)
       2) acpi-video calls acpi_video_register()
       3) acpi_video_register registers the acpi_notifier for the hotkeys,
          and a backlight device
       4) acer-wmi loads, calls acpi_video_dmi_promote_vendor()
       5) calls acpi_video_unregister, this unregisters BOTH the acpi_notifier for
          the hotkeys AND the backlight device
      
      And we end up without any handler for the brightness hotkeys. This patch fixes
      this by switching over to acpi_video_unregister_backlight() which keeps the
      hotkey handler in place.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=35622Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d1337415
    • H
      ACPI / video: Add an acpi_video_unregister_backlight function · 1b7f37e1
      Hans de Goede 提交于
      Add an acpi_video_unregister_backlight function, which only unregisters
      the backlight device, and leaves the acpi_notifier in place. Some acpi_vendor
      driver need this as they don't want the acpi_video# backlight device, but do
      need the acpi-video driver for hotkey handling.
      
      Chances are that this new acpi_video_unregister_backlight() is actually
      what existing acpi_vendor drivers have wanted all along. Currently acpi_vendor
      drivers which want to disable the acpi_video# backlight device, make 2 calls:
      
      acpi_video_dmi_promote_vendor();
      acpi_video_unregister();
      
      The intention here is to make things independent of when acpi_video_register()
      gets called. As acpi_video_register() will get called on acpi-video load time
      on non intel gfx machines, while it gets called on i915 load time on intel
      gfx machines.
      
      This leads to the following 2 interesting scenarios:
      
       a) intel gfx:
        1) acpi-video module gets loaded (as it is a dependency of acpi_vendor
           and i915)
        2) acpi-video does NOT call acpi_video_register()
        3) acpi_vendor loads (lets assume it loads before i915), calls
           acpi_video_dmi_promote_vendor(); which sets
           ACPI_VIDEO_BACKLIGHT_DMI_VENDOR
        4) calls acpi_video_unregister -> not registered, nop
        5) i915 loads, calls acpi_video_register
        6) acpi_video_register registers the acpi_notifier for the hotkeys,
           does NOT register a backlight device because of
           ACPI_VIDEO_BACKLIGHT_DMI_VENDOR
      
       b) non intel gfx
        1) acpi-video module gets loaded (as it is a dependency acpi_vendor)
        2) acpi-video calls acpi_video_register()
        3) acpi_video_register registers the acpi_notifier for the hotkeys,
           and a backlight device
        4) acpi_vendor loads, calls acpi_video_dmi_promote_vendor()
        5) calls acpi_video_unregister, this unregisters BOTH the acpi_notifier
           for the hotkeys AND the backlight device
      
      So here we have possibly the same acpi_vendor module, making the same calls,
      but with different results, in one cases acpi-video does handle hotkeys,
      in the other it does not.
      
      Note that the a) scenario turns into b) if we assume the i915 module loads
      before the vendor_acpi module, so we also have different behavior depending
      on module loading order!
      
      So as said I believe that quite a few existing acpi_vendor modules really
      always want the behavior of a), hence this patch adds a new
      acpi_video_unregister_backlight() which gives the behavior of a) independent
      of module loading order.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1b7f37e1
  4. 17 5月, 2014 1 次提交
  5. 16 5月, 2014 1 次提交
  6. 13 5月, 2014 1 次提交
  7. 07 5月, 2014 1 次提交
    • H
      ACPI / video: change acpi-video brightness_switch_enabled default to 0 · 886129a8
      Hans de Goede 提交于
      acpi-video is unique in that it not only generates brightness up/down
      keypresses, but also (sometimes) actively changes the brightness itself.
      
      This presents an inconsistent kernel interface to userspace, basically there
      are 2 different scenarios, depending on the laptop model:
      
       1) On some laptops a brightness up/down keypress means: show a brightness osd
       with the current brightness, iow it is a brightness has changed notification.
      
       2) Where as on (a lot of) other laptops it means a brightness up/down key was
       pressed, deal with it.
      
      Most of the desktop environments interpret any press as in scenario 2, and
      change the brightness up / down as a response to the key events, causing it
      to be changed twice, once by acpi-video and once by the DE.
      
      With the new default for video.use_native_backlight we will be moving even
      more laptops over to behaving as in scenario 2. Making the remaining laptops
      even more of a weird exception. Also note that it is hard to detect scenario
      1 properly in userspace, and AFAIK none of the DE-s deals with it.
      
      Therefor this commit changes the default of brightness_switch_enabled to 0
      making its behavior consistent with all the other backlight drivers.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      886129a8
  8. 06 5月, 2014 1 次提交
  9. 04 5月, 2014 1 次提交
  10. 02 5月, 2014 1 次提交
  11. 01 5月, 2014 3 次提交
  12. 30 4月, 2014 5 次提交
  13. 29 4月, 2014 16 次提交
    • M
      dm thin: use INIT_WORK_ONSTACK in noflush_work to avoid ODEBUG warning · fbcde3d8
      Mike Snitzer 提交于
      Use INIT_WORK_ONSTACK to silence "ODEBUG: object is on stack, but not
      annotated".
      Reported-by: NZdeněk Kabeláč <zkabelac@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Acked-by: NJoe Thornber <ejt@redhat.com>
      fbcde3d8
    • G
      drivercore: deferral race condition fix · 58b116bc
      Grant Likely 提交于
      When the kernel is built with CONFIG_PREEMPT it is possible to reach a state
      when all modules loaded but some driver still stuck in the deferred list
      and there is a need for external event to kick the deferred queue to probe
      these drivers.
      
      The issue has been observed on embedded systems with CONFIG_PREEMPT enabled,
      audio support built as modules and using nfsroot for root filesystem.
      
      The following log fragment shows such sequence when all audio modules
      were loaded but the sound card is not present since the machine driver has
      failed to probe due to missing dependency during it's probe.
      The board is am335x-evmsk (McASP<->tlv320aic3106 codec) with davinci-evm
      machine driver:
      
      ...
      [   12.615118] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: ENTER
      [   12.719969] davinci_evm sound.3: davinci_evm_probe: ENTER
      [   12.725753] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card
      [   12.753846] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component
      [   12.922051] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component DONE
      [   12.950839] davinci_evm sound.3: ASoC: platform (null) not registered
      [   12.957898] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card DONE (-517)
      [   13.099026] davinci-mcasp 4803c000.mcasp: Kicking the deferred list
      [   13.177838] davinci-mcasp 4803c000.mcasp: really_probe: probe_count = 2
      [   13.194130] davinci_evm sound.3: snd_soc_register_card failed (-517)
      [   13.346755] davinci_mcasp_driver_init: LEAVE
      [   13.377446] platform sound.3: Driver davinci_evm requests probe deferral
      [   13.592527] platform sound.3: really_probe: probe_count = 0
      
      In the log the machine driver enters it's probe at 12.719969 (this point it
      has been removed from the deferred lists). McASP driver already executing
      it's probing (since 12.615118).
      The machine driver tries to construct the sound card (12.950839) but did
      not found one of the components so it fails. After this McASP driver
      registers all the ASoC components (the machine driver still in it's probe
      function after it failed to construct the card) and the deferred work is
      prepared at 13.099026 (note that this time the machine driver is not in the
      lists so it is not going to be handled when the work is executing).
      Lastly the machine driver exit from it's probe and the core places it to
      the deferred list but there will be no other driver going to load and the
      deferred queue is not going to be kicked again - till we have external event
      like connecting USB stick, etc.
      
      The proposed solution is to try the deferred queue once more when the last
      driver is asking for deferring and we had drivers loaded while this last
      driver was probing.
      
      This way we can avoid drivers stuck in the deferred queue.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Stable <stable@vger.kernel.org> # v3.4+
      58b116bc
    • A
      clocksource: nspire: Fix compiler warning · 9afa27ce
      Alexander Shiyan 提交于
      CC      drivers/clocksource/zevio-timer.o
      drivers/clocksource/zevio-timer.c:215:1: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      Signed-off-by: NAlexander Shiyan <shc_work@mail.ru>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      9afa27ce
    • L
      clocksource: arch_arm_timer: Fix age-old arch timer C3STOP detection issue · 82a56194
      Lorenzo Pieralisi 提交于
      ARM arch timers are tightly coupled with the CPU logic and lose context
      on platform implementing HW power management when cores are powered
      down at run-time. Marking the arch timers as C3STOP regardless of power
      management capabilities causes issues on platforms with no power management,
      since in that case the arch timers cannot possibly enter states where the
      timer loses context at runtime and therefore can always be used as a high
      resolution clockevent device.
      
      In order to fix the C3STOP issue in a way compliant with how real HW
      works, this patch adds a boolean property to the arch timer bindings
      to define if the arch timer is managed by an always-on power domain.
      
      This power domain is present on all ARM platforms to date, and manages
      HW that must not be turned off, whatever the state of other HW
      components (eg power controller). On platforms with no power management
      capabilities, it is the only power domain present, which encompasses
      and manages power supply for all HW components in the system.
      
      If the timer is powered by the always-on power domain, the always-on
      property must be present in the bindings which means that the timer cannot
      be shutdown at runtime, so it is not a C3STOP clockevent device.
      If the timer binding does not contain the always-on property, the timer is
      assumed to be power-gateable, hence it must be defined as a C3STOP
      clockevent device.
      
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Magnus Damm <damm@opensource.se>
      Cc: Marc Carino <marc.ceeeee@gmail.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      82a56194
    • H
    • S
      RDMA/cxgb4: Only allow kernel db ringing for T4 devs · c2f9da92
      Steve Wise 提交于
      The whole db drop avoidance stuff is for T4 only.  So we cannot allow
      that to be enabled for T5 devices.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      c2f9da92
    • S
      RDMA/cxgb4: Force T5 connections to use TAHOE congestion control · 92e5011a
      Steve Wise 提交于
      This is required to work around a T5 HW issue.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      92e5011a
    • S
      RDMA/cxgb4: Fix endpoint mutex deadlocks · cc18b939
      Steve Wise 提交于
      In cases where the cm calls c4iw_modify_rc_qp() with the endpoint
      mutex held, they must be called with internal == 1.  rx_data() and
      process_mpa_reply() are not doing this.  This causes a deadlock
      because c4iw_modify_rc_qp() might call c4iw_ep_disconnect() in some
      !internal cases, and c4iw_ep_disconnect() acquires the endpoint mutex.
      The design was intended to only do the disconnect for !internal calls.
      
      Change rx_data(), FPDU_MODE case, to call c4iw_modify_rc_qp() with
      internal == 1, and then disconnect only after releasing the mutex.
      
      Change process_mpa_reply() to call c4iw_modify_rc_qp(TERMINATE) with
      internal == 1 and set a new attr flag telling it to send a TERMINATE
      message.  Previously this was implied by !internal.
      
      Change process_mpa_reply() to return whether the caller should
      disconnect after releasing the endpoint mutex.  Now rx_data() will do
      the disconnect in the cases where process_mpa_reply() wants to
      disconnect after the TERMINATE is sent.
      
      Change c4iw_modify_rc_qp() RTS->TERM to only disconnect if !internal,
      and to send a TERMINATE message if attrs->send_term is 1.
      
      Change abort_connection() to not aquire the ep mutex for setting the
      state, and make all calls to abort_connection() do so with the mutex
      held.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      cc18b939
    • T
      cpufreq: ppc-corenet-cpufreq: Fix __udivdi3 modpost error · 6712d293
      Tim Gardner 提交于
      bfa709bc (cpufreq: powerpc: add cpufreq
      transition latency for FSL e500mc SoCs) introduced a modpost error:
      
      ERROR: "__udivdi3" [drivers/cpufreq/ppc-corenet-cpufreq.ko] undefined!
      make[1]: *** [__modpost] Error 1
      
      Fix this by avoiding 64 bit integer division.
      
      gcc version 4.8.2
      
      Fixes: bfa709bc (cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs)
      Signed-off-by: NTim Gardner <tim.gardner@canonical.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6712d293
    • S
      cpufreq: powernow-k7: Fix double invocation of cpufreq_freq_transition_begin/end · 8997b185
      Srivatsa S. Bhat 提交于
      During frequency transitions, the cpufreq core takes the responsibility of
      invoking cpufreq_freq_transition_begin() and cpufreq_freq_transition_end()
      for those cpufreq drivers that define the ->target_index callback but don't
      set the ASYNC_NOTIFICATION flag.
      
      The powernow-k7 cpufreq driver falls under this category, but this driver was
      invoking the _begin() and _end() APIs itself around frequency transitions,
      which led to double invocation of the _begin() API. The _begin API makes
      contending callers wait until the previous invocation is complete. Hence,
      the powernow-k7 driver ended up waiting on itself, leading to system hangs
      during boot.
      
      Fix this by removing the calls to the _begin() and _end() APIs from the
      powernow-k7 driver, since they rightly belong to the cpufreq core.
      
      Fixes: 12478cf0 (cpufreq: Make sure frequency transitions are serialized)
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8997b185
    • S
      cpufreq: powernow-k6: Fix double invocation of cpufreq_freq_transition_begin/end · 3221e55b
      Srivatsa S. Bhat 提交于
      During frequency transitions, the cpufreq core takes the responsibility of
      invoking cpufreq_freq_transition_begin() and cpufreq_freq_transition_end()
      for those cpufreq drivers that define the ->target_index callback but don't
      set the ASYNC_NOTIFICATION flag.
      
      The powernow-k6 cpufreq driver falls under this category, but this driver was
      invoking the _begin() and _end() APIs itself around frequency transitions,
      which led to double invocation of the _begin() API. The _begin API makes
      contending callers wait until the previous invocation is complete. Hence,
      the powernow-k6 driver ended up waiting on itself, leading to system hangs
      during boot.
      
      Fix this by removing the calls to the _begin() and _end() APIs from the
      powernow-k6 driver, since they rightly belong to the cpufreq core.
      
      (Note that during ->exit(), the powernow-k6 driver sets the frequency
       without any help from the cpufreq core. So add explicit calls to the
       _begin() and _end() APIs around that frequency transition alone, to take
       care of that special case. Also, add a missing 'break' statement there.)
      
      Fixes: 12478cf0 (cpufreq: Make sure frequency transitions are serialized)
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3221e55b
    • S
      cpufreq: powernow-k6: Fix incorrect comparison with max_multipler · 237ede16
      Srivatsa S. Bhat 提交于
      The value of 'max_multiplier' is meant to be used for comparison with
      clock_ratio[index].driver_data, not the index itself! Fix the code in
      powernow_k6_cpu_exit() that has this bug.
      
      Also, while at it, make the for-loop condition look for CPUFREQ_TABLE_END,
      instead of hard-coding the loop count to 8.
      Reported-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      237ede16
    • S
      cpufreq: longhaul: Fix double invocation of cpufreq_freq_transition_begin/end · 7aa0557f
      Srivatsa S. Bhat 提交于
      During frequency transitions, the cpufreq core takes the responsibility of
      invoking cpufreq_freq_transition_begin() and cpufreq_freq_transition_end()
      for those cpufreq drivers that define the ->target_index callback but don't
      set the ASYNC_NOTIFICATION flag.
      
      The longhaul cpufreq driver falls under this category, but this driver was
      invoking the _begin() and _end() APIs itself around frequency transitions,
      which led to double invocation of the _begin() API. The _begin API makes
      contending callers wait until the previous invocation is complete. Hence,
      the longhaul driver ended up waiting on itself, leading to system hangs
      during boot.
      
      Fix this by removing the calls to the _begin() and _end() APIs from the
      longhaul driver, since they rightly belong to the cpufreq core.
      
      (Note that during module_exit(), the longhaul driver sets the frequency
       without any help from the cpufreq core. So add explicit calls to the
       _begin() and _end() APIs around that frequency transition alone, to take
       care of that special case.)
      
      Fixes: 12478cf0 (cpufreq: Make sure frequency transitions are serialized)
      Reported-and-tested-by: NMeelis Roos <mroos@linux.ee>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7aa0557f
    • F
      [SCSI] virtio-scsi: Skip setting affinity on uninitialized vq · 0c8482ac
      Fam Zheng 提交于
      virtscsi_init calls virtscsi_remove_vqs on err, even before initializing
      the vqs. The latter calls virtscsi_set_affinity, so let's check the
      pointer there before setting affinity on it.
      
      This fixes a panic when setting device's num_queues=2 on RHEL 6.5:
      
      qemu-system-x86_64 ... \
      -device virtio-scsi-pci,id=scsi0,addr=0x13,...,num_queues=2 \
      -drive file=/stor/vm/dummy.raw,id=drive-scsi-disk,... \
      -device scsi-hd,drive=drive-scsi-disk,...
      
      [    0.354734] scsi0 : Virtio SCSI HBA
      [    0.379504] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
      [    0.380141] IP: [<ffffffff814741ef>] __virtscsi_set_affinity+0x4f/0x120
      [    0.380141] PGD 0
      [    0.380141] Oops: 0000 [#1] SMP
      [    0.380141] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.0+ #5
      [    0.380141] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
      [    0.380141] task: ffff88003c9f0000 ti: ffff88003c9f8000 task.ti: ffff88003c9f8000
      [    0.380141] RIP: 0010:[<ffffffff814741ef>]  [<ffffffff814741ef>] __virtscsi_set_affinity+0x4f/0x120
      [    0.380141] RSP: 0000:ffff88003c9f9c08  EFLAGS: 00010256
      [    0.380141] RAX: 0000000000000000 RBX: ffff88003c3a9d40 RCX: 0000000000001070
      [    0.380141] RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000
      [    0.380141] RBP: ffff88003c9f9c28 R08: 00000000000136c0 R09: ffff88003c801c00
      [    0.380141] R10: ffffffff81475229 R11: 0000000000000008 R12: 0000000000000000
      [    0.380141] R13: ffffffff81cc7ca8 R14: ffff88003cac3d40 R15: ffff88003cac37a0
      [    0.380141] FS:  0000000000000000(0000) GS:ffff88003e400000(0000) knlGS:0000000000000000
      [    0.380141] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [    0.380141] CR2: 0000000000000020 CR3: 0000000001c0e000 CR4: 00000000000006f0
      [    0.380141] Stack:
      [    0.380141]  ffff88003c3a9d40 0000000000000000 ffff88003cac3d80 ffff88003cac3d40
      [    0.380141]  ffff88003c9f9c48 ffffffff814742e8 ffff88003c26d000 ffff88003c26d000
      [    0.380141]  ffff88003c9f9c68 ffffffff81474321 ffff88003c26d000 ffff88003c3a9d40
      [    0.380141] Call Trace:
      [    0.380141]  [<ffffffff814742e8>] virtscsi_set_affinity+0x28/0x40
      [    0.380141]  [<ffffffff81474321>] virtscsi_remove_vqs+0x21/0x50
      [    0.380141]  [<ffffffff81475231>] virtscsi_init+0x91/0x240
      [    0.380141]  [<ffffffff81365290>] ? vp_get+0x50/0x70
      [    0.380141]  [<ffffffff81475544>] virtscsi_probe+0xf4/0x280
      [    0.380141]  [<ffffffff81363ea5>] virtio_dev_probe+0xe5/0x140
      [    0.380141]  [<ffffffff8144c669>] driver_probe_device+0x89/0x230
      [    0.380141]  [<ffffffff8144c8ab>] __driver_attach+0x9b/0xa0
      [    0.380141]  [<ffffffff8144c810>] ? driver_probe_device+0x230/0x230
      [    0.380141]  [<ffffffff8144c810>] ? driver_probe_device+0x230/0x230
      [    0.380141]  [<ffffffff8144ac1c>] bus_for_each_dev+0x8c/0xb0
      [    0.380141]  [<ffffffff8144c499>] driver_attach+0x19/0x20
      [    0.380141]  [<ffffffff8144bf28>] bus_add_driver+0x198/0x220
      [    0.380141]  [<ffffffff8144ce9f>] driver_register+0x5f/0xf0
      [    0.380141]  [<ffffffff81d27c91>] ? spi_transport_init+0x79/0x79
      [    0.380141]  [<ffffffff8136403b>] register_virtio_driver+0x1b/0x30
      [    0.380141]  [<ffffffff81d27d19>] init+0x88/0xd6
      [    0.380141]  [<ffffffff81d27c18>] ? scsi_init_procfs+0x5b/0x5b
      [    0.380141]  [<ffffffff81ce88a7>] do_one_initcall+0x7f/0x10a
      [    0.380141]  [<ffffffff81ce8aa7>] kernel_init_freeable+0x14a/0x1de
      [    0.380141]  [<ffffffff81ce8b3b>] ? kernel_init_freeable+0x1de/0x1de
      [    0.380141]  [<ffffffff817dec20>] ? rest_init+0x80/0x80
      [    0.380141]  [<ffffffff817dec29>] kernel_init+0x9/0xf0
      [    0.380141]  [<ffffffff817e68fc>] ret_from_fork+0x7c/0xb0
      [    0.380141]  [<ffffffff817dec20>] ? rest_init+0x80/0x80
      [    0.380141] RIP  [<ffffffff814741ef>] __virtscsi_set_affinity+0x4f/0x120
      [    0.380141]  RSP <ffff88003c9f9c08>
      [    0.380141] CR2: 0000000000000020
      [    0.380141] ---[ end trace 8074b70c3d5e1d73 ]---
      [    0.475018] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009
      [    0.475018]
      [    0.475068] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)
      [    0.475068] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009
      
      [jejb: checkpatch fixes]
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      0c8482ac
    • D
      irqchip: irq-crossbar: Not allocating enough memory · 3894e9e8
      Dan Carpenter 提交于
      We are allocating the size of a pointer and not the size of the data.
      This will lead to memory corruption.
      
      There isn't actually a "cb_device" struct, btw.  The code is only able
      to compile because GCC knows that all pointers are the same size.
      
      Fixes: 96ca848e ('DRIVERS: IRQCHIP: CROSSBAR: Add support for Crossbar IP')
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NSricharan R <r.sricharan@ti.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Link: http://lkml.kernel.org/r/20140403072134.GA14286@mwandaSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      3894e9e8
    • T
      irqchip: armanda: Sanitize set_irq_affinity() · 8cc3cfc5
      Thomas Gleixner 提交于
      The set_irq_affinity() function has two issues:
      
      1) It has no protection against selecting an offline cpu from the
         given mask.
      
      2) It pointlessly restricts the affinity masks to have a single cpu
         set. This collides with the irq migration code of arm.
      
         irq affinity is set to core 3
         core 3 goes offline
      
         migration code sets mask to cpu_online_mask and calls the
         irq_set_affinity() callback of the irq_chip which fails due to bit
         0,1,2 set.
      
      So instead of doing silly for_each_cpu() loops just pick any bit of
      the mask which intersects with the online mask.
      
      Get rid of fiddling with the default_irq_affinity as well.
      
      [ Gregory: Fixed the access to the routing register ]
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Tested-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Link: http://lkml.kernel.org/r/20140304203101.088889302@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      8cc3cfc5