net: Allow skb_recycle_check to be done in stages

skb_recycle_check resets the skb if it's eligible for recycling.
However, there are times when a driver might want to optionally
manipulate the skb data with the skb before resetting the skb,
but after it has determined eligibility.  We do this by splitting the
eligibility check from the skb reset, creating two inline functions to
accomplish that task.

Change-Id: Ide33bfee796cd08db40b46ab7c0ed3a4a14bf2f8
Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net: constify skbuff and Qdisc elements

Preliminary patch before tcp constification

Change-Id: I02ff6ca5ce08bc0c2fce1c63cbc7dbd837b2e719
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Squash commit of:

X3: add HP detect GPIO to MAX98088

Bug 1044921

Change-Id: Ie8c42af53304fc1cac1a8633eddc6eff1d2c9ce8
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/131051
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

ARM: tegra: X3: set I2S as slave mode.
Setting default I2S mode as slave. This will help in power
optimization of around 4mW.
Change-Id: Ibe4020de5095004f7d525620fd8a9f05792bb4b9
Signed-off-by: Chandrakanth <cgorantla@nvidia.com>
Reviewed-on: http://git-master/r/131788
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Signed-off-by: demetris <ierokipides.dem@gmail.com>
Add missing vibrator for x3

Change-Id: I42281a382b1a04ba06956be92fecf953641a657b
Signed-off-by: demetris <ierokipides.dem@gmail.com>
arm: tegra: Change DDC freq to 10KHz

Bug 949759

Reduce DDC freq. The original freq is 100KHz, but some edid communication
at this rate on some monitors like acer H243HX may fail

Change-Id: Ib087025a35ff085b4bf618b70100fe6670c3eaec
Signed-off-by: Hao Tang <htang@nvidia.com>
Reviewed-on: http://git-master/r/88261
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
board-x3-audio: Set default I2S channels to 2 and some cleanup.

Change-Id: I26b39d7a1ee0175c8399b20edca95c07bd7333bd
Fix panel sleep and clean max98088 codec

Change-Id: I60d198a209aa4f748707183cc1ab42da183636dc
Revert "asoc: tegra: handle multiple registrations for switch device"

This reverts commit be5c9e35612f2a91fddeccc7be5fd58c22f92e85.

Change-Id: If09fc636f721bf8bfe820593841a834c56328759
Revert " asoc:tegra: fix dam cif programming"

This reverts commit 62be110fe51af2f47db06f284aa1528354eb67ad.

Revert "Fix the way to get EQ channel names and some cleanup"

This reverts commit 313ab84dae4112f3a240bf2bb579d35dd3b52d05.

Change-Id: Ib7ff809a33bc513d11cec3ecb1742e2a25acf137
Revert "asoc: tegra: MAX98088 machine: fix coverity issue"

This reverts commit 7fb954fbda232b44c0adfb3b989ad57922319f07.

Revert "asoc: codec: convert gpio to irq for max98088"

This reverts commit 08b2d0ec89f9ee6e0b2f5d61cce8a1fd01678617.

Change-Id: Ic862d88a9d338f7b4bf61b2b9db5baff5cc885f5
ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different
arch has different per-cpu loops_per_jiffy definition.

Change-Id: I3bfdf800784c9c494f873de096e3a1972f14f358
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
ARM: 7559/1: smp: switch away from the idmap before updating init_mm.mm_count

When booting a secondary CPU, the primary CPU hands two sets of page
tables via the secondary_data struct:

	(1) swapper_pg_dir: a normal, cacheable, shared (if SMP) mapping
	    of the kernel image (i.e. the tables used by init_mm).

	(2) idmap_pgd: an uncached mapping of the .idmap.text ELF
	    section.

The idmap is generally used when enabling and disabling the MMU, which
includes early CPU boot. In this case, the secondary CPU switches to
swapper as soon as it enters C code:

	struct mm_struct *mm = &init_mm;
	unsigned int cpu = smp_processor_id();

	/*
	 * All kernel threads share the same mm context; grab a
	 * reference and switch to it.
	 */
	atomic_inc(&mm->mm_count);
	current->active_mm = mm;
	cpumask_set_cpu(cpu, mm_cpumask(mm));
	cpu_switch_mm(mm->pgd, mm);

This causes a problem on ARMv7, where the identity mapping is treated as
strongly-ordered leading to architecturally UNPREDICTABLE behaviour of
exclusive accesses, such as those used by atomic_inc.

This patch re-orders the secondary_start_kernel function so that we
switch to swapper before performing any exclusive accesses.

Change-Id: Iac9103e4c98fbfebac25d654db3c7acc424a7e13
Cc: <stable@vger.kernel.org>
Cc: David McKay <david.mckay@st.com>
Reported-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
 ARM: 7587/1: implement optimized percpu variable access

Use the previously unused TPIDRPRW register to store percpu offsets.
TPIDRPRW is only accessible in PL1, so it can only be used in the kernel.

This replaces 2 loads with a mrc instruction for each percpu variable
access. With hackbench, the performance improvement is 1.4% on Cortex-A9
(highbank). Taking an average of 30 runs of "hackbench -l 1000" yields:

Before: 6.2191
After: 6.1348

Will Deacon reported similar delta on v6 with 11MPCore.

The asm "memory clobber" are needed here to ensure the percpu offset
gets reloaded. Testing by Will found that this would not happen in
__schedule() which is a bit of a special case as preemption is disabled
but the execution can move cores.

Change-Id: I2e8ccc7481dc0c21890529050606613991df8453
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: demetris <ierokipides.dem@gmail.com>
 ARM: 7759/1: decouple CPU offlining from reboot/shutdown

Add comments to machine_shutdown()/halt()/power_off()/restart() that
describe their purpose and/or requirements re: CPUs being active/not.

In machine_shutdown(), replace the call to smp_send_stop() with a call to
disable_nonboot_cpus(). This completely disables all but one CPU, thus
satisfying the requirement that only a single CPU be active for kexec.
Adjust Kconfig dependencies for this change.

In machine_halt()/power_off()/restart(), call smp_send_stop() directly,
rather than via machine_shutdown(); these functions don't need to
completely de-activate all CPUs using hotplug, but rather just quiesce
them.

Remove smp_kill_cpus(), and its call from smp_send_stop().
smp_kill_cpus() was indirectly calling smp_ops.cpu_kill() without calling
smp_ops.cpu_die() on the target CPUs first. At least some implementations
of smp_ops had issues with this; it caused cpu_kill() to hang on Tegra,
for example. Since smp_send_stop() is only used for shutdown, halt, and
power-off, there is no need to attempt any kind of CPU hotplug here.

Adjust Kconfig to reflect that machine_shutdown() (and hence kexec)
relies upon disable_nonboot_cpus(). However, this alone doesn't guarantee
that hotplug will work, or even that hotplug is implemented for a
particular piece of HW that a multi-platform zImage runs on. Hence, add
error-checking to machine_kexec() to determine whether it did work.

Change-Id: I09f6aede39d1ed3679d98574799749404e57dd5f
Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by:  Zhangfei Gao <zhangfei.gao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: demetris <ierokipides.dem@gmail.com>
Replace an i2s reset call mistakenly removed

Change-Id: I085130043f8c2d2e408dc379197b697d4db44e46
Partially Revert "Fix panel sleep and clean max98088 codec"

This reverts commit 5667d01275c8f08e6942765776114ee2a314a8b1.

Change-Id: Iec0e7e508b1279d9d474d3910ae0cef92a6e36f5
Reverse the def and fix WEP-104 authentication.

Change-Id: I8a926216a469f18d5e6ff281c9e1eb3eb1f9957f
Signed-off-by: demetris <ierokipides.dem@gmail.com>
net: wireless: bcmdhd: Fix tdls processing from cfg80211

Change-Id: Ie59e3b2e22e0542c5336183d591c1fca4eb490ae
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: demetris <ierokipides.dem@gmail.com>
net: wireless: bcmdhd:Enable full scan on PNO event
& prevent recursive call of cfg80211_sched_scan_stopped
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

Change-Id: Ib563125f7a34cf938a333779d3ed96d36c0b3c9b
Signed-off-by: demetris <ierokipides.dem@gmail.com>
Remove vbus wake up call and fix remaining usb issues

Change-Id: Ifcb07debd3979061902136f82a70e6beaf926e3c