Commit Graph

300454 Commits

Author SHA1 Message Date
Maya Erez
e7b054e8c1 block: ioctl support for sanitize in eMMC 4.5
Adding a new ioctl to support sanitize operation in eMMC
cards version 4.5.
The sanitize ioctl support helps performing this operation
via user application.

Change-Id: I79aa4163e7753a75bed5a26a9a92de902b4b9c21
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
(cherry picked from commit 73937f5face75e05ec2a72966d04f4e20aa18379)

Conflicts:

	block/blk-core.c
	block/elevator.c
	include/linux/blk_types.h
	include/linux/blkdev.h
	include/linux/fs.h
2013-02-20 01:32:26 -08:00
Michal Nazarewicz
ad9f4504bc lib: add bitmap_find_next_zero_area_off()
This commit adds a bitmap_find_next_zero_area_off() function which
works like bitmap_find_next_zero_area() function expect it allows an
offset to be specified when alignment is checked.  This lets caller
request a bit such that its number plus the offset is aligned
according to the mask.

Change-Id: Ib0593cf578ed69ba4c51b1e102a1f8ea1aeb93e8
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit 5f2929128ae4db1a6577748c72437f102ed400a5)
2013-02-20 01:32:25 -08:00
Rohit Vaswani
c47ea09155 lib: genalloc: Replace gen_pool_alloc with gen_pool_alloc_aligned
Parts of it come from:
commit 7d7c53a7d691a6effc30e51b6a9855affad414f2
Author:     Michal Nazarewicz <mina86@mina86.com>
AuthorDate: Wed Dec 15 21:34:23 2010 +0100
Commit:     Larry Bassel <lbassel@codeaurora.org>
CommitDate: Tue Apr 26 15:22:13 2011 -0700

Change-Id: Ia6d45c3166de50258c5e7703b71003065d570221
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-20 01:32:25 -08:00
Jordan Crouse
4e752a1de0 lib: Add debugfs file for tracking memory allocations
Add caller information to memory allocation calls and
create /sys/kernel/debug/mempool/map to show the current set of
allocations across all memory pools.

Change-Id: I0f3613158595a3a12837c46dfe500e2e3fea57b9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit 9081938c99b91c714316d6fa3a6618ab27789dc7)

Conflicts:

	arch/arm/mach-msm/memory.c
2013-02-20 01:32:24 -08:00
Jordan Crouse
ad6baf2b9e lib: Remove negative error values from allocate_contiguous_memory_nomap
allocate_contiguous_memory_nomap returns an unsigned long yet it
was returning errno codes for various failures.  Replace all negative
errno codes with 0, which is what all the callers expect on error anyway.

Change-Id: I3f847f70e0d7fa947a3442f43a980b3ffb1bfd96
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit f319151ecf9bdb51295ddbf6ac8385f63fd4ae70)
2013-02-20 01:32:23 -08:00
Larry Bassel
05019c4010 lib: remove extraneous exports and function prototypes
Remove the function prototype for the function
alloc_from_memory_pool() (this function was never implemented).
The function mem_type_to_memory_pool() was not intended to be
exported, so remove the export and function prototypes.

Change-Id: Iac47d5c8a8aaf21554c2a7a56f42d6f7de689d3e
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit fe7d2ee21af00476fe9e578fcfea1c34a70bd30f)
2013-02-20 01:32:23 -08:00
Larry Bassel
d9483c7058 lib: memory alloc
Add a generic library (which uses genalloc) that manages
pools of contiguous memory.

APIs are provided to allocate (and if desired map) and free
memory, as well to initialize a memory pool.

Change-Id: I75deda08eb852a323b4d1a32c3b7980e7aa143a8
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit 54bff5255ff4adf204d2b4a9805cdb998167fb9e)
2013-02-20 01:32:22 -08:00
Arve Hjønnevåg
72a790d2e2 consoleearlysuspend: Fix for 2.6.32
vt_waitactive now needs a 1 based console number

Change-Id: I07ab9a3773c93d67c09d928c8d5494ce823ffa2e
(cherry picked from commit b28a6a111c2c4779f92f310cfefe10606df4999f)
2013-02-20 01:32:22 -08:00
Arve Hjønnevåg
649c5ec14a PM: wakelock: Abort task freezing if a wake lock is held.
Avoids a problem where the device sometimes hangs for 20 seconds
before the screen is turned on.

Change-Id: Ib24dad1f0f56d280a80be820200ee9e9aea7a911
(cherry picked from commit 044fb1a352b4d367048b24c8c39abc2e572dc0e7)

Conflicts:

	kernel/power/process.c
2013-02-20 01:32:21 -08:00
Todd Poynor
6f9c00a76c PM: wakelocks: Display wakelocks preventing suspend by default
Use DEBUG_WAKEUP flag to show wakelocks that abort suspend, in
addition to showing wakelocks held during system resume.
DEBUG_WAKEUP is enabled by default.

Change-Id: If6fa68e8afbc482a5300ffab2964694b02b34f41
Signed-off-by: Todd Poynor <toddpoynor@google.com>
(cherry picked from commit ca64b0cd3a12d7704f4e98f4f5d51f41eb5047a2)
2013-02-20 01:32:20 -08:00
Colin Cross
da26fcfd19 wakelock: Fix operator precedence bug
Change-Id: I21366ace371d1b8f4684ddbe4ea8d555a926ac21
Signed-off-by: Colin Cross <ccross@google.com>
(cherry picked from commit 0c7841ce3e0a90bab630f671992348dafb022558)
2013-02-20 01:32:20 -08:00
Todd Poynor
a0c7f405af PM: wakelocks: Don't report wake up wakelock if suspend aborted
If the wakelock driver aborts suspend due to an already-held
wakelock, don't report the next wakelock held as the "wake up
wakelock".

Change-Id: I582ffbb87a3c361739a77d839a0c62921cff11a6
Signed-off-by: Todd Poynor <toddpoynor@google.com>
(cherry picked from commit ed27e538aa97278e26a6c00f14f6e2e076a1a2ae)
2013-02-20 01:32:19 -08:00
Mike Chan
cf83708fcc power: wakelock: Print active wakelocks when has_wake_lock() is called
When DEBUG_SUSPEND is enabled print active wakelocks when we check
if there are any active wakelocks.

In print_active_locks(), print expired wakelocks if DEBUG_EXPIRE is enabled

Change-Id: Ib1cb795555e71ff23143a2bac7c8a58cbce16547
Signed-off-by: Mike Chan <mike@android.com>
(cherry picked from commit af62b25adba1fe01c91aa88c95d1584371ab2bf9)
2013-02-20 01:32:18 -08:00
Mike Chan
714fdaf2e8 power: Prevent spinlock recursion when wake_unlock() is called
Signed-off-by: Mike Chan <mike@android.com>
(cherry picked from commit 97a0a74383d19a1a43ffca81271894ba3edc07b6)
2013-02-20 01:32:18 -08:00
Arve Hjønnevåg
75880a8986 PM: wakelocks: Use seq_file for /proc/wakelocks so we can get more than 3K of stats.
Change-Id: I42ed8bea639684f7a8a95b2057516764075c6b01
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 1b0749512f76005ce41607472e6f36411fa96649)
2013-02-20 01:32:17 -08:00
Todd Poynor
eef8bae31e PM: Backoff suspend if repeated attempts fail
Change-Id: I32289676d95a307ea3aa5e78f6c126ca979c0fec
Signed-off-by: Todd Poynor <toddpoynor@google.com>
(cherry picked from commit 7013f4976374ea75cb35446393be7bdc37bf607f)

Conflicts:

	kernel/power/wakelock.c
2013-02-20 01:32:17 -08:00
Colin Cross
9fd5fc24ec power: wakelock: use get_xtime_and_monotonic_and_sleep_offset in get_expired_time
Change-Id: I6ebe6b954b2ff328d46898d683650dafb9c4fe74
Signed-off-by: Erik Gilling <konkers@android.com>
(cherry picked from commit 28e23cf73c26d2bb13451804e328797a55f471e4)

Conflicts:

	kernel/power/wakelock.c
2013-02-20 01:32:16 -08:00
Erik Gilling
72baef3e87 power: wakelocks: fix buffer overflow in print_wake_locks
Change-Id: Ic944e3b3d3bc53eddc6fd0963565fd072cac373c
Signed-off-by: Erik Gilling <konkers@android.com>
(cherry picked from commit 10f0138c56a31a39c2a123af5af95cf8fd5de1ac)
2013-02-20 01:32:15 -08:00
Pratik Patel
2da9b910c0 power: fix suspend_sys_sync_wait()
Since the workqueue code deletes the work before executing it,
checking for no work item being currently queued to the workqueue
is not sufficient to guarantee that all the works have finished
execution.

Use a counter to guarantee that all the pending suspend_sys_sync()
works have finished execution before returning from
suspend_sys_sync_wait().

CRs-Fixed: 293595
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>

Conflicts:

	kernel/power/wakelock.c
(cherry picked from commit 529461b70c7dc20b0371e54a63844edae905d7a2)

Conflicts:

	kernel/power/wakelock.c

Change-Id: I501743b6b76e492e1598df83ebc1178835ae8405
2013-02-20 01:32:15 -08:00
Amar Singhal
77c5678ea8 framebuffer: add a pollable sysfs entry for display status
Wakeup the userspace poll on change of display status. The
userspace then may take action to change the
power/performance characteristics of the device.

Change-Id: I9bd11f3d895d3d83230104f5d8dcd1deeaa754cd
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
(cherry picked from commit 2fb0354486e2d7b8d73622cbdbb941748a921240)
2013-02-20 01:32:14 -08:00
Pratik Patel
1ae5815864 power: fix lcd resume taking long time with an ongoing file copy
This fixes the issue where LCD takes a long time to come back up
since the execution of backlight on and late_resume works by the
suspend worker thread is delayed due to one (or more) of the
sys_sync calls in early_suspend and suspend paths taking a long
time (sometimes 15sec or more) for the below reported scenario(s):

Scenario 1 (copy with usb connected):
1. plug usb
2. adb shell
3. busybox cp /sdcard/file1 /sdcard/file2 (copy >= 100MB file1
   in sdcard/emmc to file2 in sdcard/emmc)
4. press end key to suspend
5. press end key again and it takes a long time for LCD to come
   back up

Scenario 2 (background copy):
1. plug usb
2. adb shell
3. busybox cp /sdcard/file1 /sdcard/file2 & (copy >= 100MB file1
   in sdcard/emmc to file2 in sdcard/emmc)
4. disconnect usb
5. press end key to suspend
6. press end key again and it takes a long time for LCD to come
   back up

A more common form of Scenario 2 is for the user to just use the
copy function on the UI to copy large file(s).

We address this by moving sys_sync calls to a separate workqueue
and having a timeout polling based mechanism to bail out of suspend
in case of user invoking a wakeup event (like end key press) while
we are waiting for the sys_sync completion at the synchronization
point in suspend worker thread context.

CRs-Fixed: 283994
Change-Id: I6b54af8432e58fd5442817b7388ce2e0b83354b6
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
(cherry picked from commit 8564b5ebeafa2be276e0004d7d32bd101642fb3d)

Conflicts:

	kernel/power/process.c
2013-02-20 01:32:14 -08:00
Erik Gilling
57806f1cf0 earlysuspend: add verbose debug flag
when enabled, prints out the function of each handler as they are called

Change-Id: I5ed251867e0e3aa3cd05f030ff3579808cedd0c2
Signed-off-by: Erik Gilling <konkers@android.com>
(cherry picked from commit fec502d9a18bbe8045c67bd4f9d3a1ade4e78555)
2013-02-20 01:32:13 -08:00
Arve Hjønnevåg
3153586f73 PM: Enable early suspend through /sys/power/state
If EARLYSUSPEND is enabled then writes to /sys/power/state no longer
blocks, and the kernel will try to enter the requested state every
time no wakelocks are held. Write "on" to resume normal operation.

Change-Id: Icbe3c6fe6f5e0f4a3f948f1495546690ac9fd6e6
(cherry picked from commit 219955f707852f68f5118a515fc43ad067728ab9)
2013-02-20 01:32:12 -08:00
Amar Singhal
c387a7f0fb kernel/main: fix calling sysfs_notify from atomic context
Sysfs_notify takes a mutex and therefore cannot be called from atomic
context like interrupt handler in this case. Use a workqueue to schedule
the work instead.

Change-Id: I0a5230fe379aa51f1065df4af9b27f471aa22440
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
(cherry picked from commit 97d68a8b69e87480c436dd8365b438c3d18fed47)

Conflicts:

	kernel/power/main.c
2013-02-20 01:32:12 -08:00
Amar Singhal
6cc6e7bc61 kernel/power: add pollable sysfs entries for touch events
Provide userspace with a pollable sysfs entry that it can poll
on waiting for touch event notifiction. Once it
is woken up, the userspace can take action to change the
power/performance characteristics of the device for the duration
of the event.

Change-Id: Iab84f729f2ea3a5352c4e5173f78544023a276c1
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
(cherry picked from commit ac2a6d6453c50db7ba7c0b3aa328a3ba48a84abf)
2013-02-20 01:32:11 -08:00
Arve Hjønnevåg
da87d74481 PM: Add user-space wake lock api.
This adds /sys/power/wake_lock and /sys/power/wake_unlock.
Writing a string to wake_lock creates a wake lock the
first time is sees a string and locks it. Optionally, the
string can be followed by a timeout.
To unlock the wake lock, write the same string to wake_unlock.

Change-Id: I66c6e3fe6487d17f9c2fafde1174042e57d15cd7
(cherry picked from commit 025ff0ad2f)

Conflicts:

	kernel/power/Makefile
	kernel/power/power.h
2013-02-20 01:32:11 -08:00
Marc Zyngier
c101c0ceea ARM: local timers: Add A15 architected timer support
Add support for the A15 generic timer and clocksource.
As the timer generates interrupts on a different PPI depending
on the execution mode (normal or secure), it is possible to
register two different PPIs.

Change-Id: Ibaddc7f174bc168cef579b66ab06b966878ae155
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
(cherry picked from commit f5b3b2b2a44e813fbbe1799965a8879429f59329)

Conflicts:

	arch/arm/kernel/Makefile
2013-02-20 01:32:10 -08:00
Suren Eda Naarayana Kulothungan
5a83277e9b arm: common: Add indirect L2 rw support for cpaccess
Added indirect L2 rw support to cpaccess kernel module. Input format
change to include a parameter to specify register access type. Validation
if register type is one of supported types.

Change-Id: I5bd52c89d87a4fb4da4248526e56079bb604f910
Signed-off-by: Suren Eda Naarayana Kulothungan <sedanaar@codeaurora.org>
(cherry picked from commit 4c317fbf87a93d8e34e33063b6164e5d5c32cdd0)
2013-02-20 01:32:10 -08:00
Neil Leeder
8b1e4d0d20 arm: oprofile: Add OProfile support for 7x27a or Cortex A5 cpu type
This patch adds support to recognise cortex A5 cputype for oprofile,
which in turn enables the armv7 generic events to be picked.

Change-Id: I025f4b361b4e85bbeea4eefc71572f4ae5b602e4
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
(cherry picked from commit 1540f31eb76f2e775d1a04edb6d9f8397d4f6637)
2013-02-20 01:32:09 -08:00
Sheetal Sahasrabudhe
e11d14dfd1 KSAPI: Performance monitoring tool for Snapdragon linux
KSAPI records performance statistics for Snapdragon linux platform.
It uses the /proc FS as a means to exchange configuration data and counter
statistics. It can monitor the counter statistics for Scorpion processor
supported hardware performance counters on a per thread basis or AXI
counters on an overall system basis.

Change-Id: Iaaf51db68dbd6d5a55fe34328d041bde5015230d
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
(cherry picked from commit 4e6bb52bcee479762f283b4a44a1bdd4f1277aa2)

Conflicts:

	arch/arm/Kconfig
2013-02-20 01:32:08 -08:00
Rohit Vaswani
8636af8f7a arm: process.c: Define arm_pm_idle
Define arm_pm_idle to be arch_idle which is defined in pm-8x60.c
(This code should be moved to the pm-8x60 file later on)

Change-Id: I345d436111c585e4dfbae367dac5d24d1a1f9711
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-20 01:32:08 -08:00
Rohit Vaswani
8f6baaa96f arm: fiq: Provide empty stubs for fiq functions
A driver using fiq functions should be usable on targets
with or without CONFIG_FIQ enabled. Instead of making code
dependent on #ifdef CONFIG_FIQ, add empty stubs for the fiq
functions.

Change-Id: Ie8b1905ba53664d99bd707be3c83291c97eb1066
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
(cherry picked from commit eb81fb3bdea411fed5c26400f9769bad7fb0743f)
2013-02-20 01:32:07 -08:00
Stepan Moskovchenko
efe7991590 msm: Configure Krait-specific settings
Write a Krait-specific configuration setting when enabling
the MMU.

Change-Id: I539526a4a3fa28b4b466db35c589afecab4ed257
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 6fd9c9295ce2f95af2868bf2b0b3a7d3c2985aa0)

Conflicts:

	arch/arm/mach-msm/idle-v7.S
2013-02-20 01:32:07 -08:00
Rohit Vaswani
3b3b1aa473 ARM: Disable the external caches during restart
ARM restart code flushes the cpu caches, but leaves
the external caches unflushed. Disable the external cache
to get all the desired data and prevent loss of further
information.

Change-Id: Ie6a6765cdc1dfc8ee7d4c4ed473fdbf4d5ef9b88
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
(cherry picked from commit eee780eafdf990702fdd8178b865af322b2a7621)

Conflicts:

	arch/arm/kernel/process.c
2013-02-20 01:32:06 -08:00
Jeff Ohlstein
3bf244a816 smp: change printks that occur every hotplug to pr_debugs
Hotplug occurs frequently enough on our targets that its messages are
clogging up the logs. There is no need for any messages to be printed
when hotplug is successful.

Change-Id: Icf213ab409ba428f39439f886cdf4c070a48bfbf
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
(cherry picked from commit 4d0bd4217b4e451843dc21208036d25f9d2871f8)

Conflicts:

	arch/arm/kernel/smp.c
2013-02-20 01:32:06 -08:00
Santosh Shilimkar
26027790e5 ARM: smp: Fix Unknown IPI message 0x1
Commit 'ad3b6993' converted ARM smp_cross_call() to take IPI number
as a parameter to handle more event than SGI and do_IPI was suppose
to recover SGI number. But the do_IPI doesn't consider it and it's
getting detected as 'Unknown IPI message 0x1' with ipi numbers are
moved to starts from 'IPI_TIMER=2"

There can be 16 different SGI but only SGI1 is used as IPI so
only that one is handled in do_IPI as IPI_CPU_START.

Added IPI_CPU_START because it wasn't used and thought it's
appropriate. Not sure whether its the right one.

Change-Id: I4dbe7c489d9611fbbb4036c15ac247659fde4119
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Russell King <rmk+kernel at arm.linux.org.uk>
[johlstei@codeaurora.org: fixed bounds check error]
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
(cherry picked from commit 7f685e51169149a877cb3100670567fb03c969f5)
2013-02-20 01:32:05 -08:00
Larry Bassel
0672ddbaee arm: support very early callback into board functions
Due to changes of the order of initialization of
the ARM-specfic memory management code in 3.0, it
is necessary to create a way to call platform specific
code earlier than is currently possible.

Change-Id: I77dae10c85085358f7240889a50b78b07d5af6d1
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit f81fb5655af9aaf573cb11b9a64e0a826fa580e2)

Conflicts:

	arch/arm/kernel/setup.c
2013-02-20 01:32:05 -08:00
Jin Hong
2b50aa3639 arm: show present cpu instead of online cpu in /proc/cpuinfo
Some userspace applications use /proc/cpuinfo to determine how many CPUs
the system has. CPU hotplug can offline a CPU at runtime and causing the
offline CPU not present in /proc/cpuinfo if we only show online cpu in
/proc/cpuinfo.

CRs-Fixed: 354430
Change-Id: I22a15d2d141c713dcd4abaa8bb74ecad6508900f
Signed-off-by: Jin Hong <jinh@codeaurora.org>
(cherry picked from commit 1e28794d0ff00fc6567d68b5b4e863b0745cfe20)
2013-02-20 01:32:04 -08:00
Stepan Moskovchenko
65e4950d12 arm: Add condition code check to SWP emulator
When emulating a SWP/SWPB instruction, check the condition
code of the instruction and compare it against CPSR status
bits rather than relying on the architecture to only raise
an undefined instruction exception if the condition checks
are passing.

Change-Id: I9707960b091c3a5af20e396e0b6d5ed2aaf935ff
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 3308e7be1800faab8988f2b87c83c3bbb72d7e22)
2013-02-20 01:32:03 -08:00
Stephen Boyd
cc2d715407 msm: clock: Support clk_prepare/unprepare()
Fill in the boiler plate prepare()/unprepare() code. Add a
prepare count and a prepare lock to protect the prepare/unprepare
paths. Also handle the parent/child relationship similarly to how
enable/disable is done.

In particular, WARN() whenever a driver calls clk_enable() before
calling clk_prepare() and whenever a driver calls clk_unprepare()
before calling clk_disable(). This should catch a few bugs even
though it's technically not SMP safe if an enable call is racing
with an unprepare call for example.

We also mark PLLs and XOs as already warned since those are
mostly internal clocks that driver authors aren't aware of. The
markings will be removed when the local clock driver is updated
to handle prepare/unprepare in another patch.

Change-Id: I41dd39d27a279f3477c6e1cef292ac5308d65243
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 3bbf3462ee55a3a0ad48c50214f6263401fc9265)

Conflicts:

	arch/arm/mach-msm/clock-7x30.c
	arch/arm/mach-msm/clock-8960.c
	arch/arm/mach-msm/clock-8x60.c
	arch/arm/mach-msm/clock-9615.c
	arch/arm/mach-msm/clock-debug.c
	arch/arm/mach-msm/clock-rpm.h
	arch/arm/mach-msm/clock.c
	arch/arm/mach-msm/clock.h
2013-02-20 01:32:03 -08:00
Jeff Ohlstein
a562039b92 msm: timer: Use generic sched_clock interface
Change-Id: If733b547cabc7b30ba610f675a9657c3800db384
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
2013-02-20 01:32:02 -08:00
Taniya Das
ea19dcbaba ARM: Kconfig: Fix HAVE_ARM_SCU for MSM_SMP
Select HAVE_ARM_SCU for all targets, irrespective of the chip using the
ARM's SCU.

Change-Id: Icf3706e0c4149ebf834b64b5ed14de98b137b94b
Signed-off-by: Taniya Das <tdas@codeaurora.org>
(cherry picked from commit 2760d854e5743bc11be7d56ebe4a42406ff15a6c)

Conflicts:

	arch/arm/Kconfig
2013-02-20 01:32:02 -08:00
Suren Eda Naarayana Kulothungan
8226f46a08 arm: common: CP register access tool for Read/Write to CP registers
The tool can be used to read/write to CP registers by
passing the CP parameters through /sys interface. SMP
support added.

Change-Id: I01d3621f2b6f17d959a237d207b817992404ef88
Signed-off-by: Suren Eda Naarayana Kulothungan <sedanaar@codeaurora.org>
(cherry picked from commit c399b9755096e95036362f00f819c28650eb1a10)

Conflicts:

	arch/arm/Kconfig
	arch/arm/common/Makefile
2013-02-20 01:32:01 -08:00
Jay Chokshi
b24e6e7327 arm: Kconfig: Disable CONFIG_OABI_COMPAT feature on SMP targets
When this option is enabled to support Old ABI, it introduces
a race condition in swap-out code on SMP, such that
instruction is available to the instruction stream (SWI
instruction) but not the data stream.

CPU0		CPU1
clears pte
		executes instruction from page,
		already has I-TLB but no D-TLB entry,
		takes SWI exception
		tries to load instruction, data abort
tlb flush

Therefore, disable this feature on SMP targets.

Change-Id: I4cc4e6924cfcffad391fe2e68d5aa62eee613b0e
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
(cherry picked from commit 82024ccacd693b12dfeeef70e956b7f5d324de80)
2013-02-20 01:32:01 -08:00
Jeff Ohlstein
1e89bc167b arm: Turn off generic lockbreak when using ticket spinlocks
CONFIG_GENERIC_LOCKBREAK can still cause livelocks in some situations,
even when using ticket spinlocks.

Change-Id: I9db23589ffe1d054e9a359804a6c4858baeb6602
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
(cherry picked from commit 8a9e3936053600b647921b6196e667772f815857)
2013-02-20 01:32:00 -08:00
Brent DeGraaf
0286aa474e arm: Implement ticket spin-locks
Introduce optional ticket locks to help ensure fairness in
contended locks, as well as preventing livelock.

CRs-fixed: 302764
Signed-off-by: Brent DeGraaf <bdegraaf@codeaurora.org>

Conflicts:

	arch/arm/include/asm/spinlock.h
(cherry picked from commit 8e7b85734e72e3f9e8383017097a9c2faacfac14)

Conflicts:

	arch/arm/Kconfig

Change-Id: I0f37346fd621ae5d8df62b3393c4f7c9d6aa7af6
2013-02-20 01:31:59 -08:00
Laura Abbott
2972c10df5 arm: Add HOLES_IN_ZONE option
Previous, commit 14e0729841
(add pfn_valid_within helper for sub-MAX_ORDER hole detection)
added support for the HOLES_IN_ZONE option. A corresponding
Kconfig was added to ia64 but not arm. Add support for this
option.

Change-Id: Ia37263f0f448cdbceb37ac2525cca906ba53f0f8
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
(cherry picked from commit 224d00ca68501bea52600e53c12a37f7ef96172d)
2013-02-20 01:31:59 -08:00
Bryan Huntsman
e900f7edd3 ARM: allow memory hotplug/hotremove
Add ARM to the supported list of architectures for MEMORY_HOTPLUG.  For
ARM, the selection of MEMORY_HOTPLUG/REMOVE is specific to the sub-arch
and has to be explicitly enabled by the sub-arch.

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
(cherry picked from commit 45f580d9c36b93204882dffc6fb9f4a254c3d34a)
2013-02-20 01:31:58 -08:00
Larry Bassel
f1ed1b1cec arm: add support for DONT_MAP_HOLE_AFTER_MEMBANK0
Some platforms have memory at the top of the
first memory bank which the kernel cannot
access. Mapping this is unnecessary and wastes
precious virtual space.

Change-Id: I20be40a17c5d80d889b0903f11fa0fe1b3190e7a
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit fe101112b8354688c509ce7474ea88ff6ed86bef)

Conflicts:

	arch/arm/mach-msm/include/mach/memory.h
2013-02-20 01:31:58 -08:00
Zach Pfeffer
3ee0a6af9a cpufreq: Add option to turn cpufreq on.
Signed-off-by: Zach Pfeffer <zpfeffer@quicinc.com>
(cherry picked from commit 403116c6ae351d252da87aed11af03e6d649dac1)
2013-02-20 01:31:57 -08:00