UBUNTU: Start new release

Ignore: yes
iwlwifi: mvm: Add a missed beacons threshold

BugLink: http://bugs.launchpad.net/bugs/1349572

Instead of always calling ieee80211_beacon_loss() on every missed
beacons notification, call this function only if the number of
consecutive missed beacons from last rx is higher than a predefined
threshold.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
(cherry picked from commit 12d423e816c69b0b4457bc047dda9a0a1c1a53c1)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
mac80211: reset probe_send_count also in HW_CONNECTION_MONITOR case

BugLink: http://bugs.launchpad.net/bugs/1349572

In case of beacon_loss with IEEE80211_HW_CONNECTION_MONITOR
device, mac80211 probes the ap (and disconnects on timeout)
but ignores the ack.

If we already got an ack, there's no reason to continue
disconnecting. this can help devices that supports
IEEE80211_HW_CONNECTION_MONITOR only partially (e.g. take
care of keep alives, but does not probe the ap.

In case the device wants to disconnect without probing,
it can just call ieee80211_connection_loss.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 448cd2e248732326632957e52ea9c44729affcb2)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
genirq: Add an accessor for IRQ_PER_CPU flag

BugLink: http://launchpad.net/bugs/1357527

This patch adds an accessor function for IRQ_PER_CPU flag.
The accessor function is useful to determine whether an IRQ is percpu or not.

This patch is based on an older patch posted by Chris Smith here [1].
There is a minor change w.r.t. Chris's original patch: The accessor function
is renamed as 'irq_is_percpu' instead of 'irq_is_per_cpu'.

[1]: http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html

Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Vinayak Kale <vkale@apm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 0185b1b787962db38fdf74e1cab9b7a2619490a1)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arm64: perf: add support for percpu pmu interrupt

BugLink: http://launchpad.net/bugs/1357527

Add support for irq registration when pmu interrupt is percpu.

Signed-off-by: Vinayak Kale <vkale@apm.com>
Signed-off-by: Tuan Phan <tphan@apm.com>
[will: tidied up cross-calling to pass &irq]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 66aa8d6a145b6a66566b4fce219cc56c3d0e01c3)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) irqchip:gic: change access of gicc_ctrl register to read modify write.

BugLink: http://launchpad.net/bugs/1357527

This change is made to preserve the GIC v2 releated bits in the
GIC_CPU_CTRL register (also known as the GICC_CTLR register in spec).
The original code only set the enable/disable group bit in this register.
This code will preserve the bypass bits configured by the bootload except
the enable/disable bit. The main reason for this change is to allow the
bypass bits specified in the v2 spec to remain untouched by the current
GIC code. In the X-Gene platform, the bypass functionality is not used
and bypass must be disabled at all time.

Signed-off-by: Vinayak Kale <vkale@apm.com>
Acked-by: Anup Patel <apatel@apm.com>
Signed-off-by: Feng Kan <fkan@apm.com>
(v3 submittal)
Reference: http://www.spinics.net/lists/arm-kernel/msg311694.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) dt-bindings: Add Potenza PMU binding

BugLink: http://launchpad.net/bugs/1357527

This patch documents the compatible string for APM X-Gene Potenza CPU's PMU.

Signed-off-by: Vinayak Kale <vkale@apm.com>
(v1 submittal)
Reference: http://www.spinics.net/lists/arm-kernel/msg316950.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) arm64: dts: Add PMU node for APM X-Gene Storm SOC

BugLink: http://launchpad.net/bugs/1357527

This patch adds the PMU device tree node for APM X-Gene Storm SOC.

Please note that this patch has dependancy on a GIC driver patch [1] which is
yet to be approved by maintainers.

[1]- https://lkml.org/lkml/2014/2/27/605
(irqchip:gic: change access of gicc_ctrl register to read modify write)

Signed-off-by: Vinayak Kale <vkale@apm.com>
(v1 submittal)
Reference: http://www.spinics.net/lists/arm-kernel/msg316951.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
cifs: sanity check length of data to send before sending

BugLink: http://bugs.launchpad.net/bugs/1283101

We had a bug discovered recently where an upper layer function
(cifs_iovec_write) could pass down a smb_rqst with an invalid amount of
data in it. The length of the SMB frame would be correct, but the rqst
struct would cause smb_send_rqst to send nearly 4GB of data.

This should never be the case. Add some sanity checking to the beginning
of smb_send_rqst that ensures that the amount of data we're going to
send agrees with the length in the RFC1002 header. If it doesn't, WARN()
and return -EIO to the upper layers.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
(cherry picked from commit a26054d184763969a411e3939fe243516715ff59)
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: Add compat macro for skb_get_hash

Commit df4530d690a14dd net: Change skb_get_rxhash to skb_get_hash
changed a function that is part of the 3.13 kernel API to pull in
some newer driver code.
In order for external modules (which check the LINUX_VERSION_CODE
to find out which API functions to use) to still compile correctly,
add a compat definition for the old name.

BugLink: http://bugs.launchpad.net/bugs/1358162

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
KVM: nVMX: Pass vmexit parameters to nested_vmx_vmexit

BugLink: http://bugs.launchpad.net/bugs/1329434

Instead of fixing up the vmcs12 after the nested vmexit, pass key
parameters already when calling nested_vmx_vmexit. This will help
tracing those vmexits.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(backported from commit 533558bcb69ef28aff81b6ae9acda8943575319f)
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>

Conflicts:
	arch/x86/kvm/vmx.c
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
KVM: nVMX: Rework interception of IRQs and NMIs

BugLink: http://bugs.launchpad.net/bugs/1329434

Move the check for leaving L2 on pending and intercepted IRQs or NMIs
from the *_allowed handler into a dedicated callback. Invoke this
callback at the relevant points before KVM checks if IRQs/NMIs can be
injected. The callback has the task to switch from L2 to L1 if needed
and inject the proper vmexit events.

The rework fixes L2 wakeups from HLT and provides the foundation for
preemption timer emulation.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(backported from commit b6b8a1451fc40412c57d10c94b62e22acab28f94)
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>

Conflicts:
	arch/x86/include/asm/kvm_host.h
	arch/x86/kvm/vmx.c
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
KVM: vmx: disable APIC virtualization in nested guests

BugLink: http://bugs.launchpad.net/bugs/1329434

While running a nested guest, we should disable APIC virtualization
controls (virtualized APIC register accesses, virtual interrupt
delivery and posted interrupts), because we do not expose them to
the nested guest.

Reported-by: Hu Yaohui <loki2441@gmail.com>
Suggested-by: Abel Gordon <abel@stratoscale.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(backported from commit 696dfd95ba9838327a7013e5988ff3ba60dcc8c8)
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>

Conflicts:
	arch/x86/kvm/vmx.c
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
HID: Add transport-driver functions to the USB HID interface.

BugLink: http://bugs.launchpad.net/bugs/1353021

Add raw_request, set_raw_report and output_report transport-driver functions to
the USB HID driver.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 975a683271e690e7e467b274f22efadf1e696b5e)
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
ahci_xgene: Removing NCQ support from the APM X-Gene SoC AHCI SATA Host Controller driver.

BugLink: http://bugs.launchpad.net/bugs/1358498

This patch removes the NCQ support from the APM X-Gene SoC AHCI
Host Controller driver as it doesn't support it.

Signed-off-by: Loc Ho <lho@apm.com>
Signed-off-by: Suman Tripathi <stripathi@apm.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
(cherry-picked from 72f79f9e35bd3f78ee8853f2fcacaa197d23ebac in linux-next)
(backported to Ubuntu's 3.13)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fold d_kill() and d_free()

BugLink: http://bugs.launchpad.net/bugs/1354234

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 03b3b889e79cdb6b806fc0ba9be0d71c186bbfaa)
Signed-off-by: Dave Chiluk <chiluk@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fold try_prune_one_dentry()

BugLink: http://bugs.launchpad.net/bugs/1354234

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 5c47e6d0ad608987b91affbcf7d1fc12dfbe8fb4)
Signed-off-by: Dave Chiluk <chiluk@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
new helper: dentry_free()

BugLink: http://bugs.launchpad.net/bugs/1354234

The part of old d_free() that dealt with actual freeing of dentry.
Taken out of dentry_kill() into a separate function.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit b4f0354e968f5fabd39bc85b99fedae4a97589fe)
Signed-off-by: Dave Chiluk <chiluk@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
expand the call of dentry_lru_del() in dentry_kill()

BugLink: http://bugs.launchpad.net/bugs/1354234

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 01b6035190b024240a43ac1d8e9c6f964f5f1c63)
Signed-off-by: Dave Chiluk <chiluk@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
dentry_kill(): don't try to remove from shrink list

BugLink: http://bugs.launchpad.net/bugs/1354234

If the victim in on the shrink list, don't remove it from there.
If shrink_dentry_list() manages to remove it from the list before
we are done - fine, we'll just free it as usual.  If not - mark
it with new flag (DCACHE_MAY_FREE) and leave it there.

Eventually, shrink_dentry_list() will get to it, remove the sucker
from shrink list and call dentry_kill(dentry, 0).  Which is where
we'll deal with freeing.

Since now dentry_kill(dentry, 0) may happen after or during
dentry_kill(dentry, 1), we need to recognize that (by seeing
DCACHE_DENTRY_KILLED already set), unlock everything
and either free the sucker (in case DCACHE_MAY_FREE has been
set) or leave it for ongoing dentry_kill(dentry, 1) to deal with.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 41edf278fc2f042f4e22a12ed87d19c5201210e1)
Signed-off-by: Dave Chiluk <chiluk@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>