perf test: fix a build error on builtin-test

commit 12f8f74b2a4d26c4facfa7ef99487cf0930f6ef7 upstream.

Recently I build perf and get a build error on builtin-test.c. The error is as
following:

$ make
    CC perf.o
    CC builtin-test.o
cc1: warnings being treated as errors
builtin-test.c: In function ‘sched__get_first_possible_cpu’:
builtin-test.c:977: warning: implicit declaration of function ‘CPU_ALLOC’
builtin-test.c:977: warning: nested extern declaration of ‘CPU_ALLOC’
builtin-test.c:977: warning: assignment makes pointer from integer without a cast
builtin-test.c:978: warning: implicit declaration of function ‘CPU_ALLOC_SIZE’
builtin-test.c:978: warning: nested extern declaration of ‘CPU_ALLOC_SIZE’
builtin-test.c:979: warning: implicit declaration of function ‘CPU_ZERO_S’
builtin-test.c:979: warning: nested extern declaration of ‘CPU_ZERO_S’
builtin-test.c:982: warning: implicit declaration of function ‘CPU_FREE’
builtin-test.c:982: warning: nested extern declaration of ‘CPU_FREE’
builtin-test.c:992: warning: implicit declaration of function ‘CPU_ISSET_S’
builtin-test.c:992: warning: nested extern declaration of ‘CPU_ISSET_S’
builtin-test.c:998: warning: implicit declaration of function ‘CPU_CLR_S’
builtin-test.c:998: warning: nested extern declaration of ‘CPU_CLR_S’
make: *** [builtin-test.o] Error 1

This problem is introduced in 3e7c439a. CPU_ALLOC and related macros are
missing in sched__get_first_possible_cpu function. In 54489c18, commiter
mentioned that CPU_ALLOC has been removed. So CPU_ALLOC calls in this
function are removed to let perf to be built.

Signed-off-by: Vinson Lee <vlee@twitter.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Vinson Lee <vlee@twitter.com>
Cc: Zheng Liu <wenqing.lz@taobao.com>
Link: http://lkml.kernel.org/r/1352422726-31114-1-git-send-email-vlee@twitter.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rcu: Fix batch-limit size problem

commit 878d7439d0f45a95869e417576774673d1fa243f upstream.

Commit 29c00b4a1d9e27 (rcu: Add event-tracing for RCU callback
invocation) added a regression in rcu_do_batch()

Under stress, RCU is supposed to allow to process all items in queue,
instead of a batch of 10 items (blimit), but an integer overflow makes
the effective limit being 1.  So, unless there is frequent idle periods
(during which RCU ignores batch limits), RCU can be forced into a
state where it cannot keep up with the callback-generation rate,
eventually resulting in OOM.

This commit therefore converts a few variables in rcu_do_batch() from
int to long to fix this problem, along with the module parameters
controlling the batch limits.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 3.4.24
msm: acpuclock-krait: NULL terminate L2 table for find_cur_l2_level()

find_cur_l2_level() assumes that the L2 table is NULL terminated
when it has never been terminated. Therefore, if the rate that is
read from the hardware during boot is not found in the table we
will run off the end of the table and read potential junk values.
NULL terminate all the L2 tables so that the loop in
find_cur_l2_level() is guaranteed to terminate.

Change-Id: Ia5d0213000b44def35e388fd3cadf0293344257b
Reported-by: Laura Abbot <lauraa@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: acpuclock-krait: Keep the secondary MUX input fixed

With use of the QSB clock source recently eliminated, only one
input of the secondary clock MUX is used on any target. Since
there is overhead involved reprogramming this MUX when changing
the CPU and L2 frequencies, change the code to just program the
MUX at boot.  Most noticeably, this removes a 1us delay from
every CPU and L2 frequency switch.

Change-Id: I5cd8c981f1be49be7dbba1310d84df439e8be83b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/acpuclock-8930.c
	arch/arm/mach-msm/acpuclock-8960.c
	arch/arm/mach-msm/acpuclock-8960ab.c
	arch/arm/mach-msm/acpuclock-8974.c
msm: acpuclock-8064: Lower VDD_DIG voltage vote for L2 at 384MHz

New characterization data shows that vdd_dig voltage for L2@384MHz
can be lowered to 0.95v. Update the data in this patch.

Change-Id: Ibdb8568eca4d4ed602c5a5fee2f433a098dfbdcd
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/acpuclock-8064.c
msm: acpuclock-8064: Add support for 8064v1.1 FASTER PVS bin

Add updated PVS data.

Change-Id: I011241d3ea3943673a888cd0aeca925440500ff2
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/acpuclock-8064.c
Added new UV

All new UV values, including for faster frequency table :D

Conflicts:
	arch/arm/mach-msm/acpuclock-8064.c
mako: Change display color calibration

Adjusted it to values that felt best for my OWN eyes :D
Update kernel config from STOCK phone
ARCH/ARM: Fix warning
Remove + from kernel name display

Signed-off-by: Harsh Bhanvadia <harsh.slade@gmail.com>
Change name in kernel config and add separator "-"

Signed-off-by: Harsh Bhanvadia <harsh.slade@gmail.com>
Userspace Voltage Control (thanks faux123)

-Changed CONFIG name to my liking
-Fixed spelling in the Kconfig
Userspace Voltage Control: tweaked faux's original work to only get/set frequencies that are configured to be used as scaling frequencies.

Also lowered MIN_VDD to 700000 (700mV)
Added build flags and enable pipe

pipe to save my SSD a bit.

Signed-off-by: Harsh Bhanvadia <harsh.slade@gmail.com>
kernel config update

Enabled Voltage Control (need app or terminal sysfs)
Disabled Network Filesystems CIFS

Signed-off-by: Harsh Bhanvadia <harsh.slade@gmail.com>
mako LCD: keep RGB custom colors alive after screen off/on

When the back-light turns back on, reset the RGB values set in
sysfs (/sys/devices/platform/kcal_ctrl.0/kcal)
Makefile: set cross compiler and architecture
Merge branch 'refs/heads/linux-3.4.y' into wip

Conflicts:
	arch/arm/Kconfig
	arch/arm/include/asm/mutex.h
	arch/arm/mm/mmu.c
	arch/arm/mm/tlb-v7.S
	arch/arm/vfp/entry.S
	arch/arm/vfp/vfpmodule.c
	drivers/base/power/main.c
	drivers/bluetooth/btusb.c
	drivers/mmc/card/block.c
	drivers/mmc/host/sdhci.c
	drivers/net/tun.c
	drivers/usb/core/hub.c
	drivers/usb/host/xhci.h
	fs/ubifs/dir.c
	kernel/power/suspend.c
	net/bluetooth/hci_conn.c
	net/bluetooth/hci_event.c
	net/bluetooth/l2cap_core.c
	net/bluetooth/mgmt.c
	net/bluetooth/smp.c