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 <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Replaced a manual hlist_head declaration with a macro based one.
Also reorganized the globals to be grouped better.
Signed-off-by: Daniel Walker <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
I removed the binder_transaction_buffer_release predefine, and put
the actual function in place of it.
Signed-off-by: Daniel Walker <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
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 <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use NR_ACTIVE plus NR_INACTIVE as a size estimate for our fake cache
instead the sum of rss. Neither method is accurate.
Also skip the process scan, if the amount of memory available is above
the largest threshold set.
Signed-off-by: Arve Hjønnevåg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: San Mehat <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If a transaction that contains a file descriptor fails on a later object,
the new file descriptor needs to be closed. If this is a binder file
descriptor we would deadlock in flush. If there were no other references to
the file at this point release would also be called.
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If a thread is part of a transaction stack, it is only allowed to make
another call if it was the target of the top transaction on the stack.
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This prevents breaking fget_light if a single threaded application
allows incoming file descriptors (in replies or on nodes).
Should also prevent inserting a file in the wrong files_struct if the
receving process execs in the middle of a transaction (between
task_get_unused_fd_flags and task_fd_install).
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Check that datasize is not smaller than one flat_binder_object.
Check that offsets are aligned.
Check that offsets_size is aligned.
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Only allow a binder file pointer to be mmapped once. The buffer management
code cannot deal with more then one area.
Also remove leftover mutex_unlock if mmap fails.
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Many platforms do not support mappings without VM_EXEC.
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix more android ram_console printk format warnings:
drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix android printk format warnings:
linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix printk format warnings in android binder:
drivers/staging/android/binder.c:2652: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'
drivers/staging/android/binder.c:2659: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'
drivers/staging/android/binder.c:2680: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The last build fix I did messed up the units of the sysfs file.
This puts them back to be milliseconds, like they originally were.
Thanks to Juha Motorsportcom for pointing this out.
Reported-by: Juha Motorsportcom <[email protected]>
Cc: Mike Lockwood <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Compile tested.
task_struct->signal is not protected by RCU, the code is bogus.
Change the code to take ->siglock to pin ->signal.
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Cc: Brian Swetland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ktime_t isn't ment to directly access on all arches, so use the proper
conversion functions instead to figure out what time is remaining.
Reported-by: Randy Dunlap <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Cc: Mike Lockwood <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes the build errors and warnings in the binder driver. It can't
be a module, due to a lack of some of the symbols being exported.
Also added a MODULE_LICENSE(), as it was missing.
Cc: Arve Hjønnevåg <[email protected]>
Cc: Brian Swetland <[email protected]>
Cc: Robert Love <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are files now in the drivers/staging/android/ directory, so the
dummy android.c file can be safely removed.
Cc: Robert Love <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Doesn't quite link properly under all configurations, and it has way too
many different build options, but it's a start.
Signed-off-by: Arve Hjønnevåg <[email protected]>
Signed-off-by: Brian Swetland <[email protected]>
Cc: Robert Love <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>