]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
8 years agotime: Add timekeeping snapshot code capturing system time and counter
Christopher S. Hall [Mon, 22 Feb 2016 11:15:20 +0000 (03:15 -0800)]
time: Add timekeeping snapshot code capturing system time and counter

BugLink: http://bugs.launchpad.net/bugs/1519625
In the current timekeeping code there isn't any interface to
atomically capture the current relationship between the system counter
and system time. ktime_get_snapshot() returns this triple (counter,
monotonic raw, realtime) in the system_time_snapshot struct.

Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: kevin.b.stanton@intel.com
Cc: kevin.j.clarke@intel.com
Cc: hpa@zytor.com
Cc: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Christopher S. Hall <christopher.s.hall@intel.com>
[jstultz: Moved structure definitions around to clean things up,
 fixed cycles_t/cycle_t confusion.]
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit 9da0f49c8767cc0ef6101cb21156cf4380ed50dd)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agotime: Add cycles to nanoseconds translation
Christopher S. Hall [Mon, 22 Feb 2016 11:15:19 +0000 (03:15 -0800)]
time: Add cycles to nanoseconds translation

BugLink: http://bugs.launchpad.net/bugs/1519625
The timekeeping code does not currently provide a way to translate
externally provided clocksource cycles to system time. The cycle count
is always provided by the result clocksource read() method internal to
the timekeeping code. The added function timekeeping_cycles_to_ns()
calculated a nanosecond value from a cycle count that can be added to
tk_read_base.base value yielding the current system time. This allows
clocksource cycle values external to the timekeeping code to provide a
cycle count that can be transformed to system time.

Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: kevin.b.stanton@intel.com
Cc: kevin.j.clarke@intel.com
Cc: hpa@zytor.com
Cc: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Christopher S. Hall <christopher.s.hall@intel.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit 6bd58f09e1d8cc6c50a824c00bf0d617919986a1)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoclocksource: Make clocksource validation work for all clocksources
Yang Yingliang [Sat, 31 Oct 2015 10:20:55 +0000 (18:20 +0800)]
clocksource: Make clocksource validation work for all clocksources

BugLink: http://bugs.launchpad.net/bugs/1519625
The clocksource validation which makes sure that the newly read value
is not smaller than the last value only works if the clocksource mask
is 64bit, i.e. the counter is 64bit wide. But we want to use that
mechanism also for clocksources which are less than 64bit wide.

So instead of checking whether bit 63 is set, we check whether the
most significant bit of the clocksource mask is set in the delta
result. If it is set, we return 0.

[ tglx: Simplified the implementation, added a comment and massaged
   the commit message ]

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Link: http://lkml.kernel.org/r/56349607.6070708@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 1f45f1f33c8c8b96722dbc5e6b7acf74eaa721f7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agotimekeeping: Cap adjustments so they don't exceed the maxadj value
John Stultz [Thu, 3 Dec 2015 18:23:30 +0000 (10:23 -0800)]
timekeeping: Cap adjustments so they don't exceed the maxadj value

BugLink: http://bugs.launchpad.net/bugs/1519625
Thus its been occasionally noted that users have seen
confusing warnings like:

    Adjusting tsc more than 11% (5941981 vs 7759439)

We try to limit the maximum total adjustment to 11% (10% tick
adjustment + 0.5% frequency adjustment). But this is done by
bounding the requested adjustment values, and the internal
steering that is done by tracking the error from what was
requested and what was applied, does not have any such limits.

This is usually not problematic, but in some cases has a risk
that an adjustment could cause the clocksource mult value to
overflow, so its an indication things are outside of what is
expected.

It ends up most of the reports of this 11% warning are on systems
using chrony, which utilizes the adjtimex() ADJ_TICK interface
(which allows a +-10% adjustment). The original rational for
ADJ_TICK unclear to me but my assumption it was originally added
to allow broken systems to get a big constant correction at boot
(see adjtimex userspace package for an example) which would allow
the system to work w/ ntpd's 0.5% adjustment limit.

Chrony uses ADJ_TICK to make very aggressive short term corrections
(usually right at startup). Which push us close enough to the max
bound that a few late ticks can cause the internal steering to push
past the max adjust value (tripping the warning).

Thus this patch adds some extra logic to enforce the max adjustment
cap in the internal steering.

Note: This has the potential to slow corrections when the ADJ_TICK
value is furthest away from the default value. So it would be good to
get some testing from folks using chrony, to make sure we don't
cause any troubles there.

Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Tested-by: Miroslav Lichvar <mlichvar@redhat.com>
Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit ec02b076ceab63f99e5b3d80fd223d777266c236)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agotimekeeping: Provide internal function __ktime_get_real_seconds
DengChao [Sun, 13 Dec 2015 04:24:18 +0000 (12:24 +0800)]
timekeeping: Provide internal function __ktime_get_real_seconds

BugLink: http://bugs.launchpad.net/bugs/1519625
In order to fix Y2038 issues in the ntp code we will need replace
get_seconds() with ktime_get_real_seconds() but as the ntp code uses
the timekeeping lock which is also used by ktime_get_real_seconds(),
we need a version without locking.
Add a new function __ktime_get_real_seconds() in timekeeping to
do this.

Reviewed-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: DengChao <chao.deng@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit dee3665416a8553279d10b62b5e62685cbe5daa8)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agotime: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow
John Stultz [Fri, 4 Dec 2015 03:09:31 +0000 (22:09 -0500)]
time: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

BugLink: http://bugs.launchpad.net/bugs/1519625
For adjtimex()'s ADJ_SETOFFSET, make sure the tv_usec value is
sane. We might multiply them later which can cause an overflow
and undefined behavior.

This patch introduces new helper functions to simplify the
checking code and adds comments to clarify

Orginally this patch was by Sasha Levin, but I've basically
rewritten it, so he should get credit for finding the issue
and I should get the blame for any mistakes made since.

Also, credit to Richard Cochran for the phrasing used in the
comment for what is considered valid here.

Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit 37cf4dc3370fbca0344e23bb96446eb2c3548ba7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoclk: xgene: Add SoC and PMD PLL clocks with v2 hardware
Loc Ho [Wed, 20 Jan 2016 02:27:42 +0000 (19:27 -0700)]
clk: xgene: Add SoC and PMD PLL clocks with v2 hardware

BugLink: http://bugs.launchpad.net/bugs/1561604
Add X-Gene SoC and PMD PLL clocks support for v2 hardware.
X-Gene SoC v2 and above use an slightly different SoC
and PMD PLL hardware logic.

Signed-off-by: Loc Ho <lho@apm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 47727beb26569725f6c200cde2c38bd1e9f6f1b0)
Signed-off-by: Craig Magina <craig.magina@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86/intel: Use PAGE_SIZE for PEBS buffer size on Core2
Jiri Olsa [Tue, 1 Mar 2016 19:03:52 +0000 (20:03 +0100)]
perf/x86/intel: Use PAGE_SIZE for PEBS buffer size on Core2

BugLink: http://bugs.launchpad.net/bugs/1559914
Using PAGE_SIZE buffers makes the WRMSR to PERF_GLOBAL_CTRL in
intel_pmu_enable_all() mysteriously hang on Core2. As a workaround, we
don't do this.

The hard lockup is easily triggered by running 'perf test attr'
repeatedly. Most of the time it gets stuck on sample session with
small periods.

  # perf test attr -vv
  14: struct perf_event_attr setup                             :
  --- start ---
  ...
    'PERF_TEST_ATTR=/tmp/tmpuEKz3B /usr/bin/perf record -o /tmp/tmpuEKz3B/perf.data -c 123 kill >/dev/null 2>&1' ret 1

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: <stable@vger.kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20160301190352.GA8355@krava.redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit e72daf3f4d764c47fb71c9bdc7f9c54a503825b1)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event.h to its new home
Borislav Petkov [Wed, 10 Feb 2016 09:55:23 +0000 (10:55 +0100)]
perf/x86: Move perf_event.h to its new home

BugLink: http://bugs.launchpad.net/bugs/1559914
Now that all functionality has been moved to arch/x86/events/, move the
perf_event.h header and adjust include paths.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-18-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 27f6d22b037b2be6685e0e27cce929779d634119)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_msr.c .............. => x86/events/msr.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:22 +0000 (10:55 +0100)]
perf/x86: Move perf_event_msr.c .............. => x86/events/msr.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-17-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 65a27a3510c82f16e673548b4c819462fabb12ae)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_p6.c ............... => x86/events/intel/p6.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:21 +0000 (10:55 +0100)]
perf/x86: Move perf_event_p6.c ............... => x86/events/intel/p6.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-16-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 5e865ed44b39fa991a8fb1d7d9c0338f8fedac33)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_p4.c ............... => x86/events/intel/p4.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:20 +0000 (10:55 +0100)]
perf/x86: Move perf_event_p4.c ............... => x86/events/intel/p4.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-15-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit f03e97dbd2bb7d9436400fb6946502268ab33542)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_knc.c .............. => x86/events/intel/knc.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:19 +0000 (10:55 +0100)]
perf/x86: Move perf_event_knc.c .............. => x86/events/intel/knc.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-14-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit edbb591870dc8d1fd855014ea5360475f7bc46af)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_uncore_snbep.c => x86/events/intel/uncore_snbep.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:18 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_uncore_snbep.c => x86/events/intel/uncore_snbep.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-13-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit ed367e6ca42716a11a6d1b5162fdd378f9494eff)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_uncore_snb.c => x86/events/intel/uncore_snb.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:17 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_uncore_snb.c => x86/events/intel/uncore_snb.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-12-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 92553e40c6292408faa069b34a6db0dab4055080)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_uncore_nhmex.c => x86/events/intel/uncore_nmhex.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:16 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_uncore_nhmex.c => x86/events/intel/uncore_nmhex.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-11-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 35bf705c25e875f40ff8ed6af415315335973977)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_uncore.[ch] .. => x86/events/intel/uncore.[ch]
Borislav Petkov [Wed, 10 Feb 2016 09:55:15 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_uncore.[ch] .. => x86/events/intel/uncore.[ch]

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-10-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 6bcb2db547be8263a98ae9413127df9385b38763)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_rapl.c ....... => x86/events/intel/rapl.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:14 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_rapl.c ....... => x86/events/intel/rapl.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-9-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 609d809f832ddda20f03029c865dd052596ea394)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_pt.[ch] ...... => x86/events/intel/pt.[ch]
Borislav Petkov [Wed, 10 Feb 2016 09:55:13 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_pt.[ch] ...... => x86/events/intel/pt.[ch]

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-8-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit fd1c601c25785ef38d698ff0091b5fe253074715)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_lbr.c ........ => x86/events/intel/lbr.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:12 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_lbr.c ........ => x86/events/intel/lbr.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-7-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit c85cc4497f823b83379a23e798018d69fe566185)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_ds.c ......... => x86/events/intel/ds.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:11 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_ds.c ......... => x86/events/intel/ds.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-6-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 7010d129137aa44a79a6a1911881e07e1cd5da60)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_cstate.c ..... => x86/events/intel/cstate.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:10 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_cstate.c ..... => x86/events/intel/cstate.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-5-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 6aec1ad7365661315e9ab13b17eeb97ab3c38176)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_cqm.c ........ => x86/events/intel/cqm.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:09 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_cqm.c ........ => x86/events/intel/cqm.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-4-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 5c781a3daa3053c355259894f9e7a478deb0cb46)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel.c ............ => x86/events/intel/core.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:08 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel.c ............ => x86/events/intel/core.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit e1069839dd6893d2135b2fc4d96e5d03d73c2c3d)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_intel_bts.c ........ => x86/events/intel/bts.c
Borislav Petkov [Wed, 10 Feb 2016 09:55:07 +0000 (10:55 +0100)]
perf/x86: Move perf_event_intel_bts.c ........ => x86/events/intel/bts.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Start moving the Intel bits.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1455098123-11740-2-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit af5d3aabc04a4b7732b1d3404feebadfe5ae9362)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c
Borislav Petkov [Mon, 8 Feb 2016 16:09:08 +0000 (17:09 +0100)]
perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-6-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit d0af1c0525d561fe3ab6d7a767cdd52704da25cd)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch]
Borislav Petkov [Mon, 8 Feb 2016 16:09:07 +0000 (17:09 +0100)]
perf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch]

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-5-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 5b26547dd7faa84e1293baa144a0f3e74ed7d4c7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c
Borislav Petkov [Mon, 8 Feb 2016 16:09:06 +0000 (17:09 +0100)]
perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-4-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 218cfe4ed8885f988d67ac5f52efeff7233ae1f2)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c
Borislav Petkov [Mon, 8 Feb 2016 16:09:05 +0000 (17:09 +0100)]
perf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c

BugLink: http://bugs.launchpad.net/bugs/1559914
We distribute those in vendor subdirs, starting with .../events/amd/.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 39b0332a215832ce3a8f8f57344da4a64370e3ca)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoperf/x86: Move perf_event.c ............... => x86/events/core.c
Borislav Petkov [Mon, 8 Feb 2016 16:09:04 +0000 (17:09 +0100)]
perf/x86: Move perf_event.c ............... => x86/events/core.c

BugLink: http://bugs.launchpad.net/bugs/1559914
Also, keep the churn at minimum by adjusting the include "perf_event.h"
when each file gets moved.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-2-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit fa9cbf320e996eaa3d219344b6f7013b096cafd9)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agomfd: intel-lpss: Pass I2C configuration via properties on BXT
Mika Westerberg [Tue, 26 Jan 2016 12:17:49 +0000 (14:17 +0200)]
mfd: intel-lpss: Pass I2C configuration via properties on BXT

BugLink: http://bugs.launchpad.net/bugs/1520139
I2C host controller need to be configured properly in order to meet I2C
timings specified in the I2C protocol specification. Some Intel Broxton
based machines do not have this information in the ACPI namespace (or the
boot firmware does not support ACPI at all) so we use build-in device
properties instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 0343b2f4e4a52c907d7676ce3159e0b5e7f0301c)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: Start new release
Tim Gardner [Fri, 25 Mar 2016 02:40:59 +0000 (20:40 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: Ubuntu-4.4.0-16.32
Tim Gardner [Thu, 24 Mar 2016 20:33:15 +0000 (14:33 -0600)]
UBUNTU: Ubuntu-4.4.0-16.32

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoThermal: Ignore invalid trip points
Zhang Rui [Fri, 18 Mar 2016 02:03:24 +0000 (10:03 +0800)]
Thermal: Ignore invalid trip points

BugLink: http://bugs.launchpad.net/bugs/1561676
In some cases, platform thermal driver may report invalid trip points,
thermal core should not take any action for these trip points.

This fixed a regression that bogus trip point starts to screw up thermal
control on some Lenovo laptops, after
commit bb431ba26c5cd0a17c941ca6c3a195a3a6d5d461
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Fri Oct 30 16:31:47 2015 +0800

    Thermal: initialize thermal zone device correctly

    After thermal zone device registered, as we have not read any
    temperature before, thus tz->temperature should not be 0,
    which actually means 0C, and thermal trend is not available.
    In this case, we need specially handling for the first
    thermal_zone_device_update().

    Both thermal core framework and step_wise governor is
    enhanced to handle this. And since the step_wise governor
    is the only one that uses trends, so it's the only thermal
    governor that needs to be updated.

Tested-by: Manuel Krause <manuelkrause@netscape.net>
Tested-by: szegad <szegadlo@poczta.onet.pl>
Tested-by: prash <prash.n.rao@gmail.com>
Tested-by: amish <ammdispose-arch@yahoo.com>
Tested-by: Matthias <morpheusxyz123@yahoo.de>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
CC: <stable@vger.kernel.org> #3.18+
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317190
Link: https://bugzilla.kernel.org/show_bug.cgi?id=114551
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit 81ad4276b505e987dd8ebbdf63605f92cd172b52)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) Input: synaptics - handle spurious release of trackstick button...
Benjamin Tissoires [Thu, 24 Mar 2016 20:04:25 +0000 (16:04 -0400)]
UBUNTU: SAUCE: (noup) Input: synaptics - handle spurious release of trackstick buttons, again

BugLink: http://bugs.launchpad.net/bugs/1553811
Looks like the fimware 8.2 stall has the extra buttons spurious release
bug.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: apparmor: Consult sysctl when reading profiles in a user ns
Tyler Hicks [Wed, 23 Mar 2016 21:41:33 +0000 (16:41 -0500)]
UBUNTU: SAUCE: apparmor: Consult sysctl when reading profiles in a user ns

BugLink: https://launchpad.net/bugs/1560583
Check the value of the unprivileged_userns_apparmor_policy sysctl when a
namespace root process attempts to read the apparmorfs profiles file.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: apparmor: Allow ns_root processes to open profiles file
Tyler Hicks [Wed, 23 Mar 2016 21:26:20 +0000 (16:26 -0500)]
UBUNTU: SAUCE: apparmor: Allow ns_root processes to open profiles file

BugLink: https://launchpad.net/bugs/1560583
Change the apparmorfs profiles file permissions check to better match
the old requirements before the apparmorfs permissions were changed to
allow profile loads inside of confined, first-level user namespaces.

Historically, the profiles file has been readable by the root user and
group. A recent change added the requirement that the process have the
CAP_MAC_ADMIN capability. This is a problem for confined processes since
keeping the 'capability mac_admin,' rule out of the AppArmor profile is
often desired.

This patch replaces the CAP_MAC_ADMIN requirement with a requirement
that the process is root in its user namespace.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: ubuntu: vbox -- update to 5.0.16-dfsg-2
Andy Whitcroft [Thu, 24 Mar 2016 12:09:19 +0000 (12:09 +0000)]
UBUNTU: ubuntu: vbox -- update to 5.0.16-dfsg-2

BugLink: http://bugs.launchpad.net/bugs/1561492
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=n for s390x
Tim Gardner [Thu, 24 Mar 2016 12:27:35 +0000 (06:27 -0600)]
UBUNTU: [Config] CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=n for s390x

BugLink: http://bugs.launchpad.net/bugs/1557690
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] zfs -- disable powerpc until the test failures can be resolved
Andy Whitcroft [Wed, 23 Mar 2016 19:32:32 +0000 (19:32 +0000)]
UBUNTU: [Config] zfs -- disable powerpc until the test failures can be resolved

BugLink: http://bugs.launchpad.net/bugs/1519814
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: [Config] s390x -- re-enable zfs
Dimitri John Ledkov [Wed, 16 Mar 2016 21:43:54 +0000 (17:43 -0400)]
UBUNTU: [Config] s390x -- re-enable zfs

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
BugLink: http://bugs.launchpad.net/bugs/1519814
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) Update spl to 0.6.5.6-0ubuntu1, zfs to 0.6.5.6-0ubuntu1
Dimitri John Ledkov [Wed, 16 Mar 2016 21:43:54 +0000 (17:43 -0400)]
UBUNTU: SAUCE: (noup) Update spl to 0.6.5.6-0ubuntu1, zfs to 0.6.5.6-0ubuntu1

BugLink: http://bugs.launchpad.net/bugs/1561483
Signed-off-by: Colin Ian King <colin.king@canonical.com>
8 years agoUBUNTU: [Config] powerpc -- convert zfs configuration to custom_override
Andy Whitcroft [Thu, 10 Mar 2016 12:11:40 +0000 (12:11 +0000)]
UBUNTU: [Config] powerpc -- convert zfs configuration to custom_override

BugLink: http://bugs.launchpad.net/bugs/1558871
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: [Packaging] zfs -- handle rprovides via dpkg-gencontrol
Andy Whitcroft [Thu, 10 Mar 2016 16:07:35 +0000 (16:07 +0000)]
UBUNTU: [Packaging] zfs -- handle rprovides via dpkg-gencontrol

BugLink: http://bugs.launchpad.net/bugs/1558871
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) fuse: Add reference counting for fuse_io_priv
Seth Forshee [Tue, 22 Mar 2016 13:52:01 +0000 (08:52 -0500)]
UBUNTU: SAUCE: (noup) fuse: Add reference counting for fuse_io_priv

BugLink: http://bugs.launchpad.net/bugs/1505948
The 'reqs' member of fuse_io_priv serves two purposes. First is to track
the number of oustanding async requests to the server and to signal that
the io request is completed. The second is to be a reference count on the
structure to know when it can be freed.

For sync io requests these purposes can be at odds.  fuse_direct_IO() wants
to block until the request is done, and since the signal is sent when
'reqs' reaches 0 it cannot keep a reference to the object. Yet it needs to
use the object after the userspace server has completed processing
requests. This leads to some handshaking and special casing that it
needlessly complicated and responsible for at least one race condition.

It's much cleaner and safer to maintain a separate reference count for the
object lifecycle and to let 'reqs' just be a count of outstanding requests
to the userspace server. Then we can know for sure when it is safe to free
the object without any handshaking or special cases.

The catch here is that most of the time these objects are stack allocated
and should not be freed. Initializing these objects with a single reference
that is never released prevents accidental attempts to free the objects.

Fixes: 9d5722b7777e ("fuse: handle synchronous iocbs internally")
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(backported from commit 744742d692e37ad5c20630e57d526c8f2e2fe3c9
 git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) fuse: do not use iocb after it may have been freed
Robert Doebbelin [Tue, 22 Mar 2016 13:52:00 +0000 (08:52 -0500)]
UBUNTU: SAUCE: (noup) fuse: do not use iocb after it may have been freed

BugLink: http://bugs.launchpad.net/bugs/1505948
There's a race in fuse_direct_IO(), whereby is_sync_kiocb() is called on an
iocb that could have been freed if async io has already completed.  The fix
in this case is simple and obvious: cache the result before starting io.

It was discovered by KASan:

kernel: ==================================================================
kernel: BUG: KASan: use after free in fuse_direct_IO+0xb1a/0xcc0 at addr ffff88036c414390

Signed-off-by: Robert Doebbelin <robert@quobyte.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: bcba24ccdc82 ("fuse: enable asynchronous processing direct IO")
Cc: <stable@vger.kernel.org> # 3.10+
(cherry picked from commit 7cabc61e01a0a8b663bd2b4c982aa53048218734
 git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) cgroup namespaces: add a 'nsroot=' mountinfo field
Serge Hallyn [Mon, 21 Mar 2016 23:48:58 +0000 (23:48 +0000)]
UBUNTU: SAUCE: (noup) cgroup namespaces: add a 'nsroot=' mountinfo field

BugLink: http://bugs.launchpad.net/bugs/1560489
[ note - this is a version of the patch I just sent to lkml ported to
  our xenial tree.  It's needed for things like docker and lxc to
  be certain of which cgroup tasks file is their own in certain nesting
  situations.  We currently work around it by blindly assuming that
  there are no legacy container managers running on cgroup-ns-enabled
  kernels ]

One practical problem I've found with cgroup namespaces is that there
is no way to disambiguate between a cgroupfs mount which was done in
a cgroup namespace, and a bind mount of a cgroupfs directory.  So
whether I do

unshare --cgroup -- bash -c "mount -t cgroup -o freezer f /mnt; cat /proc/self/mountinfo"

or whether I just

mount --bind /sys/fs/cgroup/freezer/$(awk -F: '/freezer/ { print $3 }' /proc/self/cgroup) /mnt

'mount root' field (field 3) in /proc/self/mountinfo will show the
same thing, the result of awk -F: '/freezer/ { print $3 }' /proc/self/cgroup.

This patch adds a 'nsroot=' field to cgroup mountinfo entries, so that
userspace can distinguish a mount made in a cgroup namespace from a bind
mount from a cgroup subdirectory.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Debian] Remove generated intermediate files on clean
Tim Gardner [Tue, 22 Mar 2016 13:04:20 +0000 (07:04 -0600)]
UBUNTU: [Debian] Remove generated intermediate files on clean

BugLink: http://bugs.launchpad.net/bugs/1560445
Remove these files on clean so they do not get included in the
source package.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Debian] Silence the reconstruct script
Tim Gardner [Tue, 22 Mar 2016 12:58:35 +0000 (06:58 -0600)]
UBUNTU: [Debian] Silence the reconstruct script

The reconstruct script is long enough that it overwhelms
any other output from a clean operation (and is largely noise
anyway).

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "KVM: arm/arm64: timer: Switch to CLOCK_MONOTONIC_RAW"
dann frazier [Mon, 21 Mar 2016 21:16:44 +0000 (15:16 -0600)]
Revert "KVM: arm/arm64: timer: Switch to CLOCK_MONOTONIC_RAW"

BugLink: http://bugs.launchpad.net/bugs/1549494
This reverts commit c1fab9a6d70a0043bbda8162e89bafab0500324c.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "hrtimer: Catch illegal clockids"
dann frazier [Mon, 21 Mar 2016 21:16:41 +0000 (15:16 -0600)]
Revert "hrtimer: Catch illegal clockids"

BugLink: http://bugs.launchpad.net/bugs/1549494
This reverts commit 86b9c76b0c7c5bbdb6196effb2c7ae4f08e11b80.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "hrtimer: Add support for CLOCK_MONOTONIC_RAW"
dann frazier [Mon, 21 Mar 2016 21:16:34 +0000 (15:16 -0600)]
Revert "hrtimer: Add support for CLOCK_MONOTONIC_RAW"

BugLink: http://bugs.launchpad.net/bugs/1549494
This reverts commit 45b5c64b98b3ab90332bf7f256a6a1bae60c1527.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (no-up) arm64: gicv3: its: Increase FORCE_MAX_ZONEORDER for Cavium...
Radha Mohan Chintakuntla [Wed, 20 Aug 2014 22:10:58 +0000 (15:10 -0700)]
UBUNTU: SAUCE: (no-up) arm64: gicv3: its: Increase FORCE_MAX_ZONEORDER for Cavium ThunderX

BugLink: http://bugs.launchpad.net/bugs/1558828
In case of ARCH_THUNDER, there is a need to allocate the GICv3 ITS table
which is bigger than the allowed max order. So we are forcing it only in
case of 4KB page size.

Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Signed-off-by: Robert Richter <rrichter@cavium.com>
[ dannf: Depend on ARM64_4K_PAGES instead of !ARM64_64K_PAGES now that
  16K pages are available ]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_FORCE_MAX_ZONEORDER=13 on arm64
dann frazier [Wed, 19 Aug 2015 20:11:09 +0000 (14:11 -0600)]
UBUNTU: [Config] CONFIG_FORCE_MAX_ZONEORDER=13 on arm64

BugLink: http://bugs.launchpad.net/bugs/1558828
Needed to allocate the GICv3 ITS table on thunder platforms.

Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: change driver version to v1.30.00.22-20151126
Ching Huang [Thu, 26 Nov 2015 11:44:55 +0000 (19:44 +0800)]
arcmsr: change driver version to v1.30.00.22-20151126

BugLink: http://bugs.launchpad.net/bugs/1559609
Change driver version to v1.30.00.22-20151126

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 15d2639704b828db0506a416eda010178e1fd816)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: Split dma resource allocation to a new function
Ching Huang [Thu, 26 Nov 2015 11:41:15 +0000 (19:41 +0800)]
arcmsr: Split dma resource allocation to a new function

BugLink: http://bugs.launchpad.net/bugs/1559609
Split dma resource allocation and io register assignment from get_config
to a new function arcmsr_alloc_io_queue.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 02040670aaa0f125259ad8f9f5f30e4d138a65ae)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: more readability improvements
Ching Huang [Thu, 26 Nov 2015 11:33:56 +0000 (19:33 +0800)]
arcmsr: more readability improvements

BugLink: http://bugs.launchpad.net/bugs/1559609
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit f75ab39a4be08b996ca19002bd7b54df8fdb8d10)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: changes driver version number
Ching Huang [Wed, 25 Nov 2015 11:52:15 +0000 (19:52 +0800)]
arcmsr: changes driver version number

BugLink: http://bugs.launchpad.net/bugs/1559609
Changes driver version number.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit d15dd55d049ccae9a1061e08ad377f9c799b8a3a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: adds code to support new Areca adapter ARC1203
Ching Huang [Wed, 25 Nov 2015 11:49:33 +0000 (19:49 +0800)]
arcmsr: adds code to support new Areca adapter ARC1203

BugLink: http://bugs.launchpad.net/bugs/1559609
Support Areca's new PCIe to SATA RAID adapter ARC1203.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 7e315ffd49b906fc545b8e0312eedeed738796c9)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: make code more readable
Ching Huang [Wed, 25 Nov 2015 11:45:16 +0000 (19:45 +0800)]
arcmsr: make code more readable

BugLink: http://bugs.launchpad.net/bugs/1559609
[mkp: Fixed checkpatch whitespace warning]

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit d662ad246256e33eb9b25c8e801f4487527f2bfe)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: fixes not release allocated resource
Ching Huang [Wed, 25 Nov 2015 11:41:23 +0000 (19:41 +0800)]
arcmsr: fixes not release allocated resource

BugLink: http://bugs.launchpad.net/bugs/1559609
Releasing allocated resource if get configuration data failed.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 98f90debc2b64a40a416dd9794ac2d8de6b43af2)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarcmsr: fixed getting wrong configuration data
Ching Huang [Wed, 25 Nov 2015 11:36:02 +0000 (19:36 +0800)]
arcmsr: fixed getting wrong configuration data

BugLink: http://bugs.launchpad.net/bugs/1559609
Fixed getting wrong configuration data of adapter type B and type D.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 251e2d25bfb72b69edd414abfa42a41191d9657a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] Rework input-modules (d-i) list
Stefan Bader [Mon, 21 Mar 2016 15:10:28 +0000 (16:10 +0100)]
UBUNTU: [Config] Rework input-modules (d-i) list

BugLink: http://bugs.launchpad.net/bugs/1559692
There have been bugs reported already in the past (but without enough
data to pinpoint the problem). This time it was found that a certain
Thinkpad external keyboard would not be working from the server install
image (but works from a desktop installer). The reason was a missing
specific hid driver (hid-lenovo).
Since we might miss more than that, I went forward and updated the whole
list. I excluded a few drivers which where either force feedback drivers
(.*ff.ko, I think we can live without the backlash), joystick drivers
and I also not added wacom (because graphic tablets unlikely are useful
to complete a server install).

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: dts: Add Cavium ThunderX specific PMU
Jan Glauber [Thu, 18 Feb 2016 16:50:12 +0000 (17:50 +0100)]
arm64: dts: Add Cavium ThunderX specific PMU

BugLink: http://bugs.launchpad.net/bugs/1559349
Add a compatible string for the Cavium ThunderX PMU.

Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit 94085fe570e7b87597d4695e6fa77d4256efd29e)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: Extend event mask for ARMv8.1
Jan Glauber [Thu, 18 Feb 2016 16:50:14 +0000 (17:50 +0100)]
arm64: perf: Extend event mask for ARMv8.1

BugLink: http://bugs.launchpad.net/bugs/1559349
ARMv8.1 increases the PMU event number space to 16 bit so increase
the EVTYPE mask.

Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit c210ae80e4e7083e03bee13535d11fc2c991cf71)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: Enable PMCR long cycle counter bit
Jan Glauber [Thu, 18 Feb 2016 16:50:13 +0000 (17:50 +0100)]
arm64: perf: Enable PMCR long cycle counter bit

BugLink: http://bugs.launchpad.net/bugs/1559349
With the long cycle counter bit (LC) disabled the cycle counter is not
working on ThunderX SOC (ThunderX only implements Aarch64).
Also, according to documentation LC == 0 is deprecated.

To keep the code simple the patch does not introduce 64 bit wide counter
functions. Instead writing the cycle counter always sets the upper
32 bits so overflow interrupts are generated as before.

Original patch from Andrew Pinksi <Andrew.Pinksi@caviumnetworks.com>

Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit 7175f0591eb9714fa71d499c59c35bcbd030931a)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64/perf: Add Cavium ThunderX PMU support
Jan Glauber [Thu, 18 Feb 2016 16:50:11 +0000 (17:50 +0100)]
arm64/perf: Add Cavium ThunderX PMU support

BugLink: http://bugs.launchpad.net/bugs/1559349
Support PMU events on Caviums ThunderX SOC. ThunderX supports
some additional counters compared to the default ARMv8 PMUv3:

- branch instructions counter
- stall frontend & backend counters
- L1 dcache load & store counters
- L1 icache counters
- iTLB & dTLB counters
- L1 dcache & icache prefetch counters

Signed-off-by: Jan Glauber <jglauber@cavium.com>
[will: capitalisation]
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit d0aa2bffcf9847133fd75b9c829da4faded81977)
[dannf: offset adjustments]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: Rename Cortex A57 events
Jan Glauber [Thu, 18 Feb 2016 16:50:10 +0000 (17:50 +0100)]
arm64: perf: Rename Cortex A57 events

BugLink: http://bugs.launchpad.net/bugs/1559349
The implemented Cortex A57 events are strictly-speaking not
A57 specific. They are ARM recommended implementation defined events
and can be found on other ARMv8 SOCs like Cavium ThunderX too.

Therefore rename these events to allow using them in other
implementations too.

Signed-off-by: Jan Glauber <jglauber@cavium.com>
[will: capitalisation and ordering]
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from linux-next commit 5f140ccef3e1f15873c8e2c47d15b03099623ec0)
[dannf: offset adjustments]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: add format entry to describe event -> config mapping
Will Deacon [Tue, 22 Dec 2015 14:42:57 +0000 (14:42 +0000)]
arm64: perf: add format entry to describe event -> config mapping

BugLink: http://bugs.launchpad.net/bugs/1559350
It's all very well providing an events directory to userspace that
details our events in terms of "event=0xNN", but if we don't define how
to encode the "event" field in the perf attr.config, then it's a waste
of time.

This patch adds a single format entry to describe that the event field
occupies the bottom 10 bits of our config field on ARMv8 (PMUv3).

Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 57d74123954dfe70fad12724d19f743ed14cec90)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoARM: perf: add format entry to describe event -> config mapping
Will Deacon [Tue, 22 Dec 2015 14:42:57 +0000 (14:42 +0000)]
ARM: perf: add format entry to describe event -> config mapping

BugLink: http://bugs.launchpad.net/bugs/1559350
It's all very well providing an events directory to userspace that
details our events in terms of "event=0xNN", but if we don't define how
to encode the "event" field in the perf attr.config, then it's a waste
of time.

This patch adds a single format entry to describe that the event field
occupies the bottom 8 bits of our config field on ARMv7.

Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit abff083ce2046b4d55211c1db5992ec2dd391f3d)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: Add event descriptions
Drew Richardson [Thu, 22 Oct 2015 14:07:32 +0000 (07:07 -0700)]
arm64: perf: Add event descriptions

BugLink: http://bugs.launchpad.net/bugs/1559350
Add additional information about the ARM architected hardware events
to make counters self describing. This makes the hardware PMUs easier
to use as perf list contains possible events instead of users having
to refer to documentation like the ARM TRMs.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 9e9caa6a496174e53d7753baa4779717771da4a7)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm64: perf: Convert event enums to #defines
Drew Richardson [Thu, 22 Oct 2015 14:07:01 +0000 (07:07 -0700)]
arm64: perf: Convert event enums to #defines

BugLink: http://bugs.launchpad.net/bugs/1559350
The enums are not necessary and this allows the event values to be
used to construct static strings at compile time.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 90381cba64591e27d0e8bbfe71bf8a98bd2a3db3)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm: perf: Add event descriptions
Drew Richardson [Wed, 28 Oct 2015 15:20:41 +0000 (08:20 -0700)]
arm: perf: Add event descriptions

BugLink: http://bugs.launchpad.net/bugs/1559350
Add additional information about the ARM architected hardware events
to make counters self describing. This makes the hardware PMUs easier
to use as perf list contains possible events instead of users having
to refer to documentation like the ARM TRMs.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 3fbac6ccb6c3a8958239d9026c4d41db60c2f1cf)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoarm: perf: Convert event enums to #defines
Drew Richardson [Wed, 28 Oct 2015 15:19:56 +0000 (08:19 -0700)]
arm: perf: Convert event enums to #defines

BugLink: http://bugs.launchpad.net/bugs/1559350
The enums are not necessary and this allows the event values to be
used to construct static strings at compile time.

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit f4ab36cb103a55d02ef83727880a14d9be9823f0)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/perf: kill armpmu_register
Mark Rutland [Wed, 28 Oct 2015 12:32:17 +0000 (12:32 +0000)]
drivers/perf: kill armpmu_register

BugLink: http://bugs.launchpad.net/bugs/1559350
Nothing outside of drivers/perf/arm_pmu.c should call armpmu_register
any more, so it no longer needs to be in include/linux/perf/arm_pmu.h.
Additionally, by folding it in to arm_pmu_device_probe we can allow
drivers to override struct pmu fields without getting blatted by the
armpmu code.

This patch folds armpmu_register into arm_pmu_device_probe. The logging
to the console is moved to after the PMU is successfully registered with
the core perf code.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Suggested-by: Will Deacon <will.deacon@arm.com>
Cc: Drew Richardson <drew.richardson@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 86cb273b601488fb02d5706c61a09ee267474aad)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoEDAC/sb_edac: Fix computation of channel address
Luck, Tony [Thu, 10 Mar 2016 00:40:48 +0000 (16:40 -0800)]
EDAC/sb_edac: Fix computation of channel address

BugLink: http://bugs.launchpad.net/bugs/1559904
Large memory Haswell-EX systems with multiple DIMMs per channel were
sometimes reporting the wrong DIMM.

Found three problems:

 1) Debug printouts for socket and channel interleave were not interpreting
    the register fields correctly. The socket interleave field is a 2^X
    value (0=1, 1=2, 2=4, 3=8). The channel interleave is X+1 (0=1, 1=2,
    2=3. 3=4).

 2) Actual use of the socket interleave value didn't interpret as 2^X

 3) Conversion of address to channel address was complicated, and wrong.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Aristeu Rozanski <arozansk@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit eb1af3b71f9d83e45f2fd2fd649356e98e1c582c)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] disable CONFIG_IP_PNP
Andy Whitcroft [Sun, 20 Mar 2016 13:35:17 +0000 (13:35 +0000)]
UBUNTU: [Config] disable CONFIG_IP_PNP

This support is completely duplicated in the initramfs code.  As things
stand we attempt this PNP when we do not have the devices we could use
loaded and will not be able to load until the initramfs is loaded.

Therefore disable this support in the kernel and rely on the
initramfs-tools code.

BugLink: http://bugs.launchpad.net/bugs/1259861
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: [Config] annotations -- fix split between menu and flags for 9P
Andy Whitcroft [Sun, 20 Mar 2016 13:32:21 +0000 (13:32 +0000)]
UBUNTU: [Config] annotations -- fix split between menu and flags for 9P

Ignore: yes
Signed-off-by: Andy Whitcroft <apw@canonical.com>
8 years agoUBUNTU: Start new release
Tim Gardner [Mon, 21 Mar 2016 16:16:01 +0000 (10:16 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: Ubuntu-4.4.0-15.31
Tim Gardner [Fri, 18 Mar 2016 18:49:37 +0000 (12:49 -0600)]
UBUNTU: Ubuntu-4.4.0-15.31

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (noup) cxl: Allow initialization on timebase sync failures
Frederic Barrat [Fri, 18 Mar 2016 12:42:21 +0000 (13:42 +0100)]
UBUNTU: SAUCE: (noup) cxl: Allow initialization on timebase sync failures

BugLink: http://bugs.launchpad.net/bugs/1557001
https://patchwork.ozlabs.org/patch/599445/

Failure to synchronize the PSL timebase currently prevents the
initialization of the cxl card, thus rendering the card useless. This
is too extreme for a feature which is rarely used, if at all. No
hardware AFUs or software is currently using PSL timebase.

This patch still tries to synchronize the PSL timebase when the card
is initialized, but ignores the error if it can't. Instead, it reports
a status via /sys.

Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: add a sysctl to enable unprivileged user ns AppArmor policy loading
Tyler Hicks [Thu, 17 Mar 2016 00:19:10 +0000 (19:19 -0500)]
UBUNTU: SAUCE: add a sysctl to enable unprivileged user ns AppArmor policy loading

BugLink: http://bugs.launchpad.net/bugs/1379535
Disabled by default until the AppArmor kernel code is deemed safe enough
to handle untrusted policy. Only developers of container technologies
should turn this on until that time.

If this sysctl is set to non-zero and a process with CAP_MAC_ADMIN in
the root namespace has created an AppArmor policy namespace,
unprivileged processes will be able to change to a profile in the
newly created AppArmor policy namespace and, if the profile allows
CAP_MAC_ADMIN and appropriate file permissions, will be able to load
policy in the respective policy namespace.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: (no-up) apparmor: sync of apparmor3.5-beta1 snapshot
John Johansen [Fri, 18 Mar 2016 13:09:27 +0000 (06:09 -0700)]
UBUNTU: SAUCE: (no-up) apparmor: sync of apparmor3.5-beta1 snapshot

BugLink: http://bugs.launchpad.net/bugs/1379535
This is a sync and squash of the apparmor 3.5-beta1 snapshot. The
set of patches in this squash are available in
  git://kernel.ubuntu.com/jj/ubuntu-xenial.git
using the the tag
  apparmor-3.5-beta1-presuash-snapshot

This fixes multiple bugs and adds the policy namespace stacking features.
BugLink: http://bugs.launchpad.net/bugs/1379535
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: add parameter to control whether policy...
John Johansen [Fri, 18 Mar 2016 13:06:36 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: add parameter to control whether policy hashing is used"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 41689645955f8c70ce06d27df993af47540e4536.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: Sync to apparmor3 - RC1 snapshot"
John Johansen [Fri, 18 Mar 2016 13:06:34 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: Sync to apparmor3 - RC1 snapshot"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 6bfc18ae5d5688cb93eceb7d07432dcb20c130a7.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: Revert: fix: only allow a single threaded process to ..."
John Johansen [Fri, 18 Mar 2016 13:06:32 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: Revert: fix: only allow a single threaded process to ..."

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 9b3067958c38974b4e447ce1688cba34fdf96b87.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) fix: bad unix_addr_fs macro"
John Johansen [Fri, 18 Mar 2016 13:06:29 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) fix: bad unix_addr_fs macro"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 14bc1e2030ad4fe9fc76dbf943c34df966a8ab2b.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: apparmor -- follow change to this_cpu_ptr"
John Johansen [Fri, 18 Mar 2016 13:06:27 +0000 (06:06 -0700)]
Revert "UBUNTU: apparmor -- follow change to this_cpu_ptr"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 53f139d625d03defdc30acdac4b02ab598ff9a5f.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up): apparmor: fix mediation of fs unix sockets"
John Johansen [Fri, 18 Mar 2016 13:06:25 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up): apparmor: fix mediation of fs unix sockets"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit c5e6ac5156fed943fa87f5a09286d13f59598d5e.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: fix mount not handling disconnected paths"
John Johansen [Fri, 18 Mar 2016 13:06:23 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: fix mount not handling disconnected paths"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 1e7328d53e190f2971bc02f09a6fcee5d1c3d9aa.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up) apparmor: Fix incompatible pointer type warnings"
John Johansen [Fri, 18 Mar 2016 13:06:21 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up) apparmor: Fix incompatible pointer type warnings"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 5a22abd43300e0763cdd352a530ab011eb100c5c.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: (no-up): apparmor: fix for failed mediation of socket that...
John Johansen [Fri, 18 Mar 2016 13:06:18 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: (no-up): apparmor: fix for failed mediation of socket that is being shutdown"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit e35fe56838480981337153af1236bf49ebb27c8a.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: fix sleep from invalid context"
John Johansen [Fri, 18 Mar 2016 13:06:16 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: fix sleep from invalid context"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit f970350049bdb24c3b3bdf4ef8c162833c4f2dd8.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: fix-up: kern_mount fail path should not be doing put_buffers()"
John Johansen [Fri, 18 Mar 2016 13:06:14 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: fix-up: kern_mount fail path should not be doing put_buffers()"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit bcc4061cfc6cc47f311b0666eef5f69ee5bf392d.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: oops do to invalid null ptr deref in label...
John Johansen [Fri, 18 Mar 2016 13:06:12 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: oops do to invalid null ptr deref in label print fns"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 949769a80df6a9446e63d56a1d7aa7da11cb4d9c.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Disallow update of cred when then subjective !=...
John Johansen [Fri, 18 Mar 2016 13:06:10 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Disallow update of cred when then subjective != the objective cred"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 1f95c6b69724417ab7039e924ec1a46cdc2f3a03.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: rework retrieval of the current label in the profile...
John Johansen [Fri, 18 Mar 2016 13:06:08 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: rework retrieval of the current label in the profile update case"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 8a6a317400fcd5e4eebfc20665ca0b3e8dbc8217.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: insert race between label_update and label_merge"
John Johansen [Fri, 18 Mar 2016 13:06:06 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: insert race between label_update and label_merge"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit c8cf841fc8307461847036d2be2ad27791be485b.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: Fix: ensure aa_get_newest will trip debugging if...
John Johansen [Fri, 18 Mar 2016 13:06:04 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: Fix: ensure aa_get_newest will trip debugging if the replacedby is not setup"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit 9b02a4b233d1b5b9ec3cb4353b894089a1bf9ea0.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoRevert "UBUNTU: SAUCE: apparmor: debug: POISON label and replaceby pointer on free"
John Johansen [Fri, 18 Mar 2016 13:06:02 +0000 (06:06 -0700)]
Revert "UBUNTU: SAUCE: apparmor: debug: POISON label and replaceby pointer on free"

BugLink: http://bugs.launchpad.net/bugs/1379535
This reverts commit a74bd8e71cad1328bf5b933aeb7ac75d9f350c87.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>