1
0
Fork 0
Commit Graph

520252 Commits (538330ccb93849530f5617d1fa870237496caa60)

Author SHA1 Message Date
Jan Kardell 538330ccb9 rtc: pcf8563 fix: return -EINVAL if we read an invalid time.
Return -EINVAL if the voltage low bit is set to avoid getting a bogus
time at boot.
There was a comment stating that util-linux hwclock refuses to set a
new time if we return an error code on read, but at least the current
version do set the time as expected. Remove the comment and the check
for valid time, and let the rtc core check it for us.

Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:40 +02:00
Hans Ulli Kroll 98a9bb5bf4 rtc: driver for Cortina Gemini
Driver for the on chip RTC found on Cortina's SoC Gemini.

Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
[alexandre.belloni@free-electrons.com: use devm_request_irq() and remove
useless goto]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:39 +02:00
Alexandre Belloni 20d048ac8b rtc: stmp3xxx select STMP_DEVICE
rtc-stmp3xxx depends on lib/stmp_device, select it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:39 +02:00
Stefan Agner 119434f44c rtc: snvs: fix wakealarm by call enable_irq_wake earlier
When entering suspend while an wakeup alarm is set, enable_set_wake
should make sure that the RTC interrupt keep being enabled and the
.irq_set_wake for the RTC interrupt get called. However, since the
driver uses the suspend_noirq callback, the call to enable_irq_wake
has been made after disabling the interrupts. While .irq_set_wake
has been called properly, the interrupt remained disabled.

Use the suspend callback to call enable_irq_wake early enough to
ensure the RTC interrupt remains enabled.

Fixes: 7654e9d4fd ("drivers/rtc/rtc-snvs: fix suspend/resume")
Cc:  <stable@vger.kernel.org> # 3.19
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:38 +02:00
Jingoo Han 6c95fa80e6 rtc: rtc-v3020: use gpio_request_array()
Using gpio_request_array()/gpio_free_array() can make the code
simpler because it can set the direction and initial value
in one shot and the for loop is unnecessary.

Also, struct v3020_gpio is removed, because the struct v3020_gpio
is replaced with struct gpio.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:38 +02:00
H Hartley Sweeten ff32ff17a0 rtc: ep93xx: Use readl/writel for io
Drivers should not be using the __raw_* io accessors.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:38 +02:00
Javier Martinez Canillas 9bde31df56 rtc: max77802: Report platform modalias to fix module autoload
If the rtc-max77802 driver is built as a module, modalias information is
not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE()
macro to export the platform ID table so the module contains that data.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:37 +02:00
Javier Martinez Canillas 2d0cca0db4 rtc: max77686: Report platform modalias to fix module autoload
If the rtc-max77686 driver is built as a module, modalias information is
not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE()
macro to export the platform ID table so the module contains that data.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:37 +02:00
Axel Lin 8ad0f5b682 rtc: ds1672, max6900, max8998: Add MODULE_DEVICE_TABLE
The device table is required to load modules based on modaliases.
After adding MODULE_DEVICE_TABLE, below entries will be added to
modules.alias:

alias i2c:ds1672 rtc_ds1672
alias i2c:max6900 rtc_max6900
alias platform:lp3974-rtc rtc_max8998
alias platform:max8998-rtc rtc_max8998

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Dale Farnsworth <dale@farnsworth.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:36 +02:00
Alexandre Belloni 9393996761 rtc: mt6397: fix build on some 32bits platforms
On some !ARM 32bits platforms, the following compilation error happens
because of the division on a 64bits value in mtk_rtc_read_time():

drivers/built-in.o: In function `mtk_rtc_read_time':
rtc-mt6397.c:(.text+0x265d13f): undefined reference to `__divdi3'
rtc-mt6397.c:(.text+0x265d150): undefined reference to `__moddi3'

Use div_s64() as done in rtc_time64_to_tm() to solve that.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:36 +02:00
Rasmus Villemoes 99c14e4df6 rtc: mc13xxx: fix obfuscated and wrong format string
According to C99, %2.s means 'print two spaces' (a precision of
. without following digits or * means 0). The kernel's printf
implementation, however, treats that case as if no precision was
given, but relying on that quirk is rather silly. Also, since no -
(aka left-justify) flag is given, the field with of 2 would then cause
the alarm->enabled case to come out as "o n". Deobfuscate it.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:35 +02:00
Eddie Huang 607b8fc90d MAINTAINERS: add Mediatek RTC driver
Add Mediatek RTC driver to maintainer entry.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:35 +02:00
Tianping Fang fc2979118f rtc: mediatek: Add MT6397 RTC driver
Add Mediatek MT6397 RTC driver

Signed-off-by: Tianping Fang <tianping.fang@mediatek.com>
Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:35 +02:00
Eddie Huang a5d7ea0912 mfd: provide RTC resource in MT6397 MFD
Provide MT6397 RTC interrupt, base address, and register in
MT6397 MFD.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:34 +02:00
Jean Delvare fdf8afa188 rtc: xgene: Set hardware dependency
The rtc-xgene driver is only useful on X-Gene SoC.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Iyappan Subramanian <isubramanian@apm.com>
Cc: Keyur Chudgar <kchudgar@apm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:34 +02:00
Hans-Christian Egtvedt 3090ac0abc rtc: at32ap700x: update author email
This patch updates the email address of the rtc-at32ap700x driver supported by
me to an email account I will use on a more regular basis in the future.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:12:50 +02:00
Juergen Borleis 9bb698c60a rtc: imxdi: when locked, do not fail silently
If the DryICE unit is locked it is impossible to set the time. Provide an
error message for this case.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Robert Schwebel <rsc@pengutronix.de>
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:21 +02:00
Juergen Borleis a7c535e3a8 rtc: imxdi: monitor a security violation at runtime
Maybe the unit enters the hardware related state at runtime and not at
system boot time (after a power cycle).

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Robert Schwebel <rsc@pengutronix.de>
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:21 +02:00
Juergen Borleis c7e9bbe022 rtc: imxdi: add the unit recovery code
This code is required to recover the unit from a security violation.
Hopefully this code can recover the unit from a hardware related invalid
state as well.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Robert Schwebel <rsc@pengutronix.de>
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:21 +02:00
Juergen Borleis 3ba3fab765 rtc: imxdi: add some background info about the states the machine can be in
Document the i.MX DryIce machine states.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Robert Schwebel <rsc@pengutronix.de>
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:21 +02:00
Juergen Borleis e30d31317b rtc: imxdi: avoid the __raw* register access functions
Be independent of the endianness of the kernel.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
Krzysztof Kozlowski a42e6eae45 rtc: s3c: Integrate Exynos3250 into S3C6410
There are now no differences between RTC on Exynos3250 and S3C6410.
Merge everything into one so duplicated code could be removed.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
Krzysztof Kozlowski 73744a64aa rtc: interface: Remove unused return value from rtc_timer_cancel()
The rtc_timer_cancel() always returns 0 and cannot fail (calls only
other void-returning functions).

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
Krzysztof Kozlowski 1796dcce2d rtc: interface: Fix coding style violations
Fix issues reported by checkpatch:
  ERROR: open brace '{' following struct go on the same line
  ERROR: "foo* bar" should be "foo *bar"
Additionally adjust alignment of wrapped function arguments.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
Krzysztof Kozlowski cd6ba00aaa rtc: mxc: Constify platform_device_id
The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
Krzysztof Kozlowski 19fd685fcb rtc: hid-sensor-time: Constify platform_device_id
The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
Krzysztof Kozlowski 9a72f4104b rtc: ab8500: Constify platform_device_id
The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
dann frazier 37563e5ec4 rtc: efi: Update author email address
I'm no longer employed by HP.

Signed-off-by: dann frazier <dannf@dannf.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-19 20:03:20 +02:00
Linus Torvalds 0f57d86787 Linux 4.1-rc8 2015-06-14 15:51:10 -10:00
Linus Torvalds b86a7563ca Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine fixes from Vinod Koul:
 "Here are hopefully last set of fixes for 4.1. This time we have:

   - fixing pause capability reporting on both dmaengine pause & resume
     support by Krzysztof

   - locking fix fir at_xdmac by Ludovic

   - slave configuration fix for at_xdmac by Ludovic"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: Fix choppy sound because of unimplemented resume
  dmaengine: at_xdmac: rework slave configuration part
  dmaengine: at_xdmac: lock fixes
2015-06-14 15:48:26 -10:00
Linus Torvalds dc75117fa2 NTB bug fixes to address issues in unmapping the MW reg base and vbase,
and an uninitialized variable on Atom platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVfOwRAAoJEG5mS6x6i9Iju+AP/AnoDxaTpOCoakZnMmAi2q1n
 R02OqvCthDtwhOQ7oQKJK03W536Z8zdQ4M80T26zr35lhBt7Q4Yxz2fgwfnYPCQY
 A/ewLpDqGtPKn/l+kbjfMlWZ3UP5CUqIJtyRMjIx13/mAznDhDR5XBj0Je+Vr/aL
 kJPZa6JjR7RrDAgGhL80epKKsFu5vj1OeQnC3gXe2YFQzMTc+7fDr1NQOdjm94rK
 qjv4Yz2aJbuvm35lI4iNlIieIRY9/ilGXQ7At/IZPqOSZLnJ4eyGDAyoeEBqeqe6
 bJDnfvCa6JEoZLo3NH+OCs3Q2gb4ml7GjB+l7scRzZkF6DmypXoEWPzJdUyFtfav
 Lb9VqUP6+jWW3wAQhVc+VKJtoKQ4To6yPC9HH+3zfFAS0J9m4uCsBnkWvJiAhXdA
 qvt5qPW88DsKwBkphMJ8kXI1Q2imAD7hB0IYxn/CbuxVzill3MkAu7UkBtuW8o2p
 KUnG1L4xlq+vv1moM0WIoamc3zSvaz6Td6aqv9KzRXel8PzpWq7QRPVfqBwTQ7rd
 ouVm5ib73lkx7AelRhwN5QYsdi9YsQ0CjwdsmIFbME6EXv+fJpikVp5Q39CYHeCv
 b1ShfERfxZ5L3/7fAA9UmwvL4hAvvewgWKfxuzz6GRphks4H6uzYNoybSkKIaKqz
 IDa9xAxzFkOKu05mGTM3
 =L59Q
 -----END PGP SIGNATURE-----

Merge tag 'ntb-4.1' of git://github.com/jonmason/ntb

Pull NTB fixes from Jon Mason:
 "I apologize for the tardiness of this request.  Here are a couple of
  last minute NTB bug fixes for v4.1:

  NTB bug fixes to address issues in unmapping the MW reg base and
  vbase, and an uninitialized variable on Atom platforms"

* tag 'ntb-4.1' of git://github.com/jonmason/ntb:
  ntb: initialize max_mw for Atom before using it
  ntb: iounmap MW reg and vbase in error path
2015-06-14 15:46:43 -10:00
Linus Torvalds 1f1e34f723 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull more MIPS fixes from Ralf Baechle:
 "Another round of 4.1 MIPS fixes, one fix to a MIPS-specific #if
  condition in lib/mpi, one fix to the MIPS GIC irqchip driver and one
  SSB fix.

  Details:
   - fix handling of clock in chipco SSB driver.
   - fix two MIPS-specific #if conditions to correctly work for GCC 5.1.
   - fix damage to R6 pgtable bits done by XPA support.
   - fix possible crash due to unloading modules that contain statically
     defined platform devices.
   - fix disabling of the MSA ASE on context switch to also work
     correctly when a new thread/process has the CPU for the very first
     time.

  This is part of linux-next and has been beaten to death on
  Imagination's test farm.

  While things are not looking too grim this pull request also means the
  rate of fixes for 4.1 remains nearly constant so I'd not be unhappy if
  you'd delay the release"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MPI: MIPS: Fix compilation error with GCC 5.1
  IRQCHIP: mips-gic: Don't nest calls to do_IRQ()
  MIPS: MSA: bugfix - disable MSA correctly for new threads/processes.
  MIPS: Loongson: Do not register 8250 platform device from module.
  MIPS: Cobalt: Do not build MTD platform device registration code as module.
  SSB: Fix handling of ssb_pmu_get_alp_clock()
  MIPS: pgtable-bits: Fix XPA damage to R6 definitions.
2015-06-14 15:38:57 -10:00
Linus Torvalds baaae19210 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irqchip fix from Thomas Gleixner:
 "A single fix for an off by one bug in the sunxi irqchip driver"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: sunxi-nmi: Fix off-by-one error in irq iterator
2015-06-14 14:53:02 -10:00
Linus Torvalds 5bd2c2867f Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull lockdep fix from Ingo Molnar:
 "A lockdep/modules unload race fix that can oops"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  lockdep: Fix a race between /proc/lock_stat and module unload
2015-06-14 14:03:11 -10:00
Linus Torvalds d37479aac5 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
 "A regression fix for a crash, and a Intel HSW uncore PMU driver fix"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  Revert "perf/x86/intel/uncore: Move uncore_box_init() out of driver initialization"
  perf/x86/intel/uncore: Fix CBOX bit wide and UBOX reg on Haswell-EP
2015-06-14 14:00:13 -10:00
Linus Torvalds 2fbbada1e1 sound fixes for 4.1-rc8
Most of commits are regression fixes for HD-audio: a few corner case
 fixes for regmap transition, and i915 binding issues.  In addition, a
 quirk for another USB-audio device supporting DSD.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVe9w3AAoJEGwxgFQ9KSmkTH0QAIlkMssrw4bsxiBcEXb56Gvc
 s6Q4gj1s9sO0STtlAe77dtBJ9B6Ei74aD8gULlvPX2xrfT4pWJn9Ioj6BGNEyR9w
 OiPw+XzS1n3i3D6rwmP514Cau5M04qahF6EIzb+Lc23BIbrKI7qXacZCWYbSpcD6
 5q3Iq0iVqqTv3pxO/WpL1+6XR2SBbhwcXvsuoYAUcDxnWYsh0D+RJelng4c4UU0J
 5DvshRPgjGFBXmo1pbooO4FOATUAnlJ6NJw7GsttD58nHvz481qhu8sAJa4F2vXa
 6qEv43HseXSF5CvetPA6X0ml/UnhRT3ie8jgM/F8DT9rOlutERWw5YQpETBEZWFv
 ybn1ARQ93Z9aKETfr5otXLmimePqIBqIzKOCcqgmpimX74sF3vQYMtPQz4AnRmbI
 WO7tYD5lUn4+pgh3u23aAWDqhBi8NABskcTyMI5gjotV0aV2eW0+bj10mEMitx7z
 Ni5fTCrKWB2tpnBGmyiZyo+/960yfRAySHXCQtH+pxdiBUqJCCvPj5Afx+r/XrIW
 rtOpuTaIyjieIbLV4efKzGaQC2EfO9Oke+ahicUsuSW9+kpiPzGM2Ywhi6gEg8lA
 4319ygC5J6CCF1OMBTA+D/3r1Rn9+0e99ke9haxUZImcMn7ryoDUIHNmP5SY2nay
 4xdSgr4NnlCKp37OUosD
 =jSb0
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Most of commits are regression fixes for HD-audio: a few corner case
  fixes for regmap transition, and i915 binding issues.

  In addition, a quirk for another USB-audio device supporting DSD"

* tag 'sound-4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Abort the probe without i915 binding for HSW/BDW
  ALSA: hda - Re-add the lost fake mute support
  ALSA: hda - Continue probing even if i915 binding fails
  ALSA: hda - Don't actually write registers for caps overwrites
  ALSA: hda - fix number of devices query on hotplug
  ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB
2015-06-14 13:55:24 -10:00
Jaedon Shin 36f5811342 MPI: MIPS: Fix compilation error with GCC 5.1
This patch fixes mips compilation error:

lib/mpi/generic_mpih-mul1.c: In function 'mpihelp_mul_1':
lib/mpi/longlong.h:651:2: error: impossible constraint in 'asm'

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/10546/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-06-13 11:36:41 +02:00
Rabin Vincent 1b3ed367ce IRQCHIP: mips-gic: Don't nest calls to do_IRQ()
The GIC chained handlers use do_IRQ() to call the subhandlers.  This
means that irq_enter() calls get nested, which leads to preempt count
looking like we're in nested interrupts, which in turn leads to all
system time being accounted as IRQ time in account_system_time().

Fix it by using generic_handle_irq().  Since these same functions are
used in some systems (if cpu_has_veic) from a low-level vectored
interrupt handler which does not go throught do_IRQ(), we need to do it
conditionally.

Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: tglx@linutronix.de
Cc: jason@lakedaemon.net
Patchwork: https://patchwork.linux-mips.org/patch/10545/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-06-13 11:33:00 +02:00
Linus Torvalds c8d17b451a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Fix uninitialized struct station_info in cfg80211_wireless_stats(),
    from Johannes Berg.

 2) Revert commit attempt to fix ipv6 protocol resubmission, it adds
    regressions.

 3) Endless loops can be created in bridge port lists, fix from Nikolay
    Aleksandrov.

 4) Don't WARN_ON() if sk->sk_forward_alloc is non-zero in
    sk_clear_memalloc, it is a legal situation during swap deactivation.
    Fix from Mel Gorman.

 5) Fix order of disabling interrupts and unlocking NAPI in enic driver
    to avoid a race.  From Govindarajulu Varadarajan.

 6) High and low register writes are swapped when programming the start
    of periodic output in igb driver.  From Richard Cochran.

 7) Fix device rename handling in mpls stack, from Robert Shearman.

 8) Do not trigger compaction synchronously when optimistically trying
    to allocate an order 3 page in alloc_skb_with_frags() and
    skb_page_frag_refill().  From Shaohua Li.

 9) Authentication with COOKIE_ECHO is not handled properly in SCTP, fix
    from Marcelo Ricardo Leitner.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  Doc: networking: Fix URL for wiki.wireshark.org in udplite.txt
  sctp: allow authenticating DATA chunks that are bundled with COOKIE_ECHO
  net: don't wait for order-3 page allocation
  mpls: handle device renames for per-device sysctls
  net: igb: fix the start time for periodic output signals
  enic: fix memory leak in rq_clean
  enic: check return value for stat dump
  enic: unlock napi busy poll before unmasking intr
  net, swap: Remove a warning and clarify why sk_mem_reclaim is required when deactivating swap
  bridge: fix multicast router rlist endless loop
  tipc: disconnect socket directly after probe failure
  Revert "ipv6: Fix protocol resubmission"
  cfg80211: wext: clear sinfo struct before calling driver
2015-06-12 20:54:16 -10:00
Masanari Iida b07d496177 Doc: networking: Fix URL for wiki.wireshark.org in udplite.txt
This patch fix URL (http to https) for wiki.wireshark.org.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-12 14:21:29 -07:00
Marcelo Ricardo Leitner ae36806a62 sctp: allow authenticating DATA chunks that are bundled with COOKIE_ECHO
Currently, we can ask to authenticate DATA chunks and we can send DATA
chunks on the same packet as COOKIE_ECHO, but if you try to combine
both, the DATA chunk will be sent unauthenticated and peer won't accept
it, leading to a communication failure.

This happens because even though the data was queued after it was
requested to authenticate DATA chunks, it was also queued before we
could know that remote peer can handle authenticating, so
sctp_auth_send_cid() returns false.

The fix is whenever we set up an active key, re-check send queue for
chunks that now should be authenticated. As a result, such packet will
now contain COOKIE_ECHO + AUTH + DATA chunks, in that order.

Reported-by: Liu Wei <weliu@redhat.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-12 14:18:20 -07:00
Linus Torvalds b85dfd30cb Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
 "Remember about a week ago when I sent the last pull request for 4.1?
  Well, I lied.  Now, I don't want to shift the blame, but Dan, Ming,
  and Richard made a liar out of me.

  Here are three small patches that should go into 4.1.  More
  specifically, this pull request contains:

   - A Kconfig dependency for the pmem block driver, so it can't be
     selected if HAS_IOMEM isn't availble.  From Richard Weinberger.

   - A fix for genhd, making the ext_devt_lock softirq safe.  This makes
     lockdep happier, since we also end up grabbing this lock on release
     off the softirq path.  From Dan Williams.

   - A blk-mq software queue release fix from Ming Lei.

  Last two are headed to stable, first fixes an issue introduced in this
  cycle"

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: pmem: Add dependency on HAS_IOMEM
  block: fix ext_dev_lock lockdep report
  blk-mq: free hctx->ctxs in queue's release handler
2015-06-12 11:35:19 -07:00
Linus Torvalds 7b565d9d1f Three more md fixes for 4.1
The main issue fixed here is a rare race which can result in two reshape
 threads running at once, which doesn't end well.
 Also a minor issue with a write to a sysfs file returning the wrong value.
 Backports to 4.0-stable are indicated.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIVAwUAVXqxoTnsnt1WYoG5AQKSOQ//d1WMgHfdoLAZgrFCTinicVAyvFkUiAc0
 mchXE3XyjbU6D9BWNA4YDV4hqhCixYMyv9kQjFPQMsjQDySzXpxqPwZdLLEg2PTZ
 ND6xdtWa4w+28dI9UxofEy63M3msYY7LCX9ds8g0Y4/lVoqQ+6E9eLUwrfGTy8jw
 SgM8LB5Lli/izGDkrIgQ4XyFQdAe1Pa57dqJs5SeQGeW+3s1lV0lVsDZjlQPgQFE
 tBFGvTl0SBao1gE+KqB8xWmn0g7cy644q+upSvRYblpfyyQpoZjx9QJGxZQdB/3u
 +RY2B9WZ8PG7qyz+gfjnEXOzZK977GkEdHDq/tQpv/s64CXmFg3DUjp+J4A9lvpj
 HBdgLoWk4iKBTrHs9YKgqsWXqA7xES+zs+9qY89wZBd8J6lWjq7MoWX/TDjDSL0G
 ehRf2qZ05ngsJAlBeyvKbI5h59xc6G8NYAoevYjRGNdkHBEkE1MRRlWDmC0sH9sn
 8N4U9u+gU8Fvzh98DEpTrJRIXiQB62wzLWFb3AQfd30C3ZXQ36eRIXn1I6apRxpR
 1zOYJjoNgBPczxh//WVFt7sw56DlI4kGBFviLdv1QiTyJhgXs6wk3o8FOmL0e8CE
 LElpP3gV9qR+XlJNSM4zKdsLbh1/AJ+SD1jKP0zwLJW74DgGAyUgaIc+/qYR5OSb
 hWjGRQwY8Sg=
 =wj1j
 -----END PGP SIGNATURE-----

Merge tag 'md/4.1-rc7-fixes' of git://neil.brown.name/md

Pull three more md fixes from Neil Brown:
 "Hasn't been a good cycle for md has it :-(

  The main issue fixed here is a rare race which can result in two
  reshape threads running at once, which doesn't end well.

  Also a minor issue with a write to a sysfs file returning the wrong
  value.  Backports to 4.0-stable are indicated"

* tag 'md/4.1-rc7-fixes' of git://neil.brown.name/md:
  md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync
  md: Close race when setting 'action' to 'idle'.
  md: don't return 0 from array_state_store
2015-06-12 11:33:03 -07:00
Linus Torvalds c39f3bc659 Merge git://git.infradead.org/intel-iommu
Pull VT-d hardware workarounds from David Woodhouse:
 "This contains a workaround for hardware issues which I *thought* were
  never going to be seen on production hardware.  I'm glad I checked
  that before the 4.1 release...

  Firstly, PASID support is so broken on existing chips that we're just
  going to declare the old capability bit 28 as 'reserved' and change
  the VT-d spec to move PASID support to another bit.  So any existing
  hardware doesn't support SVM; it only sets that (now) meaningless bit
  28.

  That patch *wasn't* imperative for 4.1 because we don't have PASID
  support yet.  But *even* the extended context tables are broken — if
  you just enable the wider tables and use none of the new bits in them,
  which is precisely what 4.1 does, you find that translations don't
  work.  It's this problem which I thought was caught in time to be
  fixed before production, but wasn't.

  To avoid triggering this issue, we now *only* enable the extended
  context tables on hardware which also advertises "we have PASID
  support and we actually tested it this time" with the new PASID
  feature bit.

  In addition, I've added an 'intel_iommu=ecs_off' command line
  parameter to allow us to disable it manually if we need to"

* git://git.infradead.org/intel-iommu:
  iommu/vt-d: Only enable extended context tables if PASID is supported
  iommu/vt-d: Change PASID support to bit 40 of Extended Capability Register
2015-06-12 11:28:57 -07:00
David Woodhouse c83b2f20fd iommu/vt-d: Only enable extended context tables if PASID is supported
Although the extended tables are theoretically a completely orthogonal
feature to PASID and anything else that *uses* the newly-available bits,
some of the early hardware has problems even when all we do is enable
them and use only the same bits that were in the old context tables.

For now, there's no motivation to support extended tables unless we're
going to use PASID support to do SVM. So just don't use them unless
PASID support is advertised too. Also add a command-line bailout just in
case later chips also have issues.

The equivalent problem for PASID support has already been fixed with the
upcoming VT-d spec update and commit bd00c606a ("iommu/vt-d: Change
PASID support to bit 40 of Extended Capability Register"), because the
problematic platforms use the old definition of the PASID-capable bit,
which is now marked as reserved and meaningless.

So with this change, we'll magically start using ECS again only when we
see the new hardware advertising "hey, we have PASID support and we
actually tested it this time" on bit 40.

The VT-d hardware architect has promised that we are not going to have
any reason to support ECS *without* PASID any time soon, and he'll make
sure he checks with us before changing that.

In the future, if hypothetical new features also use new bits in the
context tables and can be seen on implementations *without* PASID support,
we might need to add their feature bits to the ecs_enabled() macro.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2015-06-12 11:31:25 +01:00
NeilBrown ea358cd0d2 md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync
MD_RECOVERY_DONE is normally cleared by md_check_recovery after a
resync etc finished.  However it is possible for raid5_start_reshape
to race and start a reshape before MD_RECOVERY_DONE is cleared.  This
can lean to multiple reshapes running at the same time, which isn't
good.

To make sure it is cleared before starting a reshape, and also clear
it when reaping a thread, just to be safe.

Signed-off-by: NeilBrown  <neilb@suse.de>
2015-06-12 20:16:33 +10:00
NeilBrown 8e8e2518fc md: Close race when setting 'action' to 'idle'.
Checking ->sync_thread without holding the mddev_lock()
isn't really safe, even after flushing the workqueue which
ensures md_start_sync() has been run.

While this code is waiting for the lock, md_check_recovery could reap
the thread itself, and then start another thread (e.g. recovery might
finish, then reshape starts).  When this thread gets the lock
md_start_sync() hasn't run so it doesn't get reaped, but
MD_RECOVERY_RUNNING gets cleared.  This allows two threads to start
which leads to confusion.

So don't both if MD_RECOVERY_RUNNING isn't set, but if it is do
the flush and the test and the reap all under the mddev_lock to
avoid any race with md_check_recovery.

Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: 6791875e2e ("md: make reconfig_mutex optional for writes to md sysfs files.")
Cc: stable@vger.kernel.org (v4.0+)
2015-06-12 20:16:26 +10:00
NeilBrown c008f1d356 md: don't return 0 from array_state_store
Returning zero from a 'store' function is bad.
The return value should be either len length of the string
or an error.

So use 'len' if 'err' is zero.

Fixes: 6791875e2e ("md: make reconfig_mutex optional for writes to md sysfs files.")
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@vger.kernel (v4.0+)
2015-06-12 20:16:16 +10:00
Krzysztof Kozlowski 88d04643c6 dmaengine: Fix choppy sound because of unimplemented resume
Some drivers implement only pause operation (no resuming). Example is
pl330 where pause is needed for getting residuum. pl330 does not support
resume operation, transfer must be stopped after pause.

However for slaves this is exposed always as "pause and resume" which
introduces subtle errors on Odroid U3 board (Exynos4412 with pl330).
After adding pause function to pl330 driver the audio playback
(utilizing DMA) gets choppy after some time (approximately 24 hours).

Fix this by exposing "cmd_pause" if and only if pause and resume are
implemented.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: gabriel@unseen.is
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: <stable@vger.kernel.org>
Fixes: 88987d2c75 ("dmaengine: pl330: add DMA_PAUSE feature")
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2015-06-12 15:22:26 +05:30
Takashi Iwai 535115b5ff ALSA: hda - Abort the probe without i915 binding for HSW/BDW
The previous patch tried to continue the probe if i915 binding fails.
For for simplicity reason, we haven't implemented abort even for
controller chips that are dedicated for HDMI/DP on HSW and BDW.
However, Mengdong suggested that this can be dangerous; BIOS may
disable gfx power well although the PCI entry for HD-audio is left,
and this may result in the unexpected behavior, kernel errors, etc.

For avoiding this situation, abort the probe at i915 binding failure
only for HSW/BDW chips selectively.  For other chips, it still
continues.

Fixes: bf06848bdb ('ALSA: hda - Continue probing even if i915 binding fails')
Reported-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-12 08:05:02 +02:00