`config' is freed and is then used in the rtc_device_unregister() call,
causing a kernel panic.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Reviewed-by: Viresh Kumar <viresh.linux@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The update of the hrtimer base offsets on all cpus cannot be made
atomically from the timekeeper.lock held and interrupt disabled region
as smp function calls are not allowed there.
clock_was_set(), which enforces the update on all cpus, is called
either from preemptible process context in case of do_settimeofday()
or from the softirq context when the offset modification happened in
the timer interrupt itself due to a leap second.
In both cases there is a race window for an hrtimer interrupt between
dropping timekeeper lock, enabling interrupts and clock_was_set()
issuing the updates. Any interrupt which arrives in that window will
see the new time but operate on stale offsets.
So we need to make sure that an hrtimer interrupt always sees a
consistent state of time and offsets.
ktime_get_update_offsets() allows us to get the current monotonic time
and update the per cpu hrtimer base offsets from hrtimer_interrupt()
to capture a consistent state of monotonic time and the offsets. The
function replaces the existing ktime_get() calls in hrtimer_interrupt().
The overhead of the new function vs. ktime_get() is minimal as it just
adds two store operations.
This ensures that any changes to realtime or boottime offsets are
noticed and stored into the per-cpu hrtimer base structures, prior to
any hrtimer expiration and guarantees that timers are not expired early.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1341960205-56738-8-git-send-email-johnstul@us.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
To finally fix the infamous leap second issue and other race windows
caused by functions which change the offsets between the various time
bases (CLOCK_MONOTONIC, CLOCK_REALTIME and CLOCK_BOOTTIME) we need a
function which atomically gets the current monotonic time and updates
the offsets of CLOCK_REALTIME and CLOCK_BOOTTIME with minimalistic
overhead. The previous patch which provides ktime_t offsets allows us
to make this function almost as cheap as ktime_get() which is going to
be replaced in hrtimer_interrupt().
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Link: http://lkml.kernel.org/r/1341960205-56738-7-git-send-email-johnstul@us.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
We need to update the base offsets from this code and we need to do
that under base->lock. Move the lock held region around the
ktime_get() calls. The ktime_get() calls are going to be replaced with
a function which gets the time and the offsets atomically.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Link: http://lkml.kernel.org/r/1341960205-56738-6-git-send-email-johnstul@us.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
We need to update the hrtimer clock offsets from the hrtimer interrupt
context. To avoid conversions from timespec to ktime_t maintain a
ktime_t based representation of those offsets in the timekeeper. This
puts the conversion overhead into the code which updates the
underlying offsets and provides fast accessible values in the hrtimer
interrupt.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1341960205-56738-4-git-send-email-johnstul@us.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The timekeeping code misses an update of the hrtimer subsystem after a
leap second happened. Due to that timers based on CLOCK_REALTIME are
either expiring a second early or late depending on whether a leap
second has been inserted or deleted until an operation is initiated
which causes that update. Unless the update happens by some other
means this discrepancy between the timekeeping and the hrtimer data
stays forever and timers are expired either early or late.
The reported immediate workaround - $ data -s "`date`" - is causing a
call to clock_was_set() which updates the hrtimer data structures.
See: http://www.sheeri.com/content/mysql-and-leap-second-high-cpu-and-fix
Add the missing clock_was_set() call to update_wall_time() in case of
a leap second event. The actual update is deferred to softirq context
as the necessary smp function call cannot be invoked from hard
interrupt context.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1341960205-56738-3-git-send-email-johnstul@us.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clock_was_set() cannot be called from hard interrupt context because
it calls on_each_cpu().
For fixing the widely reported leap seconds issue it is necessary to
call it from hard interrupt context, i.e. the timer tick code, which
does the timekeeping updates.
Provide a new function which denotes it in the hrtimer cpu base
structure of the cpu on which it is called and raise the hrtimer
softirq. We then execute the clock_was_set() notificiation from
softirq context in run_hrtimer_softirq(). The hrtimer softirq is
rarely used, so polling the flag there is not a performance issue.
[ tglx: Made it depend on CONFIG_HIGH_RES_TIMERS. We really should get
rid of all this ifdeffery ASAP ]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1341960205-56738-2-git-send-email-johnstul@us.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Pull arch/tile fix from Chris Metcalf:
"This is a single change to fix backtracing in big-endian mode."
* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: big-endian: properly bswap instruction bundles when backtracing
This is a set of three fixes for data corruption (libsas task file), oops
causing (NULL in scsi_cmd_to_driver) and driver failure (bnx2i). The oops
caused by the NULL in scsi_cmd_to_driver() manifests in scsi_eh_send_cmd() and
has been seen by several people now.
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQEcBAABAgAGBQJP/S5TAAoJEDeqqVYsXL0MM2EIAMQrBUamIjML5tiKwwD7zZsc
GBNPLFD2PJNvzaRweENU+CwbHYc7ipt9FMHC89dlOR4vStKR/7nxUOnH2c/pnogM
bbU2JCP0iG4IxU8+kcNBKCmysyu5xdd5kh0NOmwMSQrQVlTdfZz4iFXMPtGrK8H6
vfm5w2Y6HUJEXMgmfohDurvLK3L8GvO7E1tKzEJhmfZZqtqnt5vk++tZKCpqf1lH
et29y6Ic+daxHgEBR1gCp11Ywike7e01BJPNnTvpX4XV+E+L7fEDwl2Mb7Rsslh1
L61m4JkR9nDSSH8jD7oqUUlbkx+XTe31M/jj9jiLu0tCxIDgOFFcn6KziM1qINI=
=Ir0I
-----END PGP SIGNATURE-----
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a set of three fixes for data corruption (libsas task file),
oops causing (NULL in scsi_cmd_to_driver) and driver failure (bnx2i).
The oops caused by the NULL in scsi_cmd_to_driver() manifests in
scsi_eh_send_cmd() and has been seen by several people now.
Signed-off-by: James Bottomley <JBottomley@Parallels.com>"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] bnx2i: Removed the reference to the netdev->base_addr
[SCSI] libsas: fix taskfile corruption in sas_ata_qc_fill_rtf
[SCSI] Fix NULL dereferences in scsi_cmd_to_driver
Do not use MX2_CAMERA_SWAP16 and MX2_CAMERA_PACK_DIR_MSB flags. The driver
must negotiate with the attached sensor whether the mbus format is UYUV or
YUYV and set CSICR1 configuration accordingly.
This is needed for the video function on mach-imx27_visstrim_m10.c to
perform properly, since an earlier version of this patch has been proven
wrong and has been reverted and a commit, depending on it: "[media]
i.MX27: visstrim_m10: Remove use of MX2_CAMERA_SWAP16" is in the mainline.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[ g.liakhovetski@gmx.de: move a macro definition to a more logical place ]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
[ Applying directly because Mauro is on vacation - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* multiple omap2+ bug fixes
* a regression on ux500 dt support
* a build failure on shmobile
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIVAwUAT/3SwWCrR//JCVInAQIlEQ//a9f4CGJAdRFtoRwCj0C24i6n8PVJF+23
DWHuQ+xLBJqlex5tC8I3CJUBCAO7p432/C5OeTsE1sJcYK5GnEbolHd+nLWLsSqP
l8NO9Pw4C98vpBMrIiPM+AiE6RCsYK04su0FoS0RftCchzg9ZursdJUDP2Tlwu6i
lAFCsZTlM66J5h0OelSDO8aTL9VuaFjYWrNXOBjwkJiEGzZo9Adw8fY7ekttLZoV
oQRKB8jFyGvc5ih1h4WdM/J5VyY1NWkRW1VDaxLXfJlvRuD7gIpOA5v2whanVjAd
xmJnrLpE5tadtvxJRzUKDtlIQkw/ZoCzGrJfl7EhSbZYzlu7qiLq9HeRs6/t5odU
AnX69qGQoLU+ARdp6DdG3EpqPc1EEyjLMaU6Los8ZjWrkPRhG6kn6iRe4LRwxRS3
7RcP8fDeAUUSBZCfAK1FRdD9xSNQB5yt1KJsjYLfKoLWehXzAMOytWeKEJ2rJzZ/
1/rCfTDfB+Sq8GtbHGj86bv/7cZN3+seu7fNGackfOmQEKRX363SB2T5P9xjnZ5E
K+44W71BLPT9yYZ/pQ8f6V6f/wRDeE15IMD2PLghouAXJxGtx2upOshCMkUHl9RE
PmcLLev8qulU8UI5sPsuWZsiCPVt6ujHLDqUrk7SN7rf+Emc+Rf9roDVJcYIrqwI
Om7AtQwKgVQ=
=35LO
-----END PGP SIGNATURE-----
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Arnd Bergmann:
- multiple omap2+ bug fixes
- a regression on ux500 dt support
- a build failure on shmobile
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: OMAP2+: omap2plus_defconfig: EHCI driver is not stable, disable it
ARM: shmobile: fix platsmp.c build when ARCH_SH73A0=n
ARM: ux500: Over-ride the DT device naming scheme for pinctrl
ARM: ux500: Fix build errors/warnings when MACH_UX500_DT is not set
of: address: Don't fail a lookup just because a node has no reg property
ARM: OMAP2+: hwmod code/clockdomain data: fix 32K sync timer
This removes ACPICA code that had been removed once from the kernel
already by commit 2780cc4660e1 ([ACPI] Fix suspend/resume lockup
issue by leaving Bus Master Arbitration enabled.), because it was
known to cause systems to lock up during resume from suspend, but was
re-introduced by mistake during the v3.4 merge window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQIcBAABAgAGBQJP/bXmAAoJEKhOf7ml8uNscr8P/3TFaFF7VpwPAZ6KAwqRDB/t
JAKzPW5T7a9qmGWMdLaCwRKuqzDFwygbYbYjNK5YN/r/9clULEKuy3Gwfx9pq0w5
yPsPn3V4Bk3BmhAHwf6VnRiGu6Gxm0c6VKTnZL1PpOBmiKuFR1eYZglsbbzQ/FTy
HSBKLyaxIJaeBvDab72ox/jDJoR+FTVhv1RzbMmKyq6xJzkbJID1co8E4pbxZZTS
Cl5oH/Nt15jCwf2Np4au/76Gkdc6Ql7yjLw3147+iVbX07jhsKxlRL4a7gYmuNAd
mJA3Qy8lFXjRsRHTArEFjfjij4ccrq35kjbUMS68udvAT3cS12HEeq2vf7dnV02y
N4blGwJOa76CRXbtNvyAAYyyfZGz5SK3OFLk4Eusj5Gp7zS6TH8hZco7h1lwNKwg
xxM4Y6vRJ1hlRbIo59zF9qP2exhGC7HTAvMu5YTcb4rsJ3AzpdHCDJM+t77O5gPi
nzjuIh4ze1gjR6wBhS90tPW5n8iKKlo5SXLd0QdI/0VMlnoe10KZvIKghbtuLtdU
hXxo+JdHySHjiK13IMTEXd+8H108Tf/dFqhBdbwW0DwVQ7qucN29WS4z6N7tkLmL
UKb1q5TLrEiAs+DyWYGK3gXGNtZtPPRIIHfcZiu0+4hXfMn3v67KaYGfXgFkhz2e
8oog2ibIs0Jcwfzld/u2
=GTCj
-----END PGP SIGNATURE-----
Merge tag 'pm-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki:
"This removes ACPICA code that had already been removed once from the
kernel already by commit 2780cc4660e1 ("[ACPI] Fix suspend/resume
lockup issue by leaving Bus Master Arbitration enabled"), because it
was known to cause systems to lock up during resume from suspend, but
was re-introduced by mistake during the v3.4 merge window."
* tag 'pm-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / PM: Leave Bus Master Arbitration enabled for suspend/resume
Here are some more printk fixes for 3.5-rc6. They resolve all known
outstanding issues with the printk changes that have been happening. They have
been tested by the people reporting the problems.
This hopefully should be it for the printk stuff for 3.5-final.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iEYEABECAAYFAk/9g5IACgkQMUfUDdst+ykGRgCgsLQ+ltx2CExSNZ29Z9OVi1cW
KFAAoMmZCJkrj7gyCX4Y/UZ7qa+iYm7T
=nVVT
-----END PGP SIGNATURE-----
Merge tag 'driver-core-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull printk fixes from Greg Kroah-Hartman:
"Here are some more printk fixes for 3.5-rc6. They resolve all known
outstanding issues with the printk changes that have been happening.
They have been tested by the people reporting the problems.
This hopefully should be it for the printk stuff for 3.5-final.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'driver-core-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
kmsg: merge continuation records while printing
kmsg: /proc/kmsg - support reading of partial log records
kmsg: make sure all messages reach a newly registered boot console
kmsg: properly handle concurrent non-blocking read() from /proc/kmsg
kmsg: add the facility number to the syslog prefix
kmsg: escape the backslash character while exporting data
printk: replacing the raw_spin_lock/unlock with raw_spin_lock/unlock_irq
Here are a few fixes and new device ids for the 3.5-rc6 tree.
The PCI changes resolve a long-standing issue with resuming some EHCI
controllers. It has been acked by the PCI maintainer, and he asked for it to
go through my USB tree instead of his.
The xhci patches also resolve a number of reported issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iEYEABECAAYFAk/9hDgACgkQMUfUDdst+yk7KACg1/6PU/Zni57kEvjypRmbMF66
SHoAoKdR7HFUvfgnq/HbUVlAC5sM+AJH
=zxcV
-----END PGP SIGNATURE-----
Merge tag 'usb-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg Kroah-Hartman:
"Here are a few fixes and new device ids for the 3.5-rc6 tree.
The PCI changes resolve a long-standing issue with resuming some EHCI
controllers. It has been acked by the PCI maintainer, and he asked
for it to go through my USB tree instead of his.
The xhci patches also resolve a number of reported issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
PCI: EHCI: fix crash during suspend on ASUS computers
USB: cdc-wdm: fix lockup on error in wdm_read
USB: metro-usb: fix tty_flip_buffer_push use
USB: option: Add MEDIATEK product ids
USB: option: add ZTE MF60
xhci: Fix hang on back-to-back Set TR Deq Ptr commands.
usb: Add support for root hub port status CAS
Here's a single MEI driver fix that resolves a regression from 3.4 that a
number of people have reported (and sent to me in different patches.)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iEYEABECAAYFAk/9hLcACgkQMUfUDdst+ynJtACgma4xNMliCdnjYf8mVJTTyJkU
JEkAn13elEqsx86p8hJqDt1QaKxfavtA
=fG3X
-----END PGP SIGNATURE-----
Merge tag 'char-misc-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull misc fix from Greg Kroah-Hartman:
"Here's a single MEI driver fix that resolves a regression from 3.4
that a number of people have reported (and sent to me in different
patches.)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'char-misc-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
mei: pci_resume: set IRQF_ONESHOT for msi request_threaded_irq
- Invalid context restore on bank 0 for OMAP driver in
runtime suspend/resume cycle
- Check for NULL platform data in sta-2x11 driver
- Constrain selection of the V1 MSM GPIO driver to applicable
platforms (Kconfig issue)
- Make sure the correct output value is set in the wm8994 driver
- Export devm_gpio_request_one() so it can be used in modules.
Apparently some in-kernel modules can be configured to use this
leading to breakage.
- Check that the GPIO is valid in the lantiq driver
- Fix the flag bits introduced for v3.5, so they don't overlap
- Fix a device tree intialization bug for imx21-compatible devices
- Carry over the OF node to the TPS65910 GPIO chip struct
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJP/JcSAAoJEEEQszewGV1zaJYQAJWoHSWjzR3mDYqKWTvLsFji
UAoS9SM9dweXbV+QlvlZDt0F8vBoWF4h76JijY8wJZqJoQnhWEQ9NQhM6v8cZmdQ
LJi1uiUnoYUhZ9cA5SIUBeIgzbPp/FbIe5JmPjkt8dGOJ4sAQPtwchQzytKdNkdv
0oiVFJRFoPTHc1Mw0NUCBYcg5XsQec/JpJILl8rfM9ZzlkoRGoJcO1OhhmtnIrmO
yqPfDmfv31iH3YKVD8nQzCuG3d4PlfuNGptqaUw9bM0KObn7B5eMEyhNhFNx8Ng7
JW7FLMw9e5UGOSU1uuUw/8/RltWjuQwTEVmeoJytml3Ivqb4B90CuwpJEGR/CXLM
Kt6YGNfJt9FDJIyGzf8lBYye4r6l/FgbMYii23R/HUuBH2+aXlkpDKqPamH7fdx8
ZYINGwmyPWKkDtzCLlZbcKaWJQd7eWqhsg0V/CVJm2cvDZSYqt5K2eluQHLK15DP
Tbs6IUaAgh3ML09Huc0WWAI0UUReS3oCITdBklcHPV7dEWHvFDwyfThW4r9oYpXv
YmnCb3zgCFG35bm9XOBUqTbrew4qAjHTDiqYROU28WBiA8Brn8v3tQmWHsbO+nzJ
eWLPmQTfnpmLdLnGI4DiUyPvlbnEQb6kMYSo8Cv4xWU2/e8Zl8HLWUELHAKvpLIN
A4hm4xupceCATiUZJmJ9
=ZZq+
-----END PGP SIGNATURE-----
Merge tag 'fixes-for-v3.5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull a late GPIO fix from Linus Walleij:
"Grr! So typically -next washed out a bug in the bug fixes. This v2 of
the pull request fixes another OF/DT related issue caused by fixing
another OF/DT related issue, courtesy of Gerard Sintselaar.
So please pull the v2. Or pull it on top of the other one, whatever.
Sorry for the panic mode, I'm in the middle of the Swedish woods,
supposedly on vacation."
* tag 'fixes-for-v3.5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
gpio/gpio-tps65910: gpio_chip.of_node referenced without CONFIG_OF_GPIO defined
The declaration of arch_release_thread_info() needs a semicolon.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
PPC fix from Alex Graf: "It contains an important bug fix which
can lead to guest freezes when using PAPR guests with PR KVM."
* 'for-upstream-master' of git://github.com/agraf/linux-2.6:
powerpc/kvm: Fix "PR" KVM implementation of H_CEDE
Signed-off-by: Avi Kivity <avi@redhat.com>
H_CEDE should enable the vcpu's MSR:EE bit. It does on "HV" KVM (it's
burried in the assembly code though) and as far as I can tell, qemu
does it as well.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
USB 3.0 devices can optionally support Latency Tolerance Messaging
(LTM). Add a new sysfs file in the device directory to show whether a
device is LTM capable. This file will be present for both USB 2.0 and
USB 3.0 devices.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
USB 3.0 devices may optionally support a new feature called Latency
Tolerance Messaging. If both the xHCI host controller and the device
support LTM, it should be turned on in order to give the system hardware
a better clue about the latency tolerance values of its PCI devices.
Once a Set Feature request to enable LTM is received, the USB 3.0 device
will begin to send LTM updates as its buffers fill or empty, and it can
tolerate more or less latency.
The USB 3.0 spec, section C.4.2 says that LTM should be disabled just
before the device is placed into suspend. Then the device will send an
updated LTM notification, so that the system doesn't think it should
remain in an active state in order to satisfy the latency requirements
of the suspended device.
The Set and Clear Feature LTM enable command can only be sent to a
configured device. The device will respond with an error if that
command is sent while it is in the Default or Addressed state. Make
sure to check udev->actconfig in usb_enable_ltm() and usb_disable_ltm(),
and don't send those commands when the device is unconfigured.
LTM should be enabled once a new configuration is installed in
usb_set_configuration(). If we end up sending duplicate Set Feature LTM
Enable commands on a switch from one installed configuration to another
configuration, that should be harmless.
Make sure that LTM is disabled before the device is unconfigured in
usb_disable_device(). If no drivers are bound to the device, it doesn't
make sense to allow the device to control the latency tolerance of the
xHCI host controller.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Some xHCI host controllers may have optional support for Latency
Tolerance Messaging (LTM). This allows USB 3.0 devices that support LTM
to pass information about how much latency they can tolerate to the xHC.
A PCI xHCI host will use this information to update the PCI Latency
Tolerance Request (LTR) info. The goal of this is to gather latency
information for the system, to enable hardware-driven C states, and the
shutting down of PLLs.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
hub_initiated_lpm_disable_count is not used by any code, so remove it.
This commit should be backported to kernels as old as 3.5, that contain
the commit 8306095fd2 "USB: Disable USB
3.0 LPM in critical sections."
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
When a user runs `echo 0 > bConfigurationValue` for a USB 3.0 device,
usb_disable_device() is called. This function disables all drivers,
deallocates interfaces, and sets the device configuration value to 0
(unconfigured).
With the new scheme to ensure that unconfigured devices have LPM
disabled, usb_disable_device() must call usb_unlocked_disable_lpm() once
it unconfigures the device.
This commit should be backported to kernels as old as 3.5, that contain
the commit 8306095fd2 "USB: Disable USB
3.0 LPM in critical sections."
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
The USB 3.0 Set/Clear Feature U1/U2 Enable cannot be sent to a device in
the Default or Addressed state. It can only be sent to a configured
device. Change the USB core to initialize the LPM disable count to 1
(disabled), which reflects this limitation.
Change usb_set_configuration() to ensure that if the device is
unconfigured on entry, usb_lpm_disable() is not called. This avoids
sending the Clear Feature U1/U2 when the device is in the Addressed
state. When usb_set_configuration() exits with a successfully installed
configuration, usb_lpm_enable() will be called.
Once the new configuration is installed, make sure
usb_set_configuration() only calls usb_enable_lpm() if the device moved
to the Configured state. If we have unconfigured the device by sending
it a Set Configuration for config 0, don't enable LPM.
This commit should be backported to kernels as old as 3.5, that contain
the commit 8306095fd2 "USB: Disable USB
3.0 LPM in critical sections."
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
The USB 3.0 specification says that sending a Set Feature or Clear
Feature for U1/U2 Enable is not a valid request when the device is in
the Default or Addressed state. It is only valid when the device is in
the Configured state.
The original LPM patch attempted to disable LPM after the device had
been reset by hub_port_init(), before it had the configuration
reinstalled. The TI hub I tested with did not fail the Clear Feature
U1/U2 Enable request that khubd sent while it was in the addressed
state, which is why I didn't catch it.
Move the LPM disable before the device reset, so that we can send the
Clear Feature U1/U2 Enable successfully, and balance the LPM disable
count.
Also delete any calls to usb_enable_lpm() on error paths that lead to
re-enumeration. The calls will fail because the device isn't
configured, and it's not useful to balance the LPM disable count because
the usb_device is about to be destroyed before re-enumeration.
Fix the early exit path ("done" label) to call usb_enable_lpm() to
balance the LPM disable count.
Note that calling usb_reset_and_verify_device() with an unconfigured
device may fail on the first call to usb_disable_lpm(). That's because
the LPM disable count is initialized to 0 (LPM enabled), and
usb_disable_lpm() will attempt to send a Clear Feature U1/U2 request to
a device in the Addressed state. The next patch will fix that.
This commit should be backported to kernels as old as 3.5, that contain
the commit 8306095fd2 "USB: Disable USB
3.0 LPM in critical sections."
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
The kernel no longer allows us to pass NULL for the hard handler
without also specifying IRQF_ONESHOT. IRQF_ONESHOT imposes latency
in the exit path that we don't need for MSI interrupts. Long term
we'd like to inject these interrupts from the hard handler when
possible. In the short term, we can create dummy hard handlers
that return us to the previous behavior. Credit to Michael for
original patch.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=43328
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
The device should be handled by xpad driver instead of generic HID driver.
Signed-off-by: Yuri Khan <yurivkhan@gmail.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Fix a boot regression on Mackerel boards with sh_mobile_sdhi
in existing kernels causing:
genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq XXX
caused by 1c6c6952 (genirq: Reject bogus threaded irq requests).
This is backported from Guennadi's patch:
"mmc: extend and rename cd-gpio helpers to handle more slot GPIO functions"
Reported-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
This reverts commit 3d93576e(skip card initialization if
power class selection fails).
Problem has been reported when this is used with eMMC4.41
card with Tegra Platform. Till the issue is root caused,
bus width selection failure should not be treated as fatal.
Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-Off-by: Venkatraman S <svenkatr@ti.com>
CC: Ulf Hansson <ulf.hansson@stericsson.com>
CC: Subhash Jadavani <subhashj@codeaurora.org>
CC: Saugata Das <saugata.das@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
commit 626f9914 added code to initialize gpio_chip.of_node, but if
CONFIG_OF_GPIO is not defined gps-tps65910 fails to build with an
error complaining gpio_chip has no member of_node. I ran into this
while doing a allyesconfig build on linux-next.
Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
- Invalid context restore on bank 0 for OMAP driver in
runtime suspend/resume cycle
- Check for NULL platform data in sta-2x11 driver
- Constrain selection of the V1 MSM GPIO driver to applicable
platforms (Kconfig issue)
- Make sure the correct output value is set in the wm8994 driver
- Export devm_gpio_request_one() so it can be used in modules.
Apparently some in-kernel modules can be configured to use this
leading to breakage.
- Check that the GPIO is valid in the lantiq driver
- Fix the flag bits introduced for v3.5, so they don't overlap
- Fix a device tree intialization bug for imx21-compatible devices
- Carry over the OF node to the TPS65910 GPIO chip struct
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJP/GcNAAoJEEEQszewGV1z2G4QAL3R0vT3um5hllJmp7OnWBYp
lGFCoYnBYC77RO59t2+zS1PX6Iz+kmNzeIEHFpArN7vOClvb7vCQX6J0HyhtVgVP
vKW4c0aMkHvv6CMfgMomTzCBtPLxFHFPd/UyTwob9ha3+/39gCTTIrlUO9C7W/pb
rNI+bwwLiaDj5Peq91P9V2fNv9aIb0hPeCEuAuZ3gKoxgVJLCJzJj+/so2XaZGsI
kF9WJXhlhcMf94ZP6VoUtoHfIe1NYQD1OTxWQ8es4I/BXQ8jIHkH/wt9OE196jfT
/hlX38jEspCWnpmfY4gkIgqC6gSB2EY+KsVpZcEL1TzXi6txYWNdN1TQW6Zb1Q1p
BOlOErwhi2xxXwn1IjGKe7R2QLpu/7r6uYNFcD06YJeGSgEHkP0Pt8Nj5wqvY/wo
rVp8vrUo/P9bAu/5R2Ogogh7AxoSz5W0rrZfoIa8+V7Nrxcl8wPkFhu/uBuhsxE+
TJLI4e1lvzjlwRTuFzjSBq/u87tlCseL/KLlvCjahaxKdD2ElzF+NtPKFIu+u3+Y
WmTjaV1sfZdprMXGlIGxx+b8OIunWxdll3W9jkb20Zf8MZsjqXAfsAy+qpAHhW5A
iTZ92EWAE1v0k6zV7TRhkm7heP8Y5zfx4ARIgobVc5Z8bVw2LnHVA2lJqprkjRLS
A/FCESAyzSrI1oYcCQy8
=GIRC
-----END PGP SIGNATURE-----
Merge tag 'fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fixes from Linus Walleij:
"Yes, this is a *LATE* GPIO pull request with fixes for v3.5.
Grant moved across the planet and accidentally fell off the grid, so
he asked me to take over the GPIO merges for a while 10 days ago.
Since then I went over the archives and collected this pile of fixes,
and pulled two of them from the TI maintainer Kevin Hilman. Then
waited for them to at least hit linux-next once or twice."
GPIO fixes for v3.5:
- Invalid context restore on bank 0 for OMAP driver in runtime
suspend/resume cycle
- Check for NULL platform data in sta-2x11 driver
- Constrain selection of the V1 MSM GPIO driver to applicable platforms
(Kconfig issue)
- Make sure the correct output value is set in the wm8994 driver
- Export devm_gpio_request_one() so it can be used in modules.
Apparently some in-kernel modules can be configured to use this
leading to breakage.
- Check that the GPIO is valid in the lantiq driver
- Fix the flag bits introduced for v3.5, so they don't overlap
- Fix a device tree intialization bug for imx21-compatible devices
- Carry over the OF node to the TPS65910 GPIO chip struct
* tag 'fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
gpio: tps65910: initialize of_node of gpio_chip
gpio/mxc: make irqs work for fsl,imx21-gpio devices
gpio: fix bits conflict for gpio flags
mips: pci-lantiq: Fix check for valid gpio
gpio: export devm_gpio_request_one
gpiolib: wm8994: Pay attention to the value set when enabling as output
gpio/msm_v1: CONFIG_GPIO_MSM_V1 is only available on three SoCs
gpio-sta2x11: don't use pdata if null
gpio/omap: fix invalid context restore of gpio bank-0
gpio/omap: fix irq loss while in idle with debounce on
Pull powerpc fixes from Benjamin Herrenschmidt:
"It looks like my rewrite of our lazy irq scheme is still exposing
"interesting" issues left and right. The previous fixes are now
causing an occasional BUG_ON to trigger (which this patch turns into a
WARN_ON while at it), due to another issue of disconnect of the lazy
irq state vs the processor state in the idle loop on pseries and
cell.
This should fix it properly once for all moving the nasty code to a
common helper function.
There's also couple more fixes for some debug stuff that didn't build
(and helped resolving those problems so it's worth having), along with
a compile fix for newer gcc's."
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
tty/hvc_opal: Fix debug function name
powerpc/numa: Avoid stupid uninitialized warning from gcc
powerpc: Fix build of some debug irq code
powerpc: More fixes for lazy IRQ vs. idle
This is an old suspend/resume lockup fix:
commit 2780cc4660e1
Author: Len Brown <len.brown@intel.com>
Date: Thu Dec 23 13:43:30 2004 -0500
[ACPI] Fix suspend/resume lockup issue
by leaving Bus Master Arbitration enabled.
The ACPI spec mandates it be disabled only for C3.
http://bugzilla.kernel.org/show_bug.cgi?id=3599
Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
The bug snuck back in in commit 2feec47d4c (ACPICA: ACPI 5: Support
for new FADT SleepStatus, SleepControl registers, 2012-02-14),
presumably by copy/pasting a copy of the code without that fix for the
legacy case.
On affected machines, after that commit, the machine locks up hard on
resume from suspend. The same fix as seven years ago still works.
Addresses <https://bugzilla.kernel.org/show_bug.cgi?id=43641>.
Reported-bisected-and-tested-by: Octavio Alvarez <alvarezp@alvarezp.com>
Reported-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This reverts commit 107a84e61c.
Meelis Roos reports a regression since 3.5-rc5 that stops Sun Fire V100
and Sun Netra X1 sparc64 machines from booting, hanging after enabling
serial console. He bisected it to commit 107a84e61c.
Rob Herring explains:
"The problem is match combinations of compatible plus name and/or type
fail to match correctly. I have a fix for this, but given how late it
is for 3.5 I think it is best to revert this for now. There could be
other cases that rely on the current although wrong behavior. I will
post an updated version for 3.6."
Bisected-and-reported-by: Meelis Roos <mroos@linux.ee>
Requested-by: Rob Herring <rob.herring@calxeda.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
when the default irq quick handler is used then IRQF_ONESHOT must be set
otherwise the request fails and following error is displayed:
mei 0000:00:16.0: irq 48 for MSI/MSI-X
genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 48
mei 0000:00:16.0: request_threaded_irq failed: irq = 48.
dpm_run_callback(): pci_pm_resume+0x0/0x140 returns -22
PM: Device 0000:00:16.0 failed to resume async: error -22
Reported-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable <stable@vger.kernel.org> # 3.5
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The helper nfs_fs_mount() will always call nfs4_try_mount with the
mount_info->fill_super argument pointing to nfs_fill_super, which is
NFSv2/v3 only.
Fix is to have nfs4_try_mount replace it with nfs4_fill_super.
The regression was introduced by commit c40f8d1d (NFS: Create a common
fs_mount() function)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Quite a few ASUS computers experience a nasty problem, related to the
EHCI controllers, when going into system suspend. It was observed
that the problem didn't occur if the controllers were not put into the
D3 power state before starting the suspend, and commit
151b612847 (USB: EHCI: fix crash during
suspend on ASUS computers) was created to do this.
It turned out this approach messed up other computers that didn't have
the problem -- it prevented USB wakeup from working. Consequently
commit c2fb8a3fa2 (USB: add
NO_D3_DURING_SLEEP flag and revert 151b612847) was merged; it
reverted the earlier commit and added a whitelist of known good board
names.
Now we know the actual cause of the problem. Thanks to AceLan Kao for
tracking it down.
According to him, an engineer at ASUS explained that some of their
BIOSes contain a bug that was added in an attempt to work around a
problem in early versions of Windows. When the computer goes into S3
suspend, the BIOS tries to verify that the EHCI controllers were first
quiesced by the OS. Nothing's wrong with this, but the BIOS does it
by checking that the PCI COMMAND registers contain 0 without checking
the controllers' power state. If the register isn't 0, the BIOS
assumes the controller needs to be quiesced and tries to do so. This
involves making various MMIO accesses to the controller, which don't
work very well if the controller is already in D3. The end result is
a system hang or memory corruption.
Since the value in the PCI COMMAND register doesn't matter once the
controller has been suspended, and since the value will be restored
anyway when the controller is resumed, we can work around the BIOS bug
simply by setting the register to 0 during system suspend. This patch
(as1590) does so and also reverts the second commit mentioned above,
which is now unnecessary.
In theory we could do this for every PCI device. However to avoid
introducing new problems, the patch restricts itself to EHCI host
controllers.
Finally the affected systems can suspend with USB wakeup working
properly.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=37632
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=42728
Based-on-patch-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Dâniel Fraga <fragabr@gmail.com>
Tested-by: Javier Marcet <jmarcet@gmail.com>
Tested-by: Andrey Rahmatullin <wrar@wrar.name>
Tested-by: Oleksij Rempel <bug-track@fisher-privat.net>
Tested-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Cc: stable <stable@vger.kernel.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add support for the 15'' MacBook Pro Retina model (MacBookPro10,1).
Patch originally written by clipcarl (forums.opensuse.org).
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Add support for the 15'' MacBook Pro Retina. The keyboard is
the same as recent models.
The patch needs to be synchronized with the bcm5974 patch for
the trackpad - as usual.
Patch originally written by clipcarl (forums.opensuse.org).
[rydberg@euromail.se: Amended mouse ignore lines]
Signed-off-by: Ryan Bourgeois <bluedragonx@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
echi-omap because the driver currently causes issues with PM.
This annoys Kevin as it makes it harder for him to validate that
PM is working. The proper fixes for the echi-omap are being
discussed, but looks like it will not be properly working with PM
until in v3.7.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJP/C8tAAoJEBvUPslcq6Vz/CQQAMcyzBitcocXb9bkOz1I0eiy
Y9Cn4ZnSrNZbkNETgStcgTjK6krmz15yqNgQE+KffYCDQqQxhExI33XT8VCHySj7
S++3XcDPUrt3UPidzRDFASazgo+RyyeYfuF32V18TTjYLJCU8tbVcWvzvGPS13eb
5XjTLTholLFDItGy5MPGkdoZXlZqqS4r/cwMG/9io11SUIHfpRvqdV/r+LbXCGqH
GnvAkXIcaVaRmv20v0vYLVWFbbVh1QFHeuX2lnGbNBQC1XaIwmRQg9cJ7pz7HRaZ
YAMPc/N44/EqbfbgKoipy14aPAOfSa3kAFl90Gn2Cmz/Ee8mCO/SQz+FVwaF11Vi
pFpk0miidoAxDLnDiswip9k5EPbTgcZEqIjenIRWtST127YOpLmdCUPnRPv8TaLj
0uo68g7nXTOtUczmpxL+FxdwC+hzvuL0As0YoE+WqU5+Joo972Wxyj2iCle6jW5Z
etmYjYRq/tIX40DPTBT7cu6Oh+CH+FHsOCmfwaWSULf2UWyHeRZsJM6KZrTj1VAm
Baf21HAivJKJERQie8i7PEbtBccMVKRaqMqlitLtdZlYjNjj5IjuRBLyMUtwHNQn
tddM9ySQH/NQYFPXIwbwvfAwNOdwBYD+ofqsxKsVB15jzbgES7JC02W3vHHa7o3H
vv+6NdA5kibofq6R+WjT
=+Kkw
-----END PGP SIGNATURE-----
Merge tag 'omap-fixes-for-v3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren <tony@atomide.com>:
Here is one PM regression fix and a defconfig change to disable
echi-omap because the driver currently causes issues with PM.
This annoys Kevin as it makes it harder for him to validate that
PM is working. The proper fixes for the echi-omap are being
discussed, but looks like it will not be properly working with PM
until in v3.7.
* tag 'omap-fixes-for-v3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: omap2plus_defconfig: EHCI driver is not stable, disable it
ARM: OMAP2+: hwmod code/clockdomain data: fix 32K sync timer
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
udbg_init_debug_opal() should be udbg_init_debug_opal_raw() as
the caller in arch/powerpc/kernel/udbg.c expects
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Newer gcc are being a bit blind here (it's pretty obvious we don't
reach the code path using the array if we haven't initialized the
pointer) but none of that is performance critical so let's just
silence it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
There was a typo, checking for CONFIG_TRACE_IRQFLAG instead of
CONFIG_TRACE_IRQFLAGS causing some useful debug code to not be
built
This in turns causes a build error on BookE 64-bit due to incorrect
semicolons at the end of a couple of macros, so let's fix that too
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@vger.kernel.org [v3.4]
Looks like we still have issues with pSeries and Cell idle code
vs. the lazy irq state. In fact, the reset fixes that went upstream
are exposing the problem more by causing BUG_ON() to trigger (which
this patch turns into a WARN_ON instead).
We need to be careful when using a variant of low power state that
has the side effect of turning interrupts back on, to properly set
all the SW & lazy state to look as if everything is enabled before
we enter the low power state with MSR:EE off as we will return with
MSR:EE on. If not, we have a discrepancy of state which can cause
things to go very wrong later on.
This patch moves the logic into a helper and uses it from the
pseries and cell idle code. The power4/970 idle code already got
things right (in assembly even !) so I'm not touching it. The power7
"bare metal" idle code is subtly different and correct. Remains PA6T
and some hypervisor based Cell platforms which have questionable
code in there, but they are mostly dead platforms so I'll fix them
when I manage to get final answers from the respective maintainers
about how the low power state actually works on them.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@vger.kernel.org [v3.4]
A smallish fix for a lock dependency issue which affects a bunch of
Qualcomm boards that do unusually complicated things with their
regulators, the API is unlikely to be called by any other system.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJP9yyGAAoJEBus8iNuMP3dI24P/RXFIHH1dYck49uQ17moYDY+
vQBM7amuu23Q9MJxU5rGWaqwxXR8qT3iT76BlL9bt8u91GM4tDrccLRW09+GJXNZ
1tpFK96iOaH9ju/+FMc0nR9P385YqxRh91ZWDfyAqectBU8nFAtcl+7BakuR/9j/
2XbftG3T555EylCfwAaw1ikOALxE47ALgKa/Hglu8RDZTQSaWWZb2o20PTXfrkUk
Mt1Pzs9PMfmgE7VUC6Q04vEydX47L8/iwywanzcbMTKw00d3o5WXTwNqDzcPWGZv
S9pSGQaZ10JVMO7eu4337fsfIuhUEU0Ilbaow1eLi1RymgDFIamr0SUKcpC1sPDF
O95l1GZmEwiyDJITL4K1Ssf5TZCKmR9eMh9e1iPmOrtpK4tGHxwqO5+OHmfncISp
g4x4G7o+aK5M9c3+9r3G7S1ZrV4LAcFLVxN9LHo0PLIG/lT7tl8e6dAlWZjKSRIC
w18lJ7mdOCXgJqOt4UzIRbWpI0pZaXt0tk1mfU+/vfzhl9C5AVMVNGqgaiafHWGG
Kh01vjjSIGhfE3k83eOGlkYpTGvFsZBMVUMHif8hRfrBjiHj7RnvAfXqV0ULpa50
v0huqrPwB+384c2V6K1f6IbpyLXZQ10h4HwctxprKbO+cZZ5oYlxLlu8tkJFvNMD
QxLC8aDIumuprilMgryd
=x509
-----END PGP SIGNATURE-----
Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown:
"A smallish fix for a lock dependency issue which affects a bunch of
Qualcomm boards that do unusually complicated things with their
regulators, the API is unlikely to be called by any other system."
* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: Fix recursive mutex lockdep warning
Don't call v4l2_ctrl_g_ctrl on ctrls which the model cam in question
does not have.
Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[ Taken directly, since Mauro is on vacation ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>