Commit graph

456181 commits

Author SHA1 Message Date
Kukjin Kim 070b8b436b ARM: S5P64X0: no more support S5P6440 and S5P6450 SoCs
This patch removes supporting codes for s5p6440 and s5p6450 because
seems no more used now. And if its supporting is required, DT based
codes should be supprted next time.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-07-08 07:06:19 +09:00
Martin Kepplinger ab7027de5c ACPI / video: Add Acer TravelMate B113 to native backlight blacklist
Fix backlight control for Acer TravelMate B113 Laptop by adding
it to the video_dmi_table.

A workaround before that was to use acpi_osi=Linux or
acpi_backlight=vendor on boot but even then, only the function-
keys worked.

With this change there is no need for boot parameters and DE's
controls work as well.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
[rjw: Subject]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 23:38:10 +02:00
Edward Lin 08a56226d8 ACPI / video: Add Dell Inspiron 5737 to the blacklist
With win8 capabiltiy, the ACPI backlight control is broken.
The system also loses backlight setting when resuming from S3.

Add this model to the the ACPI video detect blacklist to make backlight
functionality work.

Although backlight functionality works via video.use_native_backlight=1,
this approach may be safer.

Signed-off-by: Edward Lin <yidi.lin@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 23:38:10 +02:00
Aaron Lu 0b9f7d93ca ACPI / i915: ignore firmware requests for backlight change
Some Thinkpad laptops' firmware will initiate a backlight level change
request through operation region on the events of AC plug/unplug, but
since we are not using firmware's interface to do the backlight setting
on these affected laptops, we do not want the firmware to use some
arbitrary value from its ASL variable to set the backlight level on
AC plug/unplug either.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=76491
Link: https://bugzilla.kernel.org/show_bug.cgi?id=77091
Reported-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Reported-and-tested-by: Anton Gubarkov <anton.gubarkov@gmail.com>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 23:38:05 +02:00
Josef Gajdusek 232de51437 ACPI / battery: fix wrong value of capacity_now reported when fully charged
It seems that some batteries (noticed on DELL JYPJ136) assume
capacity_now = design_capacity when fully charged. This causes
reported capacity to suddenly jump to >full_charge_capacity (and that
means capacity reported to userspace is >100% and incorrect)
values after 99%. This patch detects capacity_now > full_charge_capacity,
notifies userspace (unless it is the known bug where capacity_now ==
design_capacity) and trims the value to full_charge_capacity.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 23:37:06 +02:00
Linus Torvalds 448bfad8a1 Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal fixes from Zhang Rui:
 "Specifics:

   - update Email address of Thermal subsystem maintainer Eduardo
     Valentin.

   - fix a problem that unloading thermal module results in kernel crash
     because a non-exist device file is removed on thermal unload.

   - fix a problem that critical trip point is set wrongly on latest
     i.MX6 SOC and results in system critical shutdown.

   - a couple of fixes to Tmon tool, of-thermal code and ti thermal
     driver"

* 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  tmon: set umask to a reasonable value
  tmon: Check log file for common secuirty issues
  tools/thermal: tmon: fix compilation errors when building statically
  thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checked
  Thermal: imx: correct critical trip temperature setting
  thermal: Bind cooling devices with the correct arguments
  thermal: Add braces around suspect code
  thermal: hwmon: Make the check for critical temp valid consistent
  MAINTAINERS: Update Eduardo Valentin's email address
2014-07-07 13:23:13 -07:00
Linus Torvalds 4c2f503aad Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
 "A few tiny HID subsystem fixes for 3.16"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: use multi input quirk for 22b9:2968
  HID: sensor-hub: fix potential memory leak
  HID: usbhid: quirk for PM1610 and PM1640 Touchscreen.
  HID: rmi: Protect PM-only functions by #ifdef CONFIG_PM
  HID: sensor-hub: introduce Kconfig dependency on IOMEM
  HID: sensor-hub: make dyn_callback_lock IRQ-safe
2014-07-07 13:13:03 -07:00
Linus Torvalds 92556e6039 Two fixes for the pin control subsystem, both relating to
the errorpath in probe().
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTul7RAAoJEEEQszewGV1zyP4QAMZxc5gVf5zOjyd+EtxuYkiC
 lWxR4c8uzet8FQ6J0uMdThG6sK4TTFKNz+rP69DUcRY8EM03fgkgCVkynkWzYftZ
 YcgxUAJDNxXygy+GxvfL5qQMQVHCSPfj6knqsOK2b26fwt5Y4u0TbI5NWC/rMe4B
 sN0NQTdLxYOBVnYbgDRYCsQ7+2HbwCRsBrShdTgISw49qK2q2EhrbIvbjmFYZBSa
 u2cRKYy9MOHSwDd0S/ryIQ4wYiq/MGWtu1RP5zb+1GJzXPDOYhQnwMDsGgqTlIk3
 2wMy3T2psvk542pUYm3lxzWc2v39eKzvvwqG9NWrdXml42EcI8FnqnJ34hSBXM8y
 dS1laWks9m10RxnOiiDHpa2f85raBDlGou1awHwSrfXQHm+PqNcMgDTgmnIRiIUi
 OunLqh3fhYqBisAExzqaagchjpGpCTQTuWS3xgzRdwj6NIZkr7yvDyFfUM0oVPJ/
 Yzyl677+I5ppp41YrYLVGGtsj+f2ao+epsz5pD+9uC+HbhMYeo1pJXT3IbEfi5iW
 Az7QDNl2qGLpSldKmSYgle6Xoa8UhVJK/+VEiXZ7w20GIWho1vaFCNFPg0bU60jx
 lhwejXmpLcuAv3f/jX5BWLKa2sZw2yy9Tg77WnqW1JfFmSnVf5KLI0HryuDIg0Nw
 XRhO79nXTrCgj+a4lL5r
 =Ya5E
 -----END PGP SIGNATURE-----

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

Pull pin control fixes from Linus Walleij:
 "Two fixes for the pin control subsystem, both relating to the error
  path in probe()

  I'm a bit snowed under by mail but these have boiled in linux-next and
  should propagate to you"

* tag 'pinctrl-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: berlin: fix an error code in berlin_pinctrl_probe()
  pinctrl: sunxi: Fix potential null pointer dereference
2014-07-07 13:11:36 -07:00
Andy Whitcroft 867f9d463b ACPI / resources: only reject zero length resources based at address zero
The recently merged change (in v3.14-rc6) to ACPI resource detection
(below) causes all zero length ACPI resources to be elided from the
table:

  commit b355cee88e
  Author: Zhang Rui <rui.zhang@intel.com>
  Date:   Thu Feb 27 11:37:15 2014 +0800

    ACPI / resources: ignore invalid ACPI device resources

This change has caused a regression in (at least) serial port detection
for a number of machines (see LP#1313981 [1]).  These seem to represent
their IO regions (presumably incorrectly) as a zero length region.
Reverting the above commit restores these serial devices.

Only elide zero length resources which lie at address 0.

Fixes: b355cee88e (ACPI / resources: ignore invalid ACPI device resources)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 22:11:09 +02:00
Kinglong Mee c3a4561796 nfsd: Fix bad reserving space for encoding rdattr_error
Introduced by commit 561f0ed498 (nfsd4: allow large readdirs).

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2014-07-07 14:16:31 -04:00
Russell King 9a2c33a422 ARM: l2c: fix revision checking
The revision checking in l2c310_enable() was not correct; we were
masking the part number rather than the revision number.  Fix this
to use the correct macro.

Fixes: 4374d64933 ("ARM: l2c: add automatic enable of early BRESP")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-07-07 17:55:22 +01:00
Guenter Roeck 7fe7381cbd hwmon: (adc128d818) Drop write support on inX_input attributes
Writes into input registers doesn't make sense, even more so since
the writes actually ended up writing into the maximum limit registers.
Drop it.

Cc: stable@vger.kernel.org
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-07 09:48:23 -07:00
Guenter Roeck f6c2dd2010 hwmon: (emc2103) Clamp limits instead of bailing out
It is customary to clamp limits instead of bailing out with an error
if a configured limit is out of the range supported by the driver.
This simplifies limit configuration, since the user will not typically
know chip and/or driver specific limits.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-07 07:15:31 -07:00
Yasuaki Ishimatsu 5a6024f160 workqueue: zero cpumask of wq_numa_possible_cpumask on init
When hot-adding and onlining CPU, kernel panic occurs, showing following
call trace.

  BUG: unable to handle kernel paging request at 0000000000001d08
  IP: [<ffffffff8114acfd>] __alloc_pages_nodemask+0x9d/0xb10
  PGD 0
  Oops: 0000 [#1] SMP
  ...
  Call Trace:
   [<ffffffff812b8745>] ? cpumask_next_and+0x35/0x50
   [<ffffffff810a3283>] ? find_busiest_group+0x113/0x8f0
   [<ffffffff81193bc9>] ? deactivate_slab+0x349/0x3c0
   [<ffffffff811926f1>] new_slab+0x91/0x300
   [<ffffffff815de95a>] __slab_alloc+0x2bb/0x482
   [<ffffffff8105bc1c>] ? copy_process.part.25+0xfc/0x14c0
   [<ffffffff810a3c78>] ? load_balance+0x218/0x890
   [<ffffffff8101a679>] ? sched_clock+0x9/0x10
   [<ffffffff81105ba9>] ? trace_clock_local+0x9/0x10
   [<ffffffff81193d1c>] kmem_cache_alloc_node+0x8c/0x200
   [<ffffffff8105bc1c>] copy_process.part.25+0xfc/0x14c0
   [<ffffffff81114d0d>] ? trace_buffer_unlock_commit+0x4d/0x60
   [<ffffffff81085a80>] ? kthread_create_on_node+0x140/0x140
   [<ffffffff8105d0ec>] do_fork+0xbc/0x360
   [<ffffffff8105d3b6>] kernel_thread+0x26/0x30
   [<ffffffff81086652>] kthreadd+0x2c2/0x300
   [<ffffffff81086390>] ? kthread_create_on_cpu+0x60/0x60
   [<ffffffff815f20ec>] ret_from_fork+0x7c/0xb0
   [<ffffffff81086390>] ? kthread_create_on_cpu+0x60/0x60

In my investigation, I found the root cause is wq_numa_possible_cpumask.
All entries of wq_numa_possible_cpumask is allocated by
alloc_cpumask_var_node(). And these entries are used without initializing.
So these entries have wrong value.

When hot-adding and onlining CPU, wq_update_unbound_numa() is called.
wq_update_unbound_numa() calls alloc_unbound_pwq(). And alloc_unbound_pwq()
calls get_unbound_pool(). In get_unbound_pool(), worker_pool->node is set
as follow:

3592         /* if cpumask is contained inside a NUMA node, we belong to that node */
3593         if (wq_numa_enabled) {
3594                 for_each_node(node) {
3595                         if (cpumask_subset(pool->attrs->cpumask,
3596                                            wq_numa_possible_cpumask[node])) {
3597                                 pool->node = node;
3598                                 break;
3599                         }
3600                 }
3601         }

But wq_numa_possible_cpumask[node] does not have correct cpumask. So, wrong
node is selected. As a result, kernel panic occurs.

By this patch, all entries of wq_numa_possible_cpumask are allocated by
zalloc_cpumask_var_node to initialize them. And the panic disappeared.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Fixes: bce903809a ("workqueue: add wq_numa_tbl_len and wq_numa_possible_cpumask[]")
2014-07-07 09:56:48 -04:00
Wen-chien Jesse Sung 3179e8e684 HID: use multi input quirk for 22b9:2968
This device generates ABS_Z and ABS_RX events instead of ABS_X and
ABS_Y.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-07-07 15:40:18 +02:00
Guenter Roeck 145e74a4e5 hwmon: (adm1031) Fix writes to limit registers
Upper limit for write operations to temperature limit registers
was clamped to a fractional value. However, limit registers do
not support fractional values. As a result, upper limits of 127.5
degrees C or higher resulted in a rounded limit of 128 degrees C.
Since limit registers are signed, this was stored as -128 degrees C.
Clamp limits to (-55, +127) degrees C to solve the problem.

Value on writes to auto_temp[12]_min and auto_temp[12]_max were not
clamped at all, but masked. As a result, out-of-range writes resulted
in a more or less arbitrary limit. Clamp those attributes to (0, 127)
degrees C for more predictable results.

Cc: Axel Lin <axel.lin@ingics.com>
Cc: stable@vger.kernel.org
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-07 05:49:25 -07:00
Tony Lindgren e9360979fe Merge branch 'for-v3.16-rc/clk-dt-fixes' of https://github.com/t-kristo/linux-pm into fixes-rc4 2014-07-07 05:05:42 -07:00
Enric Balletbo i Serra 24faebd641 ARM: dts: Fix TI CPSW Phy mode selection on IGEP COM AQUILA.
As this board use external clock for RMII interface we should specify 'rmii'
phy mode and 'rmii-clock-ext' to make ethernet working.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-07-07 05:01:18 -07:00
Peter Ujfalusi 6f2f52b596 ARM: dts: am335x-evmsk: Enable the McASP FIFO for audio
The use of FIFO in McASP can reduce the risk of audio under/overrun and
lowers the load on the memories since the DMA will operate in bursts.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-07-07 05:00:53 -07:00
Peter Ujfalusi 90571d856a ARM: dts: am335x-evm: Enable the McASP FIFO for audio
The use of FIFO in McASP can reduce the risk of audio under/overrun and
lowers the load on the memories since the DMA will operate in bursts.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-07-07 04:57:17 -07:00
Guido Martínez 68e2eb533e ARM: OMAP2+: Make GPMC skip disabled devices
Currently, child nodes of the gpmc node are iterated and probed
regardless of their 'status' property. This means adding 'status =
"disabled";' has no effect.

This patch changes the iteration to only probe nodes marked as
available.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Tested-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-07-07 04:57:17 -07:00
Suman Anna 526570cb20 ARM: OMAP2+: create dsp device only on OMAP3 SoCs
The DSP platform device for TI DSP/Bridge is currently
created unconditionally whenever CONFIG_TIDSPBRIDGE is
enabled. This device should only be created on OMAP34xx/
OMAP36xx SoCs, and not for other OMAP3 derived SoCs or when
booting multi-arch images on other SoCs. So, add a check for
the SoC family both before creating the device and allocating
the carveout memory for the device.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-07-07 04:57:06 -07:00
Roger Quadros e120fb4596 ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on
After clarification from the hardware team it was found that
this 1.8V PHY supply can't be switched OFF when SoC is Active.

Since the PHY IPs don't contain isolation logic built in the design to
allow the power rail to be switched off, there is a very high risk
of IP reliability and additional leakage paths which can result in
additional power consumption.

The only scenario where this rail can be switched off is part of Power on
reset sequencing, but it needs to be kept always-on during operation.

This patch is required for proper functionality of USB, SATA
and PCIe on DRA7-evm.

CC: Rajendra Nayak <rnayak@ti.com>
CC: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-07-07 04:57:06 -07:00
Nishanth Menon 7abb1a530e ARM: DRA7/AM43XX: fix header definition for omap44xx_restart
omap44xx_restart is defined as a static void inline when DRA7/AM437X is
defined alone, which implies that the restart function is no longer
functional even though it is built in. So, fix the definition of the
same.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-07-07 04:57:06 -07:00
Lan Tianyu 75646e758a ACPI / battery: Retry to get battery information if failed during probing
Some machines (eg. Lenovo Z480) ECs are not stable during boot up
and causes battery driver fails to be loaded due to failure of getting
battery information from EC sometimes. After several retries, the
operation will work. This patch is to retry to get battery information 5
times if the first try fails.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=75581
Reported-and-tested-by: naszar <naszar@ya.ru>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 13:39:00 +02:00
Colin Ian King ed4b197ddd ACPI / EC: Free saved_ec on error exit path
Smatch detected two memory leaks on saved_ec:

drivers/acpi/ec.c:1070 acpi_ec_ecdt_probe() warn: possible
  memory leak of 'saved_ec'
drivers/acpi/ec.c:1109 acpi_ec_ecdt_probe() warn: possible
  memory leak of 'saved_ec'

Free saved_ec on these two error exit paths to stop the memory
leak.  Note that saved_ec maybe null, but kfree on null is allowed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 13:20:30 +02:00
Lv Zheng dd43de20f5 ACPI / EC: Add detailed fields debugging support of EC_SC(R).
Developers really don't need to translate EC_SC(R) in mind as long as the
field details are decoded in the debugging message.

Tested-by: Gareth Williams <gareth@garethwilliams.me.uk>
Tested-by: Steffen Weber <steffen.weber@gmail.com>
Tested-by: Hans de Goede <jwrdegoede@fedoraproject.org>
Tested-by: Arthur Chen <axchen@nvidia.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 12:56:11 +02:00
Lv Zheng 4a3f6b5bf3 ACPI / EC: Update revision due to recent changes
The bug fixes and asynchronous improvements have been done to the EC driver
by the previous commits. This patch increases the revision to 2.2 to
indicate the behavior differences between the old and the new drivers. The
copyright/authorship notices are also updated.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 12:55:45 +02:00
Lv Zheng c0d653412f ACPI / EC: Fix race condition in ec_transaction_completed()
There is a race condition in ec_transaction_completed().

When ec_transaction_completed() is called in the GPE handler, it could
return true because of (ec->curr == NULL). Then the wake_up() invocation
could complete the next command unexpectedly since there is no lock between
the 2 invocations. With the previous cleanup, the IBF=0 waiter race need
not be handled any more. It's now safe to return a flag from
advance_condition() to indicate the requirement of wakeup, the flag is
returned from a locked context.

The ec_transaction_completed() is now only invoked by the ec_poll() where
the ec->curr is ensured to be different from NULL.

After cleaning up, the EVT_SCI=1 check should be moved out of the wakeup
condition so that an EVT_SCI raised with (ec->curr == NULL) can trigger a
QR_SC command.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=70891
Link: https://bugzilla.kernel.org/show_bug.cgi?id=63931
Link: https://bugzilla.kernel.org/show_bug.cgi?id=59911
Reported-and-tested-by: Gareth Williams <gareth@garethwilliams.me.uk>
Reported-and-tested-by: Hans de Goede <jwrdegoede@fedoraproject.org>
Reported-by: Barton Xu <tank.xuhan@gmail.com>
Tested-by: Steffen Weber <steffen.weber@gmail.com>
Tested-by: Arthur Chen <axchen@nvidia.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 12:55:32 +02:00
Lv Zheng 9b80f0f73a ACPI / EC: Remove duplicated ec_wait_ibf0() waiter
After we've added the first command byte write into advance_transaction(),
the IBF=0 waiter is duplicated with the command completion waiter
implemented in the ec_poll() because:
   If IBF=1 blocked the first command byte write invoked in the task
   context ec_poll(), it would be kicked off upon IBF=0 interrupt or timed
   out and retried again in the task context.

Remove this seperate and duplicate IBF=0 waiter.  By doing so we can
reduce the overall number of times to access the EC_SC(R) status
register.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=70891
Link: https://bugzilla.kernel.org/show_bug.cgi?id=63931
Link: https://bugzilla.kernel.org/show_bug.cgi?id=59911
Reported-and-tested-by: Gareth Williams <gareth@garethwilliams.me.uk>
Reported-and-tested-by: Hans de Goede <jwrdegoede@fedoraproject.org>
Reported-by: Barton Xu <tank.xuhan@gmail.com>
Tested-by: Steffen Weber <steffen.weber@gmail.com>
Tested-by: Arthur Chen <axchen@nvidia.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 12:54:03 +02:00
Lv Zheng f92fca0060 ACPI / EC: Add asynchronous command byte write support
Move the first command byte write into advance_transaction() so that all
EC register accesses that can affect the command processing state machine
can happen in this asynchronous state machine advancement function.

The advance_transaction() function then can be a complete implementation
of an asyncrhonous transaction for a single command so that:
 1. The first command byte can be written in the interrupt context;
 2. The command completion waiter can also be used to wait the first command
    byte's timeout;
 3. In BURST mode, the follow-up command bytes can be written in the
    interrupt context directly, so that it doesn't need to return to the
    task context. Returning to the task context reduces the throughput of
    the BURST mode and in the worst cases where the system workload is very
    high, this leads to the hardware driven automatic BURST mode exit.

In order not to increase memory consumption, convert 'done' into 'flags'
to contain multiple indications:
 1. ACPI_EC_COMMAND_COMPLETE: converting from original 'done' condition,
    indicating the completion of the command transaction.
 2. ACPI_EC_COMMAND_POLL: indicating the availability of writing the first
    command byte. A new command can utilize this flag to compete for the
    right of accessing the underlying hardware. There is a follow-up bug
    fix that has utilized this new flag.

The 2 flags are important because it also reflects a key concept of IO
programs' design used in the system softwares. Normally an IO program
running in the kernel should first be implemented in the asynchronous way.
And the 2 flags are the most common way to implement its synchronous
operations on top of the asynchronous operations:
1. POLL: This flag can be used to block until the asynchronous operations
         can happen.
2. COMPLETE: This flag can be used to block until the asynchronous
             operations have completed.
By constructing code cleanly in this way, many difficult problems can be
solved smoothly.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=70891
Link: https://bugzilla.kernel.org/show_bug.cgi?id=63931
Link: https://bugzilla.kernel.org/show_bug.cgi?id=59911
Reported-and-tested-by: Gareth Williams <gareth@garethwilliams.me.uk>
Reported-and-tested-by: Hans de Goede <jwrdegoede@fedoraproject.org>
Reported-by: Barton Xu <tank.xuhan@gmail.com>
Tested-by: Steffen Weber <steffen.weber@gmail.com>
Tested-by: Arthur Chen <axchen@nvidia.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 12:52:02 +02:00
Lv Zheng 66b42b78bc ACPI / EC: Avoid race condition related to advance_transaction()
The advance_transaction() will be invoked from the IRQ context GPE handler
and the task context ec_poll(). The handling of this function is locked so
that the EC state machine are ensured to be advanced sequentially.

But there is a problem. Before invoking advance_transaction(), EC_SC(R) is
read. Then for advance_transaction(), there could be race condition around
the lock from both contexts. The first one reading the register could fail
this race and when it passes the stale register value to the state machine
advancement code, the hardware condition is totally different from when
the register is read. And the hardware accesses determined from the wrong
hardware status can break the EC state machine. And there could be cases
that the functionalities of the platform firmware are seriously affected.
For example:
 1. When 2 EC_DATA(W) writes compete the IBF=0, the 2nd EC_DATA(W) write may
    be invalid due to IBF=1 after the 1st EC_DATA(W) write. Then the
    hardware will either refuse to respond a next EC_SC(W) write of the next
    command or discard the current WR_EC command when it receives a EC_SC(W)
    write of the next command.
 2. When 1 EC_SC(W) write and 1 EC_DATA(W) write compete the IBF=0, the
    EC_DATA(W) write may be invalid due to IBF=1 after the EC_SC(W) write.
    The next EC_DATA(R) could never be responded by the hardware. This is
    the root cause of the reported issue.

Fix this issue by moving the EC_SC(R) access into the lock so that we can
ensure that the state machine is advanced consistently.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=70891
Link: https://bugzilla.kernel.org/show_bug.cgi?id=63931
Link: https://bugzilla.kernel.org/show_bug.cgi?id=59911
Reported-and-tested-by: Gareth Williams <gareth@garethwilliams.me.uk>
Reported-and-tested-by: Hans de Goede <jwrdegoede@fedoraproject.org>
Reported-by: Barton Xu <tank.xuhan@gmail.com>
Tested-by: Steffen Weber <steffen.weber@gmail.com>
Tested-by: Arthur Chen <axchen@nvidia.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 12:50:25 +02:00
Bernd Wachter 3d28bd840b usb: option: Add ID for Telewell TW-LTE 4G v2
Add ID of the Telewell 4G v2 hardware to option driver to get legacy
serial interface working

Signed-off-by: Bernd Wachter <bernd.wachter@jolla.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
2014-07-07 10:31:14 +02:00
Andras Kovacs b9326057a3 USB: cp210x: add support for Corsair usb dongle
Corsair USB Dongles are shipped with Corsair AXi series PSUs.
These are cp210x serial usb devices, so make driver detect these.
I have a program, that can get information from these PSUs.

Tested with 2 different dongles shipped with Corsair AX860i and
AX1200i units.

Signed-off-by: Andras Kovacs <andras@sth.sze.hu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
2014-07-07 10:28:18 +02:00
Peter Meerwald 2a58b4f88e iio:tcs3472: Check for buffer enabled and locking
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-07 08:59:16 +01:00
Sachin Kamat e12f739e11 ARM: spear: Staticize local symbols in spear1340.c
Symbols local to this file are made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 17:50:20 -07:00
Sachin Kamat 17681ff255 ARM: spear: Staticize spear1310_io_desc in spear1310.c
'spear1310_io_desc' is used only in this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 17:50:15 -07:00
Sachin Kamat 3da1d7b1e0 ARM: spear: Staticize spear13xx_io_desc
'spear13xx_io_desc' is used only in this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 17:50:10 -07:00
Sachin Kamat 192ebb7d8f ARM: vt8500: Staticize local symbols
Variables local to this file are made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 17:50:01 -07:00
Sachin Kamat 7e4588e83b ARM: sti: Staticize local variables
Symbols local to this file are made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Cc: kernel@stlinux.com
Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 17:49:54 -07:00
Olof Johansson a7ed497e3f Renesas ARM Based SoC Cleanup for v3.17
* Use shmobile_init_delay on r8a7790, r7s72100 and EMEV2 SoCs
 * Remove unused redundant callbacks on EMEV2 SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTp4YiAAoJENfPZGlqN0++xfEQALAC6IG0nydElVsJZavFVTiq
 NpVWfG7A9LrEcPswO9ODlzJ3szbsHfr5hG1Cyq2w1/4V6xrvhhRe5hfs9K2gQMf4
 32exqFsND9pf6Rzu2YBbKfi6Zlxfi3wJO7dXvf2Q7BIVXvDRUXUGtDscTQ+Wde9v
 icMVrkliAOLWDyrZpdJAcsJGyMpyUNhdia5n7qQcPEHshMQZWQHPvAwoG6s9qGC3
 7Lv5DkkrsQwNDB2ASlGFw3eK3IEEL8DiHbxF3gX/rCMF6jpWWtoLrwMeSU/D/sUo
 Yk6Vs6xC3pNcpgnqHJD8hw5QlNPWvh5vb7qfpBkR7WnZmziw13Y5TM9CT8bD9f59
 wj83YmLNccltQWN+T6Celu/I1X1QkBz09Ai63SIlzN2tfrr05t1EXL8acSVfWXXS
 Tc/Mf+GXqqIHtMKe5hXM7biizHn7sXk57OfSVnNNSbE5Wrs/TaCsHiTL4E74C2dt
 bwq7GHDBYkETs1Rvh727sfJDpDSGHwWyrhTdXclSn+HHb5kxZ69TfnmovXTUbRPa
 99ieorUeSFqwmkb6/jn3DKjPz2I/KyIfF7yS2T8BNIP742wtD3aSVa6m7KAZ+udS
 kO5WOfunHY7Ckt4/pmgO1gPDX+cbbmG8r+UPXlH+2W73ryTtc46HLoImqawT6h2g
 0WkoIqd4qmyiBLenZiL+
 =UEEy
 -----END PGP SIGNATURE-----

Merge tag 'renesas-soc-cleanup-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup

Merge "Renesas ARM Based SoC Cleanup for v3.17" from Simon Horman:

- Use shmobile_init_delay on r8a7790, r7s72100 and EMEV2 SoCs
- Remove unused redundant callbacks on EMEV2 SoC

* tag 'renesas-soc-cleanup-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Remove unused r8a7790_init_early()
  ARM: shmobile: Use r8a7790 DT CPU Frequency for Lager
  ARM: shmobile: Use r8a7790 DT CPU Frequency in common case
  ARM: shmobile: Use shmobile_init_delay() on r7s72100
  ARM: shmobile: Use shmobile_init_delay() on Genmai boards
  ARM: shmobile: Update r7s72100 DTS to include CPU frequency
  ARM: shmobile: Get rid of redundant EMEV2 mach callbacks
  ARM: shmobile: Use shmobile_init_delay() on EMEV2
  ARM: shmobile: Update EMEV2 DTS to include CPU frequency

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 17:21:19 -07:00
Olof Johansson 64460c7ef2 Renesas ARM Based SoC Header Cleanup for v3.17
Move the most common shared header files for mach-shmobile
 from <mach/foobar.h> to "foobar.h"
 
 6287298 ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case
 585c09d ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case
 6b8b0cb ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h
 fd44aa5 ARM: shmobile: Move common.h
 b6bab12 ARM: shmobile: Move most of irqs.h, keep some for pinctl
 ad6ffa0 ARM: shmobile: Move clock.h
 74ac0de ARM: shmobile: Move dma-register.h
 6200e2c ARM: shmobile: Move intc.h, cleanup sh_intc.h usage
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTp3nTAAoJENfPZGlqN0++mhYP/iGe9QAv1fng63178VffF0KK
 e3TVaGkXVoWmZZs11zbkGu3fYkXqgFvJ1PFd/WDZN5m31XgehodZhFOHFXvN54Tc
 u+n3U0nGOAhE5SAKmQq1d1X3FqePGFnt2MoQVMvgWJ6Cj/yZ6KaMZdtKTXxXRwQ4
 S9efhT+niEMU0vnjYvtn4ru3g9HmQsJKD8N2t/e65MBPnRZlHIojeEYtLRIzT35d
 9I7j1SwrzjVjzA0COSxPEeFVRYfnqtdsKPqDPqu7VxRA7uGtT7yrf5C7l7cFp/FH
 7LVGqNuvagvY/fVLO2FW5yxCuqiII1yFT14pgyQ2m8QezZBQiWLiUXPIRBWYoxV0
 jZUWK0TBEQsg1CmuNc7x/rxL+K3HXUii8eMlD/FX8dZPfbbonEqf//CELzL05jjb
 Bz7nCRTSUkF23ahcba1tNb88n/4ILxV4CAHwoHs0i/XMWzVln4elHFb2morWEsWH
 HCTDIEGVKpxuUNutlVpwX9/OnklfsdqX6+Uvrd0w5Y0kl9EeFbtXylunzI1SY8sa
 fEP7K4QdPPPz8lBS4bDyR1KTTr9/haD8PwVJwf3pQ/oyjueDelveCxpuf4vsXW0b
 kGIROPjJRgHOW+DpKd/rV5ljBILfe9GNQPfRc1etcJi81aTTiraxE+wFUu1X9fes
 HZapAhJwv4Br9jGZS+Ff
 =BoE9
 -----END PGP SIGNATURE-----

Merge tag 'renesas-header-cleanup-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup

Merge "Renesas ARM Based SoC Header Cleanup for v3.17" from Simon Horman:

Move the most common shared header files for mach-shmobile
from <mach/foobar.h> to "foobar.h"

* tag 'renesas-header-cleanup-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case
  ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case
  ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h
  ARM: shmobile: Move common.h
  ARM: shmobile: Move most of irqs.h, keep some for pinctl
  ARM: shmobile: Move clock.h
  ARM: shmobile: Move dma-register.h
  ARM: shmobile: Move intc.h, cleanup sh_intc.h usage

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 17:05:57 -07:00
Alexander Shiyan 402277e0f8 ARM: clps711x: edb7211: Remove excess layer to calling clps711x_devices_init()
clps711x_devices_init() can be used directly in ".machine_init"
without any intermediate function.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 16:52:24 -07:00
Alexander Shiyan 8623916405 ARM: clps711x: clep7312: Add common devices initialization
Add initialization of commonly used devices to the CLEP7312 generic
board.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 16:52:20 -07:00
Alexander Shiyan 2d57f248c7 ARM: clps711x: Switch CLPS711X subarch to use cpuidle driver
This patch removes old support for cpuidle and switches all current
users to use new cpuidle driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 16:52:15 -07:00
Alexander Shiyan dd99eef5f6 ARM: clps711x: Move debug include into arch/arm/include/debug/
One more step to allowing CLPS711X to participate in the
multi-platform defconfig.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 16:52:05 -07:00
Alexander Shiyan a8a28affc3 ARM: clps711x: Remove IO_ADDRESS() macro
All uses of the IO_ADDRESS() macro has been removed.
This patch removes the definition of this macro.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-07-06 16:51:57 -07:00
Vincent Minet 179e847167 intel_pstate: Set CPU number before accessing MSRs
Ensure that cpu->cpu is set before writing MSR_IA32_PERF_CTL during CPU
initialization. Otherwise only cpu0 has its P-state set and all other
cores are left with their values unchanged.

In most cases, this is not too serious because the P-states will be set
correctly when the timer function is run.  But when the default governor
is set to performance, the per-CPU current_pstate stays the same forever
and no attempts are made to write the MSRs again.

Signed-off-by: Vincent Minet <vincent@vincent-minet.net>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 01:24:24 +02:00
Dirk Brandewie 41629a8233 intel_pstate: Update documentation of {max,min}_perf_pct sysfs files
Update documentation to make the interpretation of the values clearer

Link: https://bugzilla.kernel.org/show_bug.cgi?id=64251
Cc: 3.13+ <stable@vger.kernel.org>  # 3.13+
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 01:22:19 +02:00
Dirk Brandewie dd5fbf70f9 intel_pstate: don't touch turbo bit if turbo disabled or unavailable.
If turbo is disabled in the BIOS bit 38 should be set in
MSR_IA32_MISC_ENABLE register per section 14.3.2.1 of the SDM Vol 3
document 325384-050US Feb 2014.  If this bit is set do *not* attempt
to disable trubo via the MSR_IA32_PERF_CTL register.  On some systems
trying to disable turbo via MSR_IA32_PERF_CTL will cause subsequent
writes to MSR_IA32_PERF_CTL not take affect, in fact reading
MSR_IA32_PERF_CTL will not show the IDA/Turbo DISENGAGE bit(32) as
set. A write of bit 32 to zero returns to normal operation.

Also deal with the case where the processor does not support
turbo and the BIOS does not report the fact in MSR_IA32_MISC_ENABLE
but does report the max and turbo P states as the same value.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=64251
Cc: 3.13+ <stable@vger.kernel.org>  # 3.13+
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-07 01:22:19 +02:00