Commit Graph

546755 Commits

Author SHA1 Message Date
Mans Rullgard 9054a31d60 clk: check for invalid parent index of orphans in __clk_init()
If a mux clock is initialised (by hardware or firmware) with an
invalid parent, its ->get_parent() can return an out of range
index.  For example, the generic mux clock attempts to return
-EINVAL, which due to the u8 return type ends up a rather large
number.  Using this index with the parent_names[] array results
in an invalid pointer and (usually) a crash in the following
strcmp().

This patch adds a check for the parent index being in range,
ignoring clocks reporting invalid values.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Tested-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-09-16 15:35:18 -07:00
Thierry Reding e1595d89ae clk: tegra: dfll: Properly protect OPP list
The OPP list needs to be protected against concurrent accesses. Using
simple RCU read locks does the trick and gets rid of the following
lockdep warning:

	===============================
	[ INFO: suspicious RCU usage. ]
	4.2.0-next-20150908 #1 Not tainted
	-------------------------------
	drivers/base/power/opp.c:460 Missing rcu_read_lock() or dev_opp_list_lock protection!

	other info that might help us debug this:

	rcu_scheduler_active = 1, debug_locks = 0
	4 locks held by kworker/u8:0/6:
	 #0:  ("%s""deferwq"){++++.+}, at: [<c0040d8c>] process_one_work+0x118/0x4bc
	 #1:  (deferred_probe_work){+.+.+.}, at: [<c0040d8c>] process_one_work+0x118/0x4bc
	 #2:  (&dev->mutex){......}, at: [<c03b8194>] __device_attach+0x20/0x118
	 #3:  (prepare_lock){+.+...}, at: [<c054bc08>] clk_prepare_lock+0x10/0xf8

	stack backtrace:
	CPU: 2 PID: 6 Comm: kworker/u8:0 Not tainted 4.2.0-next-20150908 #1
	Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
	Workqueue: deferwq deferred_probe_work_func
	[<c001802c>] (unwind_backtrace) from [<c00135a4>] (show_stack+0x10/0x14)
	[<c00135a4>] (show_stack) from [<c02a8418>] (dump_stack+0x94/0xd4)
	[<c02a8418>] (dump_stack) from [<c03c6f6c>] (dev_pm_opp_find_freq_ceil+0x108/0x114)
	[<c03c6f6c>] (dev_pm_opp_find_freq_ceil) from [<c0551a3c>] (dfll_calculate_rate_request+0xb8/0x170)
	[<c0551a3c>] (dfll_calculate_rate_request) from [<c0551b10>] (dfll_clk_round_rate+0x1c/0x2c)
	[<c0551b10>] (dfll_clk_round_rate) from [<c054de2c>] (clk_calc_new_rates+0x1b8/0x228)
	[<c054de2c>] (clk_calc_new_rates) from [<c054e44c>] (clk_core_set_rate_nolock+0x44/0xac)
	[<c054e44c>] (clk_core_set_rate_nolock) from [<c054e4d8>] (clk_set_rate+0x24/0x34)
	[<c054e4d8>] (clk_set_rate) from [<c0512460>] (tegra124_cpufreq_probe+0x120/0x230)
	[<c0512460>] (tegra124_cpufreq_probe) from [<c03b9cbc>] (platform_drv_probe+0x44/0xac)
	[<c03b9cbc>] (platform_drv_probe) from [<c03b84c8>] (driver_probe_device+0x218/0x304)
	[<c03b84c8>] (driver_probe_device) from [<c03b69b0>] (bus_for_each_drv+0x60/0x94)
	[<c03b69b0>] (bus_for_each_drv) from [<c03b8228>] (__device_attach+0xb4/0x118)
	ata1: SATA link down (SStatus 0 SControl 300)
	[<c03b8228>] (__device_attach) from [<c03b77c8>] (bus_probe_device+0x88/0x90)
	[<c03b77c8>] (bus_probe_device) from [<c03b7be8>] (deferred_probe_work_func+0x58/0x8c)
	[<c03b7be8>] (deferred_probe_work_func) from [<c0040dfc>] (process_one_work+0x188/0x4bc)
	[<c0040dfc>] (process_one_work) from [<c004117c>] (worker_thread+0x4c/0x4f4)
	[<c004117c>] (worker_thread) from [<c0047230>] (kthread+0xe4/0xf8)
	[<c0047230>] (kthread) from [<c000f7d0>] (ret_from_fork+0x14/0x24)

Signed-off-by: Thierry Reding <treding@nvidia.com>
Fixes: c4fe70ada4 ("clk: tegra: Add closed loop support for the DFLL")
[vince.h@nvidia.com: Unlock rcu on error path]
Signed-off-by: Vince Hsu <vince.h@nvidia.com>
[sboyd@codeaurora.org: Dropped second hunk that nested the rcu
read lock unnecessarily]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-09-16 15:16:03 -07:00
Pavel Fedin c2f58514cf arm/arm64: KVM: vgic: Check for !irqchip_in_kernel() when mapping resources
Until b26e5fdac4 ("arm/arm64: KVM: introduce per-VM ops"),
kvm_vgic_map_resources() used to include a check on irqchip_in_kernel(),
and vgic_v2_map_resources() still has it.

But now vm_ops are not initialized until we call kvm_vgic_create().
Therefore kvm_vgic_map_resources() can being called without a VGIC,
and we die because vm_ops.map_resources is NULL.

Fixing this restores QEMU's kernel-irqchip=off option to a working state,
allowing to use GIC emulation in userspace.

Fixes: b26e5fdac4 ("arm/arm64: KVM: introduce per-VM ops")
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
[maz: reworked commit message]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-09-16 18:35:28 +01:00
Linus Torvalds 72714841b7 Changes for 4.3-rc1
- Move ehca driver to staging/rdma and schedule for deletion
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV9xxNAAoJELgmozMOVy/dI+QP/R0afI1zc7pJe1D2RmrZWnAH
 HDWSNYJ8eVk25ptnaOes9kV6yuOV1nGiyCIGqUXk8Q7rVYbIIz0nK81S+gPLMpTU
 /la28bmUz7szvEtY+gFHZCuQvCiwjM+N7t39aehIMCc/vYnIdrOXuYMhB8kd6flL
 2mpnUFmfqMZLGh4RY1PQB9cNwVW9yYOVnG+1Z/M26wWl3NIDe4jiNoqV/jFvEf2v
 FyzjcYfjexVA47XOsfGy512Vlb+8DTtFeCz/TRl9e8tYCSHOmTcXv7jLywRoA1zn
 NNwJnXhliM9/EDqtbJMymYDAm9vzcfvXPCx1OOisVWxJxg9IF3p2/uPLeIKUSXZl
 15mfOzoTuNXlunHDQYbzC4+P2zs+uU2k6ivpd7HZgyiBkUXzftYh/6gIJcJOreU6
 1ndt2fK5hcG/Was+v6kkYaw0x6ZpawyLqHMs32V1xVcbmM5P1OFFOQFx1KDYhHH8
 WmOlcd/XmIjNY5o3ySQHSKjO6Ar0IfNyzpU3jUzg2AFbZv8m2BgYEhQOnrggxBtM
 deFbDlxMnIrsIJtsHBmr5Y/nsgIYpkxLK4xUod76yZSRuyjLCH/2C0otubS1w1vH
 4unU9zJXboBi7naPE5/fdIPMhwZu1X47xUyrwGksz3pHyiRpnhq55t+AWpsHCrg+
 +XYexztBX/cPReacpWJR
 =4XzR
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma

Pull rdma driver move from Doug Ledford:
 "This is a move only, no functional changes.

  I tried to get it in prior to the rc1 release, but we were waiting on
  IBM to get back to us that they were OK with the deprecation and
  eventual removal of this driver.  That OK didn't materialize until
  last week, so integration and testing time pushed us beyond the rc1
  release.

  Summary:

   - Move ehca driver to staging/rdma and schedule for deletion"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  IB/ehca: Deprecate driver, move to staging, schedule deletion
2015-09-16 09:16:20 -07:00
Linus Torvalds 30255100d7 Two patches for nct6775 driver:
Add support for NCT6793D, and fix swapped registers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV+X7kAAoJEMsfJm/On5mBhPAP/2aWMuRrLl2bx7EUgqB84PAV
 i3ynORuSBX1yfVPYxaU1W7OsoXlD4+62gMLgvmVO2w+yjLnveowI9cCQYL3wmcg3
 ASG5NdpbwKGZwYc0q7ofi67zdYYYEdR9OtR1Raw8DROV7cZiuhhnA6vGYEI9m5Dz
 TbSAolTcaBino0cNGVRiD/ohktqvJSxnnxI73KRx0bgAOS3oiCRCdn760DaiXpEn
 FX99JtB9arBFX5wTx2KHQpGvFiqtIGUk+2ghyiKODjmfI2Hy+Jgh/c4VMcb9+p8K
 VP/JYXh1k7fBBOZlmn4qXJh8Ls36k0PwKefa9KbyyflICNYLjv7bqv3gt9hCQcW/
 BoXR58mH6wfrjhMdnZv3gNEDj1rN8FkMtAEYHNyykVnHOLbPDM0D1mDesKdQeO8K
 mvMGNk0FU4j6JNS7GmhnoZUE39qBjG9uiWqElt3aiVMP+t9eV4If0BSxQV0xe+un
 b1CwbcpEtvdXQn4DW3Qn0pu+aI/WpBTU1QoUH+3Z2XmPaaQGvZx+4Qm4XhlOgFkW
 WFi3Cc+Uets3IbhsfCdGwNttGjufHb28dAX3IfkCdpEOd62HH03jsMobKT2PEKx1
 01CzyBwLUhx3EkqZCWJvlM8OVbqG1991JS5e0qJ2tMJgND242ZiL71TtXyahMF/H
 mmYb9Wrg9hgvzBwolKrg
 =/U4E
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Two patches for the nct6775 driver: add support for NCT6793D, and fix
  swapped registers"

* tag 'hwmon-for-linus-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (nct6775) Add support for NCT6793D
  hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips
2015-09-16 08:49:41 -07:00
Linus Torvalds 9efeaaf9a0 This is a first set of pin control fixes for the v4.3 series:
- Some IS_ERR() fixes from Julia Lawall. I always wanted the compiler
   to catch these but error pointers by nailing them as an err pointer
   intrinsic type or something seem to be a "no can do". In any
   case, cocinelle is obviously up to the task, better than bugs
   staying around.
 
 - Better error handling for NULL GPIO chips.
 
 - Fix a compile error from the big irq desc refactoring. I'm
   surprised the fallout wasn't bigger than this.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV+VRDAAoJEEEQszewGV1z7UQP+wZi0VTV3VY04sbGxFe9NTCl
 BSXcFYoxq/6SMRkgewa47MIqEejO0q8Qq+2wE1HhUy4xiCSg5XLxCJGePqUGsglf
 0GjUbTinXuc+HqEdR56xqz+H8RAjC5bqlUFOhXNPhpmAJlLvg6WL4t/08Dcd2N/9
 RuoAlbPqzO8ingAvoj4r8cwF7/4pRojOvh/aFQ5jZ4aVriL04Uqnzdnf4OmplNIj
 gzEMICTIg6hQo0iWrKnn97DSHGR4UFKn7FQxF6g48tOIzE4hiWgfyXdpY6emG0Zi
 eeEH6y/kAk3V3kmNqLe83N8TLBiHvKoj33s/ZtFuLHoakeMcQR3B3FUodQWAEs8A
 6bzB8bninXEU8h8eyOhly/0DIOM6rGTEyNgPcJI0F5CSfcB5uFdl5s+X4xEEiwKo
 Bsx1sfLKKI7p7lWXbML+7B+3JcgLr4E0yT6QsC9yA2AyHIgtZIBfp1hc82U9Qfgf
 lheT09XGGS+8uuECQuG3woI/qokZdHlnIGsY28sqEJVrSKyXoYSFZ03YZi2DEKsj
 2qPJfpfEE6x6gMUsfh+u1oJlfYrJfSU+X4uBFJ9estLOX7J9y/nygULZutQFImZ1
 hUBhFDnUiKe33oe4VuLplDt/KkQ1JGC32mgYsSVGTLzUS2/vyeTlYsLXxsohLgv6
 0fec5ExVS9/JWJHwFwOf
 =xpIg
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "This is a first set of pin control fixes for the v4.3 series.  Nothing
  special to say, business as usual.

   - Some IS_ERR() fixes from Julia Lawall.  I always wanted the
     compiler to catch these but error pointers by nailing them as an
     err pointer intrinsic type or something seem to be a "no can do".
     In any case, cocinelle is obviously up to the task, better than
     bugs staying around.

   - Better error handling for NULL GPIO chips.

   - Fix a compile error from the big irq desc refactoring.  I'm
     surprised the fallout wasn't bigger than this"

* tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: samsung: s3c24xx: fix syntax error
  pinctrl: core: Warn about NULL gpio_chip in pinctrl_ready_for_gpio_range()
  pinctrl: join lines that can be a single line within 80 columns
  pinctrl: digicolor: convert null test to IS_ERR test
  pinctrl: qcom: ssbi: convert null test to IS_ERR test
2015-09-16 08:07:04 -07:00
Jason J. Herne 9bf9fde2c9 KVM: s390: Replace incorrect atomic_or with atomic_andnot
The offending commit accidentally replaces an atomic_clear with an
atomic_or instead of an atomic_andnot in kvm_s390_vcpu_request_handled.
The symptom is that kvm guests on s390 hang on startup.
This patch simply replaces the incorrect atomic_or with atomic_andnot

Fixes: 805de8f43c (atomic: Replace atomic_{set,clear}_mask() usage)
Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-09-16 17:01:06 +02:00
Linus Torvalds d1291ebd85 This is the first round of GPIO fixes for v4.3:
- Return value checks and thus nicer errorpath for two drivers.
 
 - Make GPIO_RCAR arch neutral.
 
 - Propagate errors from GPIO chip ->get() vtable call. It turned
   out these can actually fail sometimes, especially on slowpath
   controllers doing I2C traffic and similar.
 
 - Update documentation to be in sync with the massive changes in
   the v4.3 merge window, phew.
 
 - Handle deferred probe properly in the OMAP driver.
 
 - Get rid of surplus MODULE_ALIAS() from sx150x.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV+RcuAAoJEEEQszewGV1zMqwQALnqXAvtJGw7CaKOiShm3ywH
 JPm4jMh7iiUFI8H+k6TscwxRz7bPKrezsCZleUxz/BOu/sAA9bVarYU3Fcl5HwZD
 0qVszWCQ3E44qMh708F/B2kuQWdMl3u0aY9AGcNm0e4uDZ+hxXQ/jw+B1N/W0KFL
 vkCCCG/uE5eoRsOkOlEtm0UI+DjHRSpzEkgZ/1HmFfBtZaQuvHOMc5ouzT72hMQn
 YOk9lKPqjivGzDZYiISfmb62uuDQ8YnwsWZvP5SEbNdEgSlVes5Njd59pnxJgjYg
 tSQO37Sm0kNafbIao71DHrTBWHRxvsNeLuaDRnfNj95W8QtcYjvWrqCd3kBIeAt5
 ZgUlm6mKEeZuz2PW+biT4DC7hPpV0LXCwTjjHtJ6S5w7JuM3+2HpHDItbYfs5SiL
 40VlXKuLPOlxt6f179+4YTRwtaotQ6Bw0Rcflh5Sa4qq7LmZFghwSwtCDsNsWhWq
 qnFRoqbDmcxXBbnOuTvhM4DVCv7bvyQpos3EoFVANGg/T2zJ+8TEfi1ClHd5CbFO
 WHbgVaYVwLsfGgYX5Hq5aF/dhl4NSSDpikUhcDCvX62HoeImGFcWrybzIjk+9QND
 dCFS2ldd2znVZsCszCVAvtKmv0+TACb2iUK8Anhte8aYc1PLnhYT95BqUSB9QiyI
 Df6Pj5FQiLEyAnxVIrEh
 =72G1
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "This is the first round of GPIO fixes for v4.3.  Quite a lot of
  patches, but the influx of new stuff in the merge window was equally
  big, so I'm not surprised.

   - Return value checks and thus nicer errorpath for two drivers.

   - Make GPIO_RCAR arch neutral.

   - Propagate errors from GPIO chip ->get() vtable call.  It turned out
     these can actually fail sometimes, especially on slowpath
     controllers doing I2C traffic and similar.

   - Update documentation to be in sync with the massive changes in the
     v4.3 merge window, phew.

   - Handle deferred probe properly in the OMAP driver.

   - Get rid of surplus MODULE_ALIAS() from sx150x"

* tag 'gpio-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: omap: Fix GPIO numbering for deferred probe
  Documentation: gpio: Explain that <function>-gpio is also supported
  gpio: omap: Fix gpiochip_add() handling for deferred probe
  gpio: sx150x: Remove unnecessary MODULE_ALIAS()
  Documentation: gpio: board: describe the con_id parameter
  Documentation: gpio: board: add flags parameter to gpiod_get*() functions
  gpio: Propagate errors from chip->get()
  gpio: rcar: GPIO_RCAR doesn't relate to ARM
  gpio: mxs: need to check return value of irq_alloc_generic_chip
  gpio: mxc: need to check return value of irq_alloc_generic_chip
2015-09-16 07:58:58 -07:00
Rob Herring ae80a2f2d1 arm64: Remove ununsed set_irq_flags
Now that all users of set_irq_flags and custom flags are converted to
genirq functions, the ARM specific set_irq_flags can be removed.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 16:53:39 +02:00
Rob Herring eb811129ed ARM: Remove ununsed set_irq_flags
Now that all users of set_irq_flags and custom flags are converted to
genirq functions, the ARM specific set_irq_flags can be removed.

Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 16:53:39 +02:00
Rob Herring 3e15135b98 sh: Kill off set_irq_flags usage
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Simon Horman <horms@verge.net.au>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sh@vger.kernel.org
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Magnus Damm <magnus.damm@gmail.com>
Link: http://lkml.kernel.org/r/1440889285-5637-4-git-send-email-robh@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 16:53:39 +02:00
Rob Herring d17cab4451 irqchip: Kill off set_irq_flags usage
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Link: http://lkml.kernel.org/r/1440889285-5637-3-git-send-email-robh@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 16:53:38 +02:00
Rob Herring ca0141de74 gpu/drm: Kill off set_irq_flags usage
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@arm.linux.org.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 16:53:38 +02:00
Linus Torvalds aa57e0b281 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - The selftest overreads the IV test vector.

  - Fix potential infinite loop in sunxi-ss driver.

   - Fix powerpc build failure when VMX is set without VSX"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: testmgr - don't copy from source IV too much
  crypto: sunxi-ss - Fix a possible driver hang with ciphers
  crypto: vmx - VMX crypto should depend on CONFIG_VSX
2015-09-16 07:53:33 -07:00
David Woodhouse 03da3ff1cf x86/platform: Fix Geode LX timekeeping in the generic x86 build
In 2007, commit 07190a08ee ("Mark TSC on GeodeLX reliable")
bypassed verification of the TSC on Geode LX. However, this code
(now in the check_system_tsc_reliable() function in
arch/x86/kernel/tsc.c) was only present if CONFIG_MGEODE_LX was
set.

OpenWRT has recently started building its generic Geode target
for Geode GX, not LX, to include support for additional
platforms. This broke the timekeeping on LX-based devices,
because the TSC wasn't marked as reliable:
https://dev.openwrt.org/ticket/20531

By adding a runtime check on is_geode_lx(), we can also include
the fix if CONFIG_MGEODEGX1 or CONFIG_X86_GENERIC are set, thus
fixing the problem.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: Andres Salomon <dilinger@queued.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Marcelo Tosatti <marcelo@kvack.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1442409003.131189.87.camel@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-09-16 16:00:12 +02:00
Marek Majtyka ca09f02f12 arm: KVM: Fix incorrect device to IPA mapping
A critical bug has been found in device memory stage1 translation for
VMs with more then 4GB of address space. Once vm_pgoff size is smaller
then pa (which is true for LPAE case, u32 and u64 respectively) some
more significant bits of pa may be lost as a shift operation is performed
on u32 and later cast onto u64.

Example: vm_pgoff(u32)=0x00210030, PAGE_SHIFT=12
        expected pa(u64):   0x0000002010030000
        produced pa(u64):   0x0000000010030000

The fix is to change the order of operations (casting first onto phys_addr_t
and then shifting).

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
[maz: fixed changelog and patch formatting]
Cc: stable@vger.kernel.org
Signed-off-by: Marek Majtyka <marek.majtyka@tieto.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-09-16 14:50:45 +01:00
Marc Zyngier 1713e5aa05 arm64: KVM: Fix user access for debug registers
When setting the debug register from userspace, make sure that
copy_from_user() is called with its parameters in the expected
order. It otherwise doesn't do what you think.

Fixes: 84e690bfbe ("KVM: arm64: introduce vcpu->arch.debug_ptr")
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2015-09-16 14:50:04 +01:00
Thomas Gleixner bd0b9ac405 genirq: Remove irq argument from irq flow handlers
Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.

Remove the argument.

Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
2015-09-16 15:47:51 +02:00
Jiang Liu b237721c5d genirq: Move field 'msi_desc' from irq_data into irq_common_data
MSI descriptors are per-irq instead of per irqchip, so move it into
struct irq_common_data.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1433145945-789-35-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 15:46:49 +02:00
Jiang Liu 9df872faa7 genirq: Move field 'affinity' from irq_data into irq_common_data
Irq affinity mask is per-irq instead of per irqchip, so move it into
struct irq_common_data.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/1433303281-27688-1-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 15:46:49 +02:00
Jiang Liu af7080e040 genirq: Move field 'handler_data' from irq_data into irq_common_data
Handler data (handler_data) is per-irq instead of per irqchip, so move
it into struct irq_common_data.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1433145945-789-13-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 15:46:49 +02:00
Jiang Liu 449e9cae58 genirq: Move field 'node' from irq_data into irq_common_data
NUMA node information is per-irq instead of per-irqchip, so move it into
struct irq_common_data. Also use CONFIG_NUMA to guard irq_common_data.node.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/1433145945-789-8-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 15:46:49 +02:00
Thomas Gleixner 4df7f54d16 irqchip/gic-v3: Use IRQD_FORWARDED_TO_VCPU flag
Get rid of the handler_data abuse.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
2015-09-16 15:46:49 +02:00
Thomas Gleixner 714665351c irqchip/gic: Use IRQD_FORWARDED_TO_VCPU flag
Get rid of the handler_data abuse.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
2015-09-16 15:46:49 +02:00
Thomas Gleixner fc5697126a genirq: Provide IRQD_FORWARDED_TO_VCPU status flag
Provide a irq data flag to mark an irq forwarded to a VCPU along with
the accessor functions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
2015-09-16 15:46:48 +02:00
Thomas Gleixner 755d119a62 genirq: Simplify irq_data_to_desc()
Avoid the lookup of irq_desc and use the same mechanism for
hierarchical and flat irqdomains.

Based-on-a-patch-from: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 15:43:11 +02:00
Thomas Gleixner 123236ccac genirq: Remove __irq_set_handler_locked()
All users converted to irq_set_handler_locked()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 15:43:11 +02:00
Thomas Gleixner 7c51173add pinctrl/pistachio: Use irq_set_handler_locked
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor. Search and replacement was done with coccinelle:

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
2015-09-16 15:43:11 +02:00
Thomas Gleixner a7147db0f5 gpio: vf610: Use irq_set_handler_locked
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor. Search and replacement was done with coccinelle:

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
2015-09-16 15:43:11 +02:00
Thomas Gleixner 9ca86b204b powerpc/mpc8xx: Use irq_set_handler_locked()
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle:

@@
struct irq_data *d;
expression E1;
@@

-__irq_set_handler_locked(d->irq, E1);
+irq_set_handler_locked(d, E1);

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
2015-09-16 15:43:11 +02:00
Thomas Gleixner 9758a7b0e5 powerpc/ipic: Use irq_set_handler_locked()
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle:

@@
struct irq_data *d;
expression E1;
@@

-__irq_set_handler_locked(d->irq, E1);
+irq_set_handler_locked(d, E1);

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Anton Blanchard <anton@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
2015-09-16 15:43:11 +02:00
Thomas Gleixner e9e879a3d6 powerpc/cpm2: Use irq_set_handler_locked()
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle:

@@
struct irq_data *d;
expression E1;
@@

-__irq_set_handler_locked(d->irq, E1);
+irq_set_handler_locked(d, E1);

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
2015-09-16 15:43:10 +02:00
Thomas Gleixner 6b83bd9414 powerpc/mpc52xx: Use irq_set_handler_locked()
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle:

@@
struct irq_data *d;
expression E1;
@@

-__irq_set_handler_locked(d->irq, E1);
+irq_set_handler_locked(d, E1);

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
2015-09-16 15:43:10 +02:00
Wanpeng Li 04bb92e4b4 KVM: vmx: fix VPID is 0000H in non-root operation
Reference SDM 28.1:

The current VPID is 0000H in the following situations:
- Outside VMX operation. (This includes operation in system-management
  mode under the default treatment of SMIs and SMM with VMX operation;
  see Section 34.14.)
- In VMX root operation.
- In VMX non-root operation when the “enable VPID” VM-execution control
  is 0.

The VPID should never be 0000H in non-root operation when "enable VPID"
VM-execution control is 1. However, commit 34a1cd60 ("kvm: x86: vmx:
move some vmx setting from vmx_init() to hardware_setup()") remove the
codes which reserve 0000H for VMX root operation.

This patch fix it by again reserving 0000H for VMX root operation.

Cc: stable@vger.kernel.org # 3.19+
Fixes: 34a1cd60d1
Reported-by: Wincy Van <fanwenyi0529@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-09-16 15:17:27 +02:00
Aneesh Kumar K.V 36b35d5d80 powerpc/mm: Recompute hash value after a failed update
If we had secondary hash flag set, we ended up modifying hash value in
the updatepp code path. Hence with a failed updatepp we will be using
a wrong hash value for the following hash insert. Fix this by
recomputing hash before insert.

Without this patch we can end up with using wrong slot number in linux
pte. That can result in us missing an hash pte update or invalidate
which can cause memory corruption or even machine check.

Fixes: 6d492ecc64 ("powerpc/THP: Add code to handle HPTE faults for hugepages")
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-09-16 22:06:03 +10:00
Benjamin Herrenschmidt 655471f54c powerpc/boot: Specify ABI v2 when building an LE boot wrapper
The kernel does it, not the boot wrapper, which breaks with some
cross compilers that still default to ABI v1.

Fixes: 147c05168f ("powerpc/boot: Add support for 64bit little endian wrapper")
Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-09-16 22:05:55 +10:00
Thomas Gleixner e902e14549 genirq: Remove __irq_set_chip_handler_name_locked()
All users converted to irq_set_chip_handler_name_locked()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-16 12:55:15 +02:00
Thomas Gleixner b9a5ec33e3 pinctrl: sunxi: Use irq_set_chip_handler_name_locked()
__irq_set_chip_handler_name_locked() is about to be replaced. Use
irq_set_chip_handler_name_locked() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
2015-09-16 12:42:49 +02:00
Paolo Bonzini 62bea5bff4 KVM: add halt_attempted_poll to VCPU stats
This new statistic can help diagnosing VCPUs that, for any reason,
trigger bad behavior of halt_poll_ns autotuning.

For example, say halt_poll_ns = 480000, and wakeups are spaced exactly
like 479us, 481us, 479us, 481us. Then KVM always fails polling and wastes
10+20+40+80+160+320+480 = 1110 microseconds out of every
479+481+479+481+479+481+479 = 3359 microseconds. The VCPU then
is consuming about 30% more CPU than it would use without
polling.  This would show as an abnormally high number of
attempted polling compared to the successful polls.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com<
Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-09-16 12:17:00 +02:00
Pierre Morel ad2aa04218 virtio/s390: handle failures of READ_VQ_CONF ccw
In virtio_ccw_read_vq_conf() the return value of ccw_io_helper()
was not checked.
If the configuration could not be read properly, we'd wrongly assume a
queue size of 0.

Let's propagate any I/O error to virtio_ccw_setup_vq() so it may
properly fail.

Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-09-16 12:48:08 +03:00
Michael S. Tsirkin fd2e8d4300 tools/virtio: propagate V=X to kernel build
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-09-16 12:48:07 +03:00
Michael S. Tsirkin 4e9fa50c6c vhost: move features to core
virtio 1 and any layout are core features, move them
there. This fixes vhost test.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-09-16 12:48:07 +03:00
Russell King 9b55613f42 ARM: fix Thumb2 signal handling when ARMv6 is enabled
When a kernel is built covering ARMv6 to ARMv7, we omit to clear the
IT state when entering a signal handler.  This can cause the first
few instructions to be conditionally executed depending on the parent
context.

In any case, the original test for >= ARMv7 is broken - ARMv6 can have
Thumb-2 support as well, and an ARMv6T2 specific build would omit this
code too.

Relax the test back to ARMv6 or greater.  This results in us always
clearing the IT state bits in the PSR, even on CPUs where these bits
are reserved.  However, they're reserved for the IT state, so this
should cause no harm.

Cc: <stable@vger.kernel.org>
Fixes: d71e1352e2 ("Clear the IT state when invoking a Thumb-2 signal handler")
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-09-16 10:35:40 +01:00
Ingo Molnar f6cf87f748 perf/urgent fixes:
User visible:
 
 - Fix segfault pressing -> in 'perf top' with no hist entries (Wang Nan)
 
    E.g:
 	perf top -e page-faults --pid 11400 # 11400 generates no page-fault
 
 - Fix propagation of thread and cpu maps, that got broken when doing incomplete
   changes to better support events with a PMU cpu mask, leading to Intel PT to
   fail with an error like:
 
   $ perf record -e intel_pt//u uname
   Error: The sys_perf_event_open() syscall returned with
           22 (Invalid argument) for event (sched:sched_switch).
 
   Because intel_pt adds that sched:sched_switch evsel to the evlist after the
   thread/cpu maps were propagated to the evsels, fix it (Adrian Hunter)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV+DJ5AAoJENZQFvNTUqpADsMQAJPtLUkGWMVxIpSEgz1qahWm
 NY29T5tK7VpuG0BwIBSdZCpnfytEzyLXtDeY/y0bYHn9KPczrN2EBXhdV8DGar9J
 qG6rb/GvfxmFfimSLlQYnSF9Up5XagapF+T3fe6K4IOEpGy7t3Q3YbIXEBHPLC5H
 trh2/mEcfMUu55Dlmk73E+99yPnjkNfuspKHRZSGY1tOxhTWgFi2uFCH+abK9Xb/
 EmTa7xp5kki3NbttN5kryJFlngy3mDzADJP+y9VdvqqrXwhSfWkNnt8SBY1V++D4
 GzsR4NWPLDP99aBVZVtAiNKVN7wZ8mm6H0+nfCBOJVMgfaDITfdAdH7pG3v86/aS
 9ZT1YXZTi8l/UcvVmbVl3ikLSzWGtmAS3szy2//cEN0D8T1vRsderwd8MFs2OBgf
 9P/dCTLtriWM4YaSIZ1obOWC1tFRJz8yD3F4BCzx/1i5hrNgI0opR71iMFsx2la2
 Cb1awkVDl4e+cF/ucRJ0242LohNv3a3PaTniBMRiBiMN3kcU+Sqoegq1ysj1Zb6G
 WuQCtf7qRCJmbZRP8AWHsEM0UkEYmhicgYKzx9BGWyBgvJcdifZ4KGHA6Wd5HPyx
 JwXzBt6SoFLmK4IQi87nW727BQrfVYRi++IPusgkE0fRQNM7AWah8zJCVtraGRrQ
 T3NLb7T2FRL56fX+DGpj
 =Sfm6
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

- Fix segfault pressing -> in 'perf top' with no hist entries. (Wang Nan)

   E.g:
	perf top -e page-faults --pid 11400 # 11400 generates no page-fault

- Fix propagation of thread and cpu maps, that got broken when doing incomplete
  changes to better support events with a PMU cpu mask, leading to Intel PT to
  fail with an error like:

    $ perf record -e intel_pt//u uname
    Error: The sys_perf_event_open() syscall returned with
              22 (Invalid argument) for event (sched:sched_switch).

  Because intel_pt adds that sched:sched_switch evsel to the evlist after the
  thread/cpu maps were propagated to the evsels, fix it. (Adrian Hunter)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-09-16 09:06:54 +02:00
Rafael J. Wysocki 1f0bd44e93 cpufreq: acpi-cpufreq: Use cpufreq_cpu_get_raw() in ->get()
cpufreq_cpu_get() called by get_cur_freq_on_cpu() is overkill,
because the ->get() callback is always invoked in a context in
which all of the conditions checked by cpufreq_cpu_get() are
guaranteed to be satisfied.

Use cpufreq_cpu_get_raw() instead of it and drop the
corresponding cpufreq_cpu_put() from get_cur_freq_on_cpu().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2015-09-16 02:17:49 +02:00
Jeff Moyer f0b2e563bc blockdev: don't set S_DAX for misaligned partitions
The dax code doesn't currently support misaligned partitions,
so disable O_DIRECT via dax until such time as that support
materializes.

Cc: <stable@vger.kernel.org>
Suggested-by: Boaz Harrosh <boaz@plexistor.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2015-09-15 20:08:05 -04:00
Jeff Moyer e94f5a2285 dax: fix O_DIRECT I/O to the last block of a blockdev
commit bbab37ddc2 (block: Add support for DAX reads/writes to
block devices) caused a regression in mkfs.xfs.  That utility
sets the block size of the device to the logical block size
using the BLKBSZSET ioctl, and then issues a single sector read
from the last sector of the device.  This results in the dax_io
code trying to do a page-sized read from 512 bytes from the end
of the device.  The result is -ERANGE being returned to userspace.

The fix is to align the block to the page size before calling
get_block.

Thanks to willy for simplifying my original patch.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Tested-by:  Linda Knippers <linda.knippers@hp.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2015-09-15 20:07:35 -04:00
Luck, Tony 865ca084fd ia64: Enable userfaultfd and membarrier system calls
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-15 16:22:45 -07:00
David Woodhouse 09a77a8852 modsign: Fix GPL/OpenSSL licence incompatibility
The GPL does not permit us to link against the OpenSSL library. Use
LGPL for sign-file and extract-file instead.

[ The whole "openssl isn't compatible with gpl" is really just
  fear-mongering, but there's no reason not to make modsign LGPL, so
  nobody cares.  - Linus ]

Reported-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-15 13:54:21 -07:00
Huang Shijie 6584d84c3e genirq: Update the comment for generic_handle_irq_desc
__do_IRQ() was removed by commit 1c77ff2 "genirq: Remove __do_IRQ",
but the comment referring to __do_IRQ() was left.

Update the comment for generic_handle_irq_desc().

Signed-off-by: Huang Shijie <shijie.huang@arm.com>
Cc: jiang.liu@linux.intel.com
Cc: peterz@infradead.org
Cc: rafael.j.wysocki@intel.com
Cc: jason@lakedaemon.net
Cc: marc.zyngier@arm.com
Link: http://lkml.kernel.org/r/1441074950-3893-1-git-send-email-shijie.huang@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-09-15 17:06:30 +02:00