summaryrefslogtreecommitdiff
path: root/drivers/staging/android
AgeCommit message (Collapse)Author
2012-01-19ram_console: set CON_ANYTIME console flagVarun Wadekar
We want to ensure that we get all the console messages, even ones that occur while the printing CPU is not yet online. cherry-pick a65e28a0149261776678977962cfa0f90973e1d4 from https://android.googlesource.com/kernel/common.git Change-Id: I8b83014a95fade7200e5201c29fb6624e1140aaf Signed-off-by: Dima Zavin <dima@android.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75460 Reviewed-by: Automatic_Commit_Validation_User
2011-11-30ram_console: pass in a boot info stringColin Cross
Allow the board file to pass a boot info string through the platform data that is appended to the /proc/last_kmsg file. Change-Id: I37065fafb09676085465c93384d8e176fdd942d6 Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30android: logger: bump up the logger buffer sizesJP Abgrall
(port from common android-2.6.39 commit: 11430f16545205c614dd5bd58e4a7ee630fc0f9f) events: (no change, 256) main: 64 -> 256 radio: 64 -> 256 system: 64 -> 256 Change-Id: I42c0d4cc9fa89735d2f05010236070e1e4737ffc Signed-off-by: JP Abgrall <jpa@google.com>
2011-11-30android: lowmemorykiller: Fix arguments to lowmem_shrinkColin Cross
The arguments to shrink functions have changed, update lowmem_shrink to match. Change-Id: I48f436e0509c416dc0b18db500234f7b1d6d42e1 Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30staging: android: lowmemorykiller: Ignore shmem pages in page-cacheArve Hjønnevåg
Change-Id: Ia54fc50b7dcabfeb71eb487c652803f83e2f3d8e Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30staging: android: lowmemorykiller: Don't wait more than one second for a ↵Arve Hjønnevåg
process to die If a process forked and the child process was killed by the lowmemorykiller, the lowmemory killer would be disabled until the parent process reaped the child or it died itself. Change-Id: I709b1a4e1b1a1970e51d26a39fcbee57977bbc7f Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30lowmemorykiller: don't unregister notifier from atomic contextRabin Vincent
The lowmemorykiller registers an atomic notifier for notfication of when the task is freed. From this atomic notifier callback, it removes the atomic notifier via task_free_unregister(). This is incorrect because atomic_notifier_chain_unregister() calls syncronize_rcu(), which can sleep, which shouldn't be done from an atomic notifier. Fix this by registering the notifier during init, and only unregister it if the lowmemorykiller is unloaded. Change-Id: I1577b04e617bc2b2e39dcb490fcfc9ce660eb7ec Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
2011-11-30staging: remove Greg's TODO, now obsolete.Brian Swetland
Signed-off-by: Brian Swetland <swetland@google.com>
2011-11-30lowmemorykiller: Update arguments of shrinker for 2.6.35Colin Cross
Change-Id: I6bb09b36639527f91c48704118acad5e50c4163f Signed-off-by: Colin Cross <ccross@google.com>
2011-11-30staging: android: lowmemorykiller: Remove bitrotted codepathSan Mehat
Now that we're murder-synchronous, this code path will never be called (and if it does, it doesn't tell us anything useful other than we killed a task that was already being killed by somebody else but hadn't gotten its' signal yet) Signed-off-by: San Mehat <san@google.com>
2011-11-30staging: android: lowmemorykiller: Fix task_struct leakSan Mehat
As it turns out, the CONFIG_PROFILING interfaces leak a task struct if the notifier chain returns NOTIFY_OK.. doh. This patch reworks lowmemkiller to use the new generic task free notifier chain. Signed-off-by: San Mehat <san@google.com>
2011-11-30binder: Fix memory corruption via page aliasingChristopher Lais
binder_deferred_release was not unmapping the page from the buffer before freeing it, causing memory corruption. This only happened when page(s) had not been freed by binder_update_page_range, which properly unmaps the pages. This only happens on architectures with VIPT aliasing. To reproduce, create a program which opens, mmaps, munmaps, then closes the binder very quickly. This should leave a page allocated when the binder is released. When binder_deferrred_release is called on the close, the page will remain mapped to the address in the linear proc->buffer. Later, we may map the same physical page to a different virtual address that has different coloring, and this may cause aliasing to occur. PAGE_POISONING will greatly increase your chances of noticing any problems. Change-Id: I6941bf212881b8bf846bdfda43d3609c7ae4892e Signed-off-by: Christopher Lais <chris+android@zenthought.org>
2011-11-30staging: android: lowmemkiller: Substantially reduce overhead during reclaimSan Mehat
This patch optimizes lowmemkiller to not do any work when it has an outstanding kill-request. This greatly reduces the pressure on the task_list lock (improving interactivity), as well as improving the vmscan performance when under heavy memory pressure (by up to 20x in tests). Note: For this enhancement to work, you need CONFIG_PROFILING Signed-off-by: San Mehat <san@google.com>
2011-11-30lowmemorykiller: Don't try to kill the same pid over and overSan Mehat
Under certain circumstances, a process can take awhile to handle a sig-kill (especially if it's in a scheduler group with a very low share ratio). When this occurs, lowmemkiller returns to vmscan indicating the process memory has been freed - even though the process is still waiting to die. Since the memory hasn't actually freed, lowmemkiller is called again shortly after, and picks the same process to die; regardless of the fact that it has already been 'scheduled' to die and the memory has already been reported to vmscan as having been freed. Solution is to check fatal_signal_pending() on the selected task, and if it's already pending destruction return; indicating to vmscan that no resources were freed on this pass. Signed-off-by: San Mehat <san@google.com>
2011-11-30Staging: android: binder: Create dedicated workqueue for binder deferred workArve Hjønnevåg
Some drivers flush the global workqueue when closed. This would deadlock if the last reference to the file was released from the binder. Change-Id: Ifdabc0b383fecb20836d1bbb9786c632402a14e1 Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30Staging: android: timed_gpio: Properly discard invalid timeout values.Mike Lockwood
The timed output device never previously checked the return value of sscanf, resulting in an uninitialized int being passed to enable() if input value was invalid. Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-11-30android-common: include linux/slab.hArve Hjønnevåg
Change-Id: Ib9655177bfaf00bd5682e1ac0d7e813e16a47eea
2011-11-30android-common: Fix slab.h includes for 2.6.34-rc4Colin Cross
2011-11-30binder: Move debugging information from procfs to debugfsArve Hjønnevåg
Change-Id: Ia0f9c8cec68054c6600a799ef864ebf1185c93ab Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30binder: Use seq_file for debug interface.Arve Hjønnevåg
Change-Id: I6e9c064ba024329099cb833b2ae9ab43c2ad8c6d Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30android: logger: Add new system log for framework/system log messagesSan Mehat
Signed-off-by: San Mehat <san@google.com>
2011-11-30Staging: android: timed_gpio: Request gpios.Arve Hjønnevåg
Change-Id: I9e98250a04e5505ce2db2edd355e8fdf8391cabd Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30Staging: android: ram_console: Start ram console earlierArve Hjønnevåg
Change-Id: I15d809d8c3002e5bf397a2b154e3803ea0e73642 Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30ramconsole/apanic: Ensure ramconsole does not get cluttered by apanic threadsSan Mehat
Signed-off-by: San Mehat <san@google.com>
2011-11-30Revert "Staging: android: mark subsystem as broken"Arve Hjønnevåg
This reverts commit 2cdf99ce2b9418c9d7c5f907195cfac421375520.
2011-11-30staging/android: fix build issuesCorentin Chary
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
2011-11-30Revert "Staging: android: delete android drivers"Arve Hjønnevåg
This reverts commit b0a0ccfad85b3657fe999805df65f5cfe634ab8a.
2009-12-11Staging: android: delete android driversGreg Kroah-Hartman
These drivers are no longer being developed and the original authors seem to have abandonded them and hence, do not want them in the mainline kernel tree. So sad :( Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30Staging: android: mark subsystem as brokenGreg Kroah-Hartman
It's causing lots of build errors, so just mark it as broken. It is scheduled to be removed in 2.6.33 anyway. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15staging: Make some structures staticJulia Lawall
This was done using a semantic patch (http://coccinelle.lip6.fr/) that checks that the declaration is not inside a function definition, that the defined variable is not exported using EXPORTED_SYMBOL, etc, and that the defined variable does not occur in any other file. If these conditions hold, static is added before the declaration. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: android: lowmemorykiller: fix module param errorsRandy Dunlap
Move module_params to near the end of the source file so that their references are already known/defined. Fixes build errors: drivers/staging/android/lowmemorykiller.c: In function '__check_cost': drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared (first use in this function) drivers/staging/android/lowmemorykiller.c: At top level: drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared here (not in a function) drivers/staging/android/lowmemorykiller.c:60: warning: type defaults to 'int' in declaration of 'type name' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: android: binder: partial checkpatch cleanupDaniel Walker
Clean up 3 or so checkpatch errors from one of my prior patches. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: android: lowmemorykiller: delete the decription fileDaniel Walker
Move the lowmemorykiller.txt into the actual source file which is really the correct place for it, and delete lowmemorykiller.txt. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: android: lowmemorykiller: remove a predefineDaniel Walker
I moved the struct shrinker down so that the predefine isn't needed. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: android: binder: cleanup some long linesDaniel Walker
This file has a lot of long line problems due to the massive indent issues that exist. This just cleans up some of the really really long ones. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15staging: android: binder: clean up for all the stat statmentsDaniel Walker
An initial cleanup of all the binder_stat statements. The binder command and return stats still need some assistance tho. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15staging: android: binder: global variable cleanup.Daniel Walker
Replaced a manual hlist_head declaration with a macro based one. Also reorganized the globals to be grouped better. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15staging: android: binder: add enum usage in function argumentsDaniel Walker
Declare the binder_deferred_state enum, and use the new enum for one of the binder_defer_work function arguments. This should keep the argument within the confines of the enum instead of the whole int range. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15staging: android: binder: remove a predefineDaniel Walker
I removed the binder_transaction_buffer_release predefine, and put the actual function in place of it. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15staging: android: binder: move debugging mask into a macroDaniel Walker
I moved the continual, if (binder_debug_mask & mask) printk() into a single macro so it's all in one place. It could be refined further from there. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value ↵David Rientjes
from task_struct to mm_struct" I'm about to merge "oom: move oom_adj value from task_struct to mm_struct", and this fixup is needed to repair linux-next's drivers/staging/android/lowmemorykiller.c. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: fix Kconfig issuesGreg Kroah-Hartman
Wrap all ANDROID config items with a #if to keep from asking if you want specific Android drivers even if you say N to CONFIG_ANDROID Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: binder: fix up some checkpatch warningsGreg Kroah-Hartman
This cleans up the majority of the checkpatch warnings in the android binder driver. All that is left now is a bunch of too-long-line stuff. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: ram_console: fix up remaining checkpatch warningsGreg Kroah-Hartman
This cleans up the last of the checkpatch warnings in the android ram_console driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: logger: fix up remaining checkpatch warningsGreg Kroah-Hartman
This cleans up the last of the checkpatch warnings in the android logger driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: fix up remaining checkpatch warningsGreg Kroah-Hartman
This cleans up the last of the checkpatch warnings in the android lowmemorykiller driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: timed_gpio: Separate timed_output class into a separate ↵Mike Lockwood
driver. Signed-off-by: Mike Lockwood <lockwood@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: fix possible android low memory killer ↵David Rientjes
NULL pointer get_mm_rss() atomically dereferences the actual without checking for a NULL pointer, which is possible since task_lock() is not held. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: cleanup android low memory killerDavid Rientjes
Clean up the code in lowmem_shrink() for the Android low memory killer so that it follows the kernel coding style. It's unnecessary to check for p->oomkilladj >= min_adj if the selected task's oomkilladj score is stored since get_mm_rss() will always be greater than zero. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: Don't count free space unless it meets ↵Arve Hjønnevåg
the specified limit by itself From: Arve Hjønnevåg <arve@android.com> This allows processes to be killed when the kernel evict cache pages in an attempt to get more contiguous free memory. Signed-off-by: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Cc: San Mehat <san@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>