Commit Graph

59618 Commits

Author SHA1 Message Date
Mark Brown
17d1e25c88 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-01-22 11:00:04 +00:00
Mark Brown
709d228228 Merge remote-tracking branch 'lsk/v3.10/topic/hrtimer' into linux-linaro-lsk
Conflicts:
	kernel/time/clockevents.c
	kernel/time/tick-broadcast.c
	kernel/time/tick-common.c
	kernel/time/tick-internal.h
2015-01-21 22:27:49 +00:00
Preeti U Murthy
eab6f41c54 tick: Fixup more fallout from hrtimer broadcast mode
The hrtimer mode of broadcast is supported only when
GENERIC_CLOCKEVENTS_BROADCAST and TICK_ONESHOT config options
are enabled. Hence compile in the functions for hrtimer mode
of broadcast only when these options are selected.
Also fix max_delta_ticks value for the pseudo clock device.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/52F719EE.9010304@linux.vnet.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 849401b66d)
Signed-off-by: Mark Brown <broonie@kernel.org>

Conflicts:
	kernel/time/Makefile
2015-01-21 22:08:58 +00:00
Thomas Gleixner
a8db4f03c3 time: Fixup fallout from recent clockevent/tick changes
Make the stub function static inline instead of static and move the
clockevents related function into the proper ifdeffed section.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Soren Brinkmann <soren.brinkmann@xilinx.com>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
(cherry picked from commit f1689bb7ab)
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-21 22:08:21 +00:00
Preeti U Murthy
fe20b8ebfd tick: Introduce hrtimer based broadcast
On some architectures, in certain CPU deep idle states the local timers stop.
An external clock device is used to wakeup these CPUs. The kernel support for the
wakeup of these CPUs is provided by the tick broadcast framework by using the
external clock device as the wakeup source.

However not all implementations of architectures provide such an external
clock device. This patch includes support in the broadcast framework to handle
the wakeup of the CPUs in deep idle states on such systems by queuing a hrtimer
on one of the CPUs, which is meant to handle the wakeup of CPUs in deep idle states.

This patchset introduces a pseudo clock device which can be registered by the
archs as tick_broadcast_device in the absence of a real external clock
device. Once registered, the broadcast framework will work as is for these
architectures as long as the archs take care of the BROADCAST_ENTER
notification failing for one of the CPUs. This CPU is made the stand by CPU to
handle wakeup of the CPUs in deep idle and it *must not enter deep idle states*.

The CPU with the earliest wakeup is chosen to be this CPU. Hence this way the
stand by CPU dynamically moves around and so does the hrtimer which is queued
to trigger at the next earliest wakeup time. This is consistent with the case where
an external clock device is present. The smp affinity of this clock device is
set to the CPU with the earliest wakeup. This patchset handles the hotplug of
the stand by CPU as well by moving the hrtimer on to the CPU handling the CPU_DEAD
notification.

Originally-from: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: deepthi@linux.vnet.ibm.com
Cc: paulmck@linux.vnet.ibm.com
Cc: fweisbec@gmail.com
Cc: paulus@samba.org
Cc: srivatsa.bhat@linux.vnet.ibm.com
Cc: svaidy@linux.vnet.ibm.com
Cc: peterz@infradead.org
Cc: benh@kernel.crashing.org
Cc: rafael.j.wysocki@intel.com
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20140207080632.17187.80532.stgit@preeti.in.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 5d1638acb9)
Signed-off-by: Mark Brown <broonie@kernel.org>

Conflicts:
	kernel/time/Makefile
2015-01-21 22:08:01 +00:00
Preeti U Murthy
05c2671739 time: Change the return type of clockevents_notify() to integer
The broadcast framework can potentially be made use of by archs which do not have an
external clock device as well. Then, it is required that one of the CPUs need
to handle the broadcasting of wakeup IPIs to the CPUs in deep idle. As a
result its local timers should remain functional all the time. For such
a CPU, the BROADCAST_ENTER notification has to fail indicating that its clock
device cannot be shutdown. To make way for this support, change the return
type of tick_broadcast_oneshot_control() and hence clockevents_notify() to
indicate such scenarios.

Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: deepthi@linux.vnet.ibm.com
Cc: paulmck@linux.vnet.ibm.com
Cc: fweisbec@gmail.com
Cc: paulus@samba.org
Cc: srivatsa.bhat@linux.vnet.ibm.com
Cc: svaidy@linux.vnet.ibm.com
Cc: peterz@infradead.org
Cc: benh@kernel.crashing.org
Cc: rafael.j.wysocki@intel.com
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20140207080606.17187.78306.stgit@preeti.in.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit da7e6f45c3)
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-21 21:57:00 +00:00
Thomas Gleixner
6ad33af5f2 clockevents: Get rid of the notifier chain
7+ years and still a single user. Kill it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Link: http://lkml.kernel.org/r/20130425143436.098520211@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 7172a286ce)
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-21 21:50:31 +00:00
Mark Brown
22ad963d66 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Conflicts:
	arch/arm64/include/asm/processor.h
2015-01-18 20:50:26 +00:00
Mark Brown
71220c39c6 Merge remote-tracking branch 'lsk/v3.10/topic/of' into linux-linaro-lsk 2015-01-17 13:23:04 +00:00
Sudeep KarkadaNagesha
f1068f835e of/device: add helper to get cpu device node from logical cpu index
Multiple drivers need to get the cpu device node from the cpu logical
index and then access the of_node.

This patch adds helper function to fetch the device node directly.

Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
(cherry picked from commit bd00860e96)
Signed-off-by: Mark Brown <broonie@kernel.org>

Conflicts:
	include/linux/of_device.h
2015-01-17 13:22:35 +00:00
Mark Brown
d1f7a4c0bf Merge remote-tracking branch 'lsk/v3.10/topic/arm64-misc' into linux-linaro-lsk
Conflicts:
	arch/arm/include/asm/psci.h
	arch/arm/kernel/psci.c
	arch/arm/kernel/psci_smp.c
	arch/arm/kernel/setup.c
	arch/arm64/Kconfig
	arch/arm64/include/asm/cpu_ops.h
	arch/arm64/include/asm/pgtable.h
	arch/arm64/include/asm/psci.h
	arch/arm64/kernel/head.S
	arch/arm64/kernel/psci.c
	arch/arm64/kernel/ptrace.c
2015-01-17 01:23:42 +00:00
Robin Holt
c0131386ab reboot: x86: prepare reboot_mode for moving to generic kernel code
Prepare for the moving the parsing of reboot= to the generic kernel code
by making reboot_mode into a more generic form.

Signed-off-by: Robin Holt <holt@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Miguel Boton <mboton.lkml@gmail.com>
Cc: Russ Anderson <rja@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit edf2b13946)
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-16 22:20:18 +00:00
Mark Brown
69487098cc Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-01-16 22:07:03 +00:00
Mark Brown
c293f79246 This is the 3.10.65 stable release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJUuSd1AAoJEDjbvchgkmk+wMoQAKJJYrJzZZwsrc0xc4hdAhkR
 JN1hiFgJovcsVsAbz5VWBMJQGFfVVDGS3z8zZWFsAWNI1IwKqH/HzoUQ6PqDF/Vx
 /RtwD5ggYklB5jQY1khX2ITDh8Kr2do+JPyB7MyF9AVblNF6FI6JdqBA1sbZEAmO
 uJrw9859nI+XZ9tnR6+HJpSYXQgViT8StIQ1zk+cMmJfH8Pmv7H3VIOIyjUX6QAU
 bhPQPqdtmm95e/2SGLUsRg8iGpbj3+91k/El4Wox1r6G9ZrRiHZe/Xzb63IuynZI
 GQa072w3pT3iDZeweb3F2UNNx09XkcsAHNLGpq6g9Z+CgKoi9WCnXh2wkXa4DBmz
 MgbQjNIrW2JWf8GAdcODC3PCaN9dd4Jrhmmin8ilOaeG3J++hm0sIPiuBQLuYG6y
 Vggd5kg9DN0p9LxDTVtJmjqM1gMks8DBbVmCYqSCrfgZfebDOPtrW+uD303WdN4l
 VpXX7H6DFYQqRO9ssQwu+kObwb3+rlhxWUG2yBP8oh9ILcsYyaKpf3jO3QVWVEbI
 rN79nTcyhBi7baHf0V8vvxfTWn7/W7VYdOwAJ8L98txLzV/AE7xPx7nz5V7ZRM6I
 V71kfLZE/WpLJgkb6f0jrftb+RWZC2Qzdw5R/fO3GfcQTc6pVG2xxM6VYEoa9SrC
 wEQBYGiKtRNSFS6BdQf4
 =w+fk
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.65' into linux-linaro-lsk

This is the 3.10.65 stable release
2015-01-16 22:06:35 +00:00
Linus Torvalds
88b5d12c64 mm: propagate error from stack expansion even for guard page
commit fee7e49d45 upstream.

Jay Foad reports that the address sanitizer test (asan) sometimes gets
confused by a stack pointer that ends up being outside the stack vma
that is reported by /proc/maps.

This happens due to an interaction between RLIMIT_STACK and the guard
page: when we do the guard page check, we ignore the potential error
from the stack expansion, which effectively results in a missing guard
page, since the expected stack expansion won't have been done.

And since /proc/maps explicitly ignores the guard page (commit
d7824370e263: "mm: fix up some user-visible effects of the stack guard
page"), the stack pointer ends up being outside the reported stack area.

This is the minimal patch: it just propagates the error.  It also
effectively makes the guard page part of the stack limit, which in turn
measn that the actual real stack is one page less than the stack limit.

Let's see if anybody notices.  We could teach acct_stack_growth() to
allow an extra page for a grow-up/grow-down stack in the rlimit test,
but I don't want to add more complexity if it isn't needed.

Reported-and-tested-by: Jay Foad <jay.foad@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-16 06:59:03 -08:00
Tony Lindgren
c0d9d658fa pstore-ram: Allow optional mapping with pgprot_noncached
commit 027bc8b082 upstream.

On some ARMs the memory can be mapped pgprot_noncached() and still
be working for atomic operations. As pointed out by Colin Cross
<ccross@android.com>, in some cases you do want to use
pgprot_noncached() if the SoC supports it to see a debug printk
just before a write hanging the system.

On ARMs, the atomic operations on strongly ordered memory are
implementation defined. So let's provide an optional kernel parameter
for configuring pgprot_noncached(), and use pgprot_writecombine() by
default.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robherring2@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-16 06:59:00 -08:00
Mark Brown
a2ac82c9d0 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Conflicts:
	arch/arm/include/asm/hardware/coresight.h
	arch/arm/kernel/etm.c
2015-01-10 11:54:47 +00:00
Mark Brown
2156eda2aa Merge remote-tracking branch 'lsk/v3.10/topic/coresight' into linux-linaro-lsk
Conflicts:
	arch/arm/include/asm/hardware/coresight.h
	drivers/Makefile
	drivers/of/base.c
2015-01-09 18:22:45 +00:00
Mark Brown
bccb225417 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-01-08 18:54:26 +00:00
Mark Brown
bbba26b2fc This is the 3.10.64 stable release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJUrsVLAAoJEDjbvchgkmk+RrQP/A7r5xtIXvZ8+La82XYrsgd5
 wWL1Md1B8e1i78Te/TUA5jlcz8r2owE0LS8ZKJLvR0zbYSFsd5qKGoXKFZGnTBFE
 wKk5goj35f3/kiHe3z7wSiE2H94xcuq7Tl3dmwpToHg6xHrPs+Eb2/ndWRPPug80
 IVuaNFKx/bHg0DLX5zEfCDdoFM4LWjTadecFw7sKOKTO5ZIResbpY7c/B5augmI9
 g8tQchnuahVatoHjz8kmTnhLfOwkMTb8wCDfXGZKHCHJgr84DS8JBilnm7tfjTBw
 dWjlWEHrGfLcx/QP3n2oSvZjPW0TVAhD4CREQqj9lP4t9TuLDgOSVykXGUN39nvo
 giIa6AXiseeB76D6ZmTaoFOlUKelYtAqXkYJ32FCHuBMrozn/BN8Tncl5QdvBjtb
 mefUtKuClQuNstBGMeQ0TFR/r/nh2wZZRHq8lp0bEJ4La7JrsjEfiaaqB+F51eTT
 U1l1ksBViYrIw4AsuN0yV5x1bF2Ozbul/UayufJrsCXj/ztlKSni6tdMr3XEjoWV
 JQlBYJXXA2f1VqTlnQ9sGHBmIMewQvrk+sscMO1npT+wnXjDHSs5ig/1RPO8m4IG
 nE7zJlMRp/zFh6R6JlhpRlXXNmpMW3h2fleBGt+ZBFzz95QGtfpNofwQJDNemXwL
 GvBxJj3DEbPYXeF2n4dE
 =NWX6
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.64' into linux-linaro-lsk

This is the 3.10.64 stable release
2015-01-08 18:54:04 +00:00
Eric W. Biederman
1c587ee50e userns: Add a knob to disable setgroups on a per user namespace basis
commit 9cc46516dd upstream.

- Expose the knob to user space through a proc file /proc/<pid>/setgroups

  A value of "deny" means the setgroups system call is disabled in the
  current processes user namespace and can not be enabled in the
  future in this user namespace.

  A value of "allow" means the segtoups system call is enabled.

- Descendant user namespaces inherit the value of setgroups from
  their parents.

- A proc file is used (instead of a sysctl) as sysctls currently do
  not allow checking the permissions at open time.

- Writing to the proc file is restricted to before the gid_map
  for the user namespace is set.

  This ensures that disabling setgroups at a user namespace
  level will never remove the ability to call setgroups
  from a process that already has that ability.

  A process may opt in to the setgroups disable for itself by
  creating, entering and configuring a user namespace or by calling
  setns on an existing user namespace with setgroups disabled.
  Processes without privileges already can not call setgroups so this
  is a noop.  Prodcess with privilege become processes without
  privilege when entering a user namespace and as with any other path
  to dropping privilege they would not have the ability to call
  setgroups.  So this remains within the bounds of what is possible
  without a knob to disable setgroups permanently in a user namespace.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-08 09:58:16 -08:00
Eric W. Biederman
fc9b65e3d7 userns: Don't allow setgroups until a gid mapping has been setablished
commit 273d2c67c3 upstream.

setgroups is unique in not needing a valid mapping before it can be called,
in the case of setgroups(0, NULL) which drops all supplemental groups.

The design of the user namespace assumes that CAP_SETGID can not actually
be used until a gid mapping is established.  Therefore add a helper function
to see if the user namespace gid mapping has been established and call
that function in the setgroups permission check.

This is part of the fix for CVE-2014-8989, being able to drop groups
without privilege using user namespaces.

Reviewed-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-08 09:58:16 -08:00
Eric W. Biederman
4accc8c8e2 groups: Consolidate the setgroups permission checks
commit 7ff4d90b4c upstream.

Today there are 3 instances of setgroups and due to an oversight their
permission checking has diverged.  Add a common function so that
they may all share the same permission checking code.

This corrects the current oversight in the current permission checks
and adds a helper to avoid this in the future.

A user namespace security fix will update this new helper, shortly.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-08 09:58:16 -08:00
Pratik Patel
a66ebf16a4 coresight: add CoreSight core layer framework
CoreSight components are compliant with the ARM CoreSight
architecture specification and can be connected in various
topologies to suit a particular SoC tracing needs. These trace
components can generally be classified as sources, links and
sinks. Trace data produced by one or more sources flows through
the intermediate links connecting the source to the currently
selected sink.

The CoreSight framework provides an interface for the CoreSight trace
drivers to register themselves with. It's intended to build up a
topological view of the CoreSight components and configure the
correct serie of components on user input via sysfs.

For eg., when enabling a source, the framework builds up a path
consisting of all the components connecting the source to the
currently selected sink(s) and enables all of them.

The framework also supports switching between available sinks
and provides status information to user space applications
through the debugfs interface.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a06ae8609b)
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Conflicts:
	arch/arm/Kconfig.debug
	drivers/Makefile
2014-12-22 12:28:44 -07:00
Greg Kroah-Hartman
cf5b765ecb sysfs: create __ATTR_WO()
This creates the macro __ATTR_WO() for write-only attributes, instead of
having to "open define" them.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a65fcce75a)
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2014-12-22 10:50:40 -07:00
Oliver Schinagl
d1adb5fedc sysfs: add more helper macro's for (bin_)attribute(_groups)
With the recent changes to sysfs there's various helper macro's.
However there's no RW, RO BIN_ helper macro's. This patch adds them.

Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3493f69f4c)
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Conflicts:
	include/linux/sysfs.h
2014-12-22 10:50:23 -07:00
Oliver Schinagl
452f486a3a sysfs: use file mode defines from stat.h
With the last patches stat.h was included to the header, and thus those
permission defines should be used.

Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit aa01aa3ca2)
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Conflicts:
	include/linux/sysfs.h
2014-12-22 10:49:29 -07:00
Mathieu Poirier
bfab9062c7 bitops: Introduce a more generic BITMASK macro
This patch is back-porting the generic _portion_ of
10ef6b0dff to 3.10

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2014-12-22 10:49:12 -07:00
Greg Kroah-Hartman
54d37488ba driver core: create write-only attribute macros for devices and drivers
This creates the macros DRIVER_ATTR_WO() and DEVICE_ATTR_WO() for
write-only attributes for drivers and devices.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 25d134e51f990962ecb54e5449c97b82f818ab30)
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2014-12-22 10:48:47 -07:00
Mathieu Poirier
f746093345 of: back-porting generic graph bindings
This patch is back-porting the generic _portion_ of
f2a575f676 to 3.10

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2014-12-22 10:45:55 -07:00
Mathieu Poirier
2990c832ab of: back-porting v4l2 graph bindings
This patch is back-porting the generic _portion_ of
fd9fdb78a9 to 3.10

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2014-12-22 10:45:39 -07:00
Greg Kroah-Hartman
a6f79c5f0b driver core: device.h: add RW and RO attribute macros
Make it easier to create attributes without having to always audit the
mode settings.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit aead4f11289457e4c4dd8c65e901740fe18e5750)
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2014-12-22 10:44:50 -07:00
Mark Brown
f891dfcd5f Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-12-13 11:40:22 +00:00
Mark Brown
3e5fe00cd3 Merge remote-tracking branch 'lsk/v3.10/topic/genpd' into linux-linaro-lsk 2014-12-13 11:39:36 +00:00
Tomasz Figa
6920cae74d PM / Domains: Add generic OF-based PM domain look-up
This patch introduces generic code to perform PM domain look-up using
device tree and automatically bind devices to their PM domains.

Generic device tree bindings are introduced to specify PM domains of
devices in their device tree nodes.

Backwards compatibility with legacy Samsung-specific PM domain bindings
is provided, but for now the new code is not compiled when
CONFIG_ARCH_EXYNOS is selected to avoid collision with legacy code.
This will change as soon as the Exynos PM domain code gets converted to
use the generic framework in further patch.

This patch was originally submitted by Tomasz Figa when he was employed
by Samsung.

Link: http://marc.info/?l=linux-pm&m=139955349702152&w=2
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit aa42240ab2)
Signed-off-by: Mark Brown <broonie@kernel.org>

Conflicts:
	include/linux/pm_domain.h
2014-12-12 20:06:29 +00:00
Ulf Hansson
99afc71dc9 PM / Domains: Add a detach callback to the struct dev_pm_domain
The intent of this callback is to simplify detachment of devices from
their PM domains. Further patches will show the benefit.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit c3099a5294)
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-12 20:06:03 +00:00
Mark Brown
7d8d2b5924 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-12-10 11:40:18 +00:00
Mark Brown
32a13f39f5 Merge remote-tracking branch 'lsk/v3.10/topic/clk-divider' into linux-linaro-lsk 2014-12-08 19:27:55 +00:00
Maxime COQUELIN
87ad06cba7 clk: divider: Add round to closest divider
In some cases, we want to be able to round the divider to the closest one,
instead than rounding up.

This patch adds a new CLK_DIVIDER_ROUND_CLOSEST flag to specify the divider
has to round to closest div, keeping rounding up as de default behaviour.

Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
(cherry picked from commit 774b514390)
Signed-off-by: Mark Brown <broonie@kernel.org>

Conflicts:
	include/linux/clk-provider.h
2014-12-08 19:26:53 +00:00
Mark Brown
2945d85a83 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-12-08 11:56:03 +00:00
Mark Brown
8d1d9d8058 This is the 3.10.62 stable release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJUg5eFAAoJEDjbvchgkmk+rjgQAKDGnHhjoqt/0Pipbk2WA4Zo
 PxcAOnVPnyEWVnJHmh3Q4zff4nqyea8HaKYS1bPqI1HL5zT27XvWcLuQz7O3RVM7
 x9YBJ0eOBMFmx2fuBN0m3cAFhesN8yTOl5dzEO2iYc37R93VkR8f5maNTkgdOCY2
 OP4oQnMzkAD2xXnYqieNVVH4gXcnVBEv00aYg5YFyb1rk8GQfOStRkzAldgXOZlF
 7Le7QNDryfupXTZJmpa2WTcAvaEwA0Zyap3alKImuaQk4A033N5fjhdwYa1xhBbS
 8Wh2YpuFmPZjn48UDJCgW6MksxStTWb0q+PZL8nMi5M3LfLDlu6bStE/c2BkMLv4
 ShfWFg0BBBi7g4fyiApIhExBLboI5U4NZIe/McQuOmuufc2sNFmPxY0gfVnBTrWk
 etN6xnKZY+qTIziQPpvqkjmK/XKVs5GWDPLjVtD1ESFVc0EjJ5NtChhrwvXsZv+8
 xA87LOIt5tnUI1bFePs2kmvX/K/kIdpA5uw7FRnPwIndvgyBjY7t15ydES2Xd/2G
 R3zHZoAi0lZmFpAwn1wYPrNHWeWsmOTZB861SpnhDARASG71blU6E998BztleX/F
 fhZPc0viqAUuW92UukVRa2FfWCzo30SGL1a0z+wOY+9EcjSlGCl8r2imlEMJpbTy
 icak2X6HF97v1H+c/4oe
 =tBe/
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.62' into linux-linaro-lsk

This is the 3.10.62 stable release
2014-12-08 11:55:40 +00:00
Cristina Ciocan
8743a13960 iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask
commit ccf54555da upstream.

The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask
in order to retrieve it, that is 0x7F, not 0xCF as it is now.

Fixes: ade7ef7ba (staging:iio: Differential channel handling)
Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06 15:05:47 -08:00
Benjamin Herrenschmidt
4c8ecdca12 PCI/MSI: Add device flag indicating that 64-bit MSIs don't work
commit f144d1496b upstream.

This can be set by quirks/drivers to be used by the architecture code
that assigns the MSI addresses.

We additionally add verification in the core MSI code that the values
assigned by the architecture do satisfy the limitation in order to fail
gracefully if they don't (ie. the arch hasn't been updated to deal with
that quirk yet).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06 15:05:47 -08:00
Vincent BENAYOUN
07729b8d98 inetdevice: fixed signed integer overflow
[ Upstream commit 84bc88688e ]

There could be a signed overflow in the following code.

The expression, (32-logmask) is comprised between 0 and 31 included.
It may be equal to 31.
In such a case the left shift will produce a signed integer overflow.
According to the C99 Standard, this is an undefined behavior.
A simple fix is to replace the signed int 1 with the unsigned int 1U.

Signed-off-by: Vincent BENAYOUN <vincent.benayoun@trust-in-soft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06 15:05:46 -08:00
Mark Brown
38dce4af8d Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-11-22 11:07:41 +00:00
Mark Brown
50881c752b Merge remote-tracking branch 'lsk/v3.10/topic/mailbox' into linux-linaro-lsk
Conflicts:
	drivers/mailbox/mailbox.c
	include/linux/mailbox_controller.h
2014-11-21 23:43:29 +00:00
Jassi Brar
e28a642ae1 mailbox: Introduce framework for mailbox
Introduce common framework for client/protocol drivers and
controller drivers of Inter-Processor-Communication (IPC).

Client driver developers should have a look at
 include/linux/mailbox_client.h to understand the part of
the API exposed to client drivers.
Similarly controller driver developers should have a look
at include/linux/mailbox_controller.h

Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
(cherry picked from commit 2b6d83e2b8)
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 23:41:41 +00:00
Suman Anna
da1660d32f mailbox: rename pl320-ipc specific mailbox.h
The patch 30058677 "ARM / highbank: add support for pl320 IPC"
added a pl320 IPC specific header file as a generic mailbox.h.
This file has been renamed appropriately to allow the
introduction of the generic mailbox API framework.

Acked-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
(cherry picked from commit f2fc42b6ac)
Signed-off-by: Mark Brown <broonie@kernel.org>

Conflicts:
	arch/arm/mach-highbank/highbank.c
2014-11-21 23:41:30 +00:00
Mark Brown
5d0676ad29 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-11-21 18:53:31 +00:00
Mark Brown
09cc926e9a This is the 3.10.61 stable release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUb3UPAAoJEDjbvchgkmk+FWYP/Ail5smoltisgghY45T+OFvj
 tnoQJBw7dp+39QGjRdI6KQ6A6ub7epg8bCifKErU7hSsnOngZ+bgZWFu/TLSTtHd
 +Oqdgr2BnPcDMKBu0mZ+rvDlDfL5J4wpiMGtthNdg7h6ISwaaaOc5q/6Yzl7rdp6
 laGD260p1Iq93Ji6RuWbtCzlCyQTfcePiS2B+2rDk98fbegQBDcJjshOSw6EMLqU
 imJH59SiaOnarBfhuwEj0RU2aeqCYvQ7tT7QvcGBx6iWYHA3s7wuUBO/F8yI0woH
 gXij9uEKFwoOe83FCJAhAjLnhOmxuhpzM/oO6a/clUkXwkfCvh6mcwwzGIhc6p9a
 9BNKnq4soP0zpSTxxWb6riduS11cOc7LvPTZSCPY1yeyOw3iCOCZtR+e547gGpkP
 ukj1fCplg7G586wjMDXI268vW+RodG72bZjgVbCvF7EjERW2lVXnt198HlndK1p/
 WMVbBJ1wPR5gHro+9UGXl6/dOe5pVJOBMFV7Sz/OzG5eJELTdKZkg74ZTDqlFxuW
 oTUrnpD7xPCz1UZnPmxS9svc2hfqyHBiVJ+0sEizU88dEf7P/6ksWx4TJ+vrvvgD
 TECbL7gaCv0h3Yl3LoPrtD9X4SdJM+JvnpkjwePwKfP64tqlNzLU9eVh115C58D6
 /mna99U6PDwSiquT4bHu
 =TuNu
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.61' into linux-linaro-lsk

This is the 3.10.61 stable release
2014-11-21 18:53:19 +00:00