ARM: Stop irqsoff trace on return to user

If the irqsoff tracer is in use, stop tracing the interrupt disable
interval when returning to userspace.  Tracing userspace execution
time as interrupts disabled time is not helpful for kernel
performance analysis purposes.  Only do so if the irqsoff tracer
is enabled, to avoid overhead purely for lockdep, which doesn't
care.

Change-Id: I74cde7dd0c4c3a783af34e76bd4efc1f85315abe
Signed-off-by: Todd Poynor <toddpoynor@google.com>
(cherry picked from commit 20713df2d48712bab9b4d690fbf838c8f3fc3927)

Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
Signed-off-by: garwedgess <garethwilliams21@gmail.com>
cpufreq: Prevent memory leak in cpufreq_stats on hotplug

Ensures that cpufreq_stats_free_table is called before
__cpufreq_remove_dev on cpu hotplug (which also occurs during
suspend on SMP systems) to make sure that sysfs_remove_group
can get called before the cpufreq kobj is freed.  Otherwise,
the sysfs file structures are leaked.

Change-Id: I87e55277272f5cfad47e9e7c92630e990bb90069
Signed-off-by: Colin Cross <ccross@android.com>
(cherry picked from commit 094ea9f2b10e36fe2935333774cab69d6fea8bc4)

Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
Signed-off-by: garwedgess <garethwilliams21@gmail.com>
proc: make /proc/pid/limits world readable

Having the limits file world readable will ease the task of system
management on systems where root privileges might be restricted.

Having admin restricted with root priviledges, he/she could not check
other users process' limits.

Also it'd align with most of the /proc stat files.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Eugene Teo <eugene@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit da8cc55f48eaf76aef7e5f776b327575e3f70fdd)

Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
Signed-off-by: garwedgess <garethwilliams21@gmail.com>
fix merge conflicts

Change-Id: Ibffe7a20d584470f313e142a03386d9d785b02e0