summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'akpm' (updates from Andrew Morton)Linus Torvalds2013-07-031-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge first patch-bomb from Andrew Morton: - various misc bits - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been distracted. There has been quite a bit of activity. - About half the MM queue - Some backlight bits - Various lib/ updates - checkpatch updates - zillions more little rtc patches - ptrace - signals - exec - procfs - rapidio - nbd - aoe - pps - memstick - tools/testing/selftests updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (445 commits) tools/testing/selftests: don't assume the x bit is set on scripts selftests: add .gitignore for kcmp selftests: fix clean target in kcmp Makefile selftests: add .gitignore for vm selftests: add hugetlbfstest self-test: fix make clean selftests: exit 1 on failure kernel/resource.c: remove the unneeded assignment in function __find_resource aio: fix wrong comment in aio_complete() drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode drivers/memstick/host/r592.c: convert to module_pci_driver drivers/memstick/host/jmb38x_ms: convert to module_pci_driver pps-gpio: add device-tree binding and support drivers/pps/clients/pps-gpio.c: convert to module_platform_driver drivers/pps/clients/pps-gpio.c: convert to devm_* helpers drivers/parport/share.c: use kzalloc Documentation/accounting/getdelays.c: avoid strncpy in accounting tool aoe: update internal version number to v83 aoe: update copyright date aoe: perform I/O completions in parallel ...
| * drivers: avoid format string in dev_set_nameKees Cook2013-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Calling dev_set_name with a single paramter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents, including wrappers like device_create*() and bdi_register(). Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge tag 'pm+acpi-3.11-rc1' of ↵Linus Torvalds2013-07-031-2/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI updates from Rafael Wysocki: "This time the total number of ACPI commits is slightly greater than the number of cpufreq commits, but Viresh Kumar (who works on cpufreq) remains the most active patch submitter. To me, the most significant change is the addition of offline/online device operations to the driver core (with the Greg's blessing) and the related modifications of the ACPI core hotplug code. Next are the freezer updates from Colin Cross that should make the freezing of tasks a bit less heavy weight. We also have a couple of regression fixes, a number of fixes for issues that have not been identified as regressions, two new drivers and a bunch of cleanups all over. Highlights: - Hotplug changes to support graceful hot-removal failures. It sometimes is necessary to fail device hot-removal operations gracefully if they cannot be carried out completely. For example, if memory from a memory module being hot-removed has been allocated for the kernel's own use and cannot be moved elsewhere, it's desirable to fail the hot-removal operation in a graceful way rather than to crash the kernel, but currenty a success or a kernel crash are the only possible outcomes of an attempted memory hot-removal. Needless to say, that is not a very attractive alternative and it had to be addressed. However, in order to make it work for memory, I first had to make it work for CPUs and for this purpose I needed to modify the ACPI processor driver. It's been split into two parts, a resident one handling the low-level initialization/cleanup and a modular one playing the actual driver's role (but it binds to the CPU system device objects rather than to the ACPI device objects representing processors). That's been sort of like a live brain surgery on a patient who's riding a bike. So this is a little scary, but since we found and fixed a couple of regressions it caused to happen during the early linux-next testing (a month ago), nobody has complained. As a bonus we remove some duplicated ACPI hotplug code, because the ACPI-based CPU hotplug is now going to use the common ACPI hotplug code. - Lighter weight freezing of tasks. These changes from Colin Cross and Mandeep Singh Baines are targeted at making the freezing of tasks a bit less heavy weight operation. They reduce the number of tasks woken up every time during the freezing, by using the observation that the freezer simply doesn't need to wake up some of them and wait for them all to call refrigerator(). The time needed for the freezer to decide to report a failure is reduced too. Also reintroduced is the check causing a lockdep warining to trigger when try_to_freeze() is called with locks held (which is generally unsafe and shouldn't happen). - cpufreq updates First off, a commit from Srivatsa S Bhat fixes a resume regression introduced during the 3.10 cycle causing some cpufreq sysfs attributes to return wrong values to user space after resume. The fix is kind of fresh, but also it's pretty obvious once Srivatsa has identified the root cause. Second, we have a new freqdomain_cpus sysfs attribute for the acpi-cpufreq driver to provide information previously available via related_cpus. From Lan Tianyu. Finally, we fix a number of issues, mostly related to the CPUFREQ_POSTCHANGE notifier and cpufreq Kconfig options and clean up some code. The majority of changes from Viresh Kumar with bits from Jacob Shin, Heiko Stübner, Xiaoguang Chen, Ezequiel Garcia, Arnd Bergmann, and Tang Yuantian. - ACPICA update A usual bunch of updates from the ACPICA upstream. During the 3.4 cycle we introduced support for ACPI 5 extended sleep registers, but they are only supposed to be used if the HW-reduced mode bit is set in the FADT flags and the code attempted to use them without checking that bit. That caused suspend/resume regressions to happen on some systems. Fix from Lv Zheng causes those registers to be used only if the HW-reduced mode bit is set. Apart from this some other ACPICA bugs are fixed and code cleanups are made by Bob Moore, Tomasz Nowicki, Lv Zheng, Chao Guan, and Zhang Rui. - cpuidle updates New driver for Xilinx Zynq processors is added by Michal Simek. Multidriver support simplification, addition of some missing kerneldoc comments and Kconfig-related fixes come from Daniel Lezcano. - ACPI power management updates Changes to make suspend/resume work correctly in Xen guests from Konrad Rzeszutek Wilk, sparse warning fix from Fengguang Wu and cleanups and fixes of the ACPI device power state selection routine. - ACPI documentation updates Some previously missing pieces of ACPI documentation are added by Lv Zheng and Aaron Lu (hopefully, that will help people to uderstand how the ACPI subsystem works) and one outdated doc is updated by Hanjun Guo. - Assorted ACPI updates We finally nailed down the IA-64 issue that was the reason for reverting commit 9f29ab11ddbf ("ACPI / scan: do not match drivers against objects having scan handlers"), so we can fix it and move the ACPI scan handler check added to the ACPI video driver back to the core. A mechanism for adding CMOS RTC address space handlers is introduced by Lan Tianyu to allow some EC-related breakage to be fixed on some systems. A spec-compliant implementation of acpi_os_get_timer() is added by Mika Westerberg. The evaluation of _STA is added to do_acpi_find_child() to avoid situations in which a pointer to a disabled device object is returned instead of an enabled one with the same _ADR value. From Jeff Wu. Intel BayTrail PCH (Platform Controller Hub) support is added to the ACPI driver for Intel Low-Power Subsystems (LPSS) and that driver is modified to work around a couple of known BIOS issues. Changes from Mika Westerberg and Heikki Krogerus. The EC driver is fixed by Vasiliy Kulikov to use get_user() and put_user() instead of dereferencing user space pointers blindly. Code cleanups are made by Bjorn Helgaas, Nicholas Mazzuca and Toshi Kani. - Assorted power management updates The "runtime idle" helper routine is changed to take the return values of the callbacks executed by it into account and to call rpm_suspend() if they return 0, which allows us to reduce the overall code bloat a bit (by dropping some code that's not necessary any more after that modification). The runtime PM documentation is updated by Alan Stern (to reflect the "runtime idle" behavior change). New trace points for PM QoS are added by Sahara (<keun-o.park@windriver.com>). PM QoS documentation is updated by Lan Tianyu. Code cleanups are made and minor issues are addressed by Bernie Thompson, Bjorn Helgaas, Julius Werner, and Shuah Khan. - devfreq updates New driver for the Exynos5-bus device from Abhilash Kesavan. Minor cleanups, fixes and MAINTAINERS update from MyungJoo Ham, Abhilash Kesavan, Paul Bolle, Rajagopal Venkat, and Wei Yongjun. - OMAP power management updates Adaptive Voltage Scaling (AVS) SmartReflex voltage control driver updates from Andrii Tseglytskyi and Nishanth Menon." * tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits) cpufreq: Fix cpufreq regression after suspend/resume ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state() PM / Sleep: Warn about system time after resume with pm_trace cpufreq: don't leave stale policy pointer in cdbs->cur_policy acpi-cpufreq: Add new sysfs attribute freqdomain_cpus cpufreq: make sure frequency transitions are serialized ACPI: implement acpi_os_get_timer() according the spec ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan ACPI: Add CMOS RTC Operation Region handler support ACPI / processor: Drop unused variable from processor_perflib.c cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases ...
| * Merge branch 'freezer'Rafael J. Wysocki2013-06-281-2/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * freezer: af_unix: use freezable blocking calls in read sigtimedwait: use freezable blocking call nanosleep: use freezable blocking call futex: use freezable blocking call select: use freezable blocking call epoll: use freezable blocking call binder: use freezable blocking calls freezer: add new freezable helpers using freezer_do_not_count() freezer: convert freezable helpers to static inline where possible freezer: convert freezable helpers to freezer_do_not_count() freezer: skip waking up tasks with PF_FREEZER_SKIP set freezer: shorten freezer sleep time using exponential backoff lockdep: check that no locks held at freeze time lockdep: remove task argument from debug_check_no_locks_held freezer: add unsafe versions of freezable helpers for CIFS freezer: add unsafe versions of freezable helpers for NFS
| | * binder: use freezable blocking callsColin Cross2013-05-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid waking up every thread sleeping in a binder call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2013-07-031-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull second set of VFS changes from Al Viro: "Assorted f_pos race fixes, making do_splice_direct() safe to call with i_mutex on parent, O_TMPFILE support, Jeff's locks.c series, ->d_hash/->d_compare calling conventions changes from Linus, misc stuff all over the place." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) Document ->tmpfile() ext4: ->tmpfile() support vfs: export lseek_execute() to modules lseek_execute() doesn't need an inode passed to it block_dev: switch to fixed_size_llseek() cpqphp_sysfs: switch to fixed_size_llseek() tile-srom: switch to fixed_size_llseek() proc_powerpc: switch to fixed_size_llseek() ubi/cdev: switch to fixed_size_llseek() pci/proc: switch to fixed_size_llseek() isapnp: switch to fixed_size_llseek() lpfc: switch to fixed_size_llseek() locks: give the blocked_hash its own spinlock locks: add a new "lm_owner_key" lock operation locks: turn the blocked_list into a hashtable locks: convert fl_link to a hlist_node locks: avoid taking global lock if possible when waking up blocked waiters locks: protect most of the file_lock handling with i_lock locks: encapsulate the fl_link list handling locks: make "added" in __posix_lock_file a bool ...
| * | | more open-coded file_inode() callsAl Viro2013-06-291-1/+1
| |/ / | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | | staging: android: Fix typo in staging/androidMasanari Iida2013-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | Fix "with with" in debug message. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Merge 3.10-rc5 into staging-nextGreg Kroah-Hartman2013-06-081-2/+6
|\| |
| * | staging: alarm-dev: information leak in alarm_compat_ioctl()Dan Carpenter2013-06-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we pass an invalid clock type then "ts" is never set. We need to check for errors earlier, otherwise we end up passing uninitialized stack data to userspace. Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | staging: alarm-dev: information leak in alarm_ioctl()Dan Carpenter2013-06-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Smatch complains that if we pass an invalid clock type then "ts" is never set. We need to check for errors earlier, otherwise we end up passing uninitialized stack data to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | staging: android: sync: fix up a sparse warningGreg Kroah-Hartman2013-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix up a sparse warning about sync_dump that was reported. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Erik Gilling <konkers@android.com> Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Merge 3.10-rc3 into staging-nextGreg Kroah-Hartman2013-05-272-3/+3
|\| | | | | | | | | | | | | | | | | | | | We want the changes here, and we resolve the merge conflict that was happening in the nvec_kbd.c file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | staging: android: logger: use kuid_t instead of uid_tXiong Zhou2013-05-162-3/+3
| |/ | | | | | | | | | | | | Use kuid_t instead of uid_t, to pass the UIDGID_STRICT_TYPE_CHECKS. Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: Fix lines over 80 chars in android sw_syncMarlies Ruck2013-05-201-2/+4
| | | | | | | | | | | | | | | | Fixes the following checkpatch warning: WARNING: Line over 80 characters Signed-off-by: Marlies Ruck <marlies.ruck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: Fixed line over 80 charMarlies Ruck2013-05-131-1/+2
| | | | | | | | | | | | | | | | Fixes the following checkpatch warning: Warning: Line over 80 characters Signed-off-by: Marlies Ruck <marlies.ruck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: Replace seq_printf with seq_putsHema Prathaban2013-05-121-8/+8
| | | | | | | | | | | | | | | | Fixes the following checkpatch warning: WARNING: Prefer seq_puts to seq_printf Signed-off-by: Hema Prathaban <hemaklnce@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: Remove unnecessary bracesHema Prathaban2013-05-121-2/+2
|/ | | | | | | | Fixes the following checkpatch warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Hema Prathaban <hemaklnce@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds2013-05-091-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull removal of GENERIC_GPIO from Grant Likely: "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it is possible to do so which has been causing confusion and breakage. This branch does the work to completely eliminate GENERIC_GPIO." * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux: gpio: update gpio Chinese documentation Remove GENERIC_GPIO config option Convert selectors of GENERIC_GPIO to GPIOLIB blackfin: force use of gpiolib m68k: coldfire: use gpiolib mips: pnx833x: remove requirement for GENERIC_GPIO openrisc: default GENERIC_GPIO to false avr32: default GENERIC_GPIO to false xtensa: remove explicit selection of GENERIC_GPIO sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB powerpc: remove redundant GENERIC_GPIO selection unicore32: default GENERIC_GPIO to false unicore32: remove unneeded select GENERIC_GPIO arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB arm: remove redundant GENERIC_GPIO selection mips: alchemy: require gpiolib mips: txx9: change GENERIC_GPIO to GPIOLIB mips: loongson: use GPIO driver on CONFIG_GPIOLIB mips: remove redundant GENERIC_GPIO select
| * Convert selectors of GENERIC_GPIO to GPIOLIBAlexandre Courbot2013-04-161-1/+1
| | | | | | | | | | | | | | | | | | GENERIC_GPIO is now equivalent to GPIOLIB and features that depended on GENERIC_GPIO can now depend on GPIOLIB to allow removal of this option. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca>
* | aio: don't include aio.h in sched.hKent Overstreet2013-05-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster kernel compiles by way of fewer unnecessary includes. [akpm@linux-foundation.org: fix fallout] [akpm@linux-foundation.org: fix build] Signed-off-by: Kent Overstreet <koverstreet@google.com> Cc: Zach Brown <zab@redhat.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jens Axboe <axboe@kernel.dk> Cc: Asai Thambi S P <asamymuthupa@micron.com> Cc: Selvan Mani <smani@micron.com> Cc: Sam Bradshaw <sbradshaw@micron.com> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Benjamin LaHaise <bcrl@kvack.org> Reviewed-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | staging: android: binder: replace IOCTL types with user-exportable typesSerban Constantinescu2013-04-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | This patch modifies the IOCTL macros to use user-exportable data types, as they are the referred kernel types for the user/kernel interface. The patch does not change in any way the functionality of the binder driver. Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com> Acked-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Add compat_ioctl handlers to sync driversDmitry Pervushin2013-03-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sync drivers are missing compat_ioctl handlers, so this patch adds them. The same change has been submitted to AOSP: https://android-review.googlesource.com/#/c/54901/ Change-Id: If1a1ecc3952b321c8d64c6a8b050104859efc4b1 Cc: Erik Gilling <konkers@android.com> Cc: Dmitry Pervushin <dmitry.pervushin@linaro.org> Cc: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Dmitry Pervushin <dmitry.pervushin@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: lowmemorykiller: well-marked debug printDmitry Voytik2013-03-251-1/+3
| | | | | | | | | | | | | | | | | | Add "lowmemorykiller:" prefix to the debug print so it's easier to analyse LMK's debug output: dmesg | grep lowmemorykiller Signed-off-by: Dmitry Voytik <dvv.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers: android: binder: Use __func__ in debug messagesMirsal Ennaime2013-03-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | Debug messages sent in binder_deferred_release begin with "binder_release:" which is a bit misleading as binder_release is not directly part of the call stack. Use __func__ instead for debug messages in binder_deferred_release. Signed-off-by: Mirsal Ennaime <mirsal@mirsal.fr> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers: android: binder: Remove excessive indentationMirsal Ennaime2013-03-251-10/+12
| | | | | | | | | | | | | | | | | | Remove one level of indentation from the binder proc page release code by using slightly different control semantics. Signed-off-by: Mirsal Ennaime <mirsal@mirsal.fr> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers: android: binder: Fix code style in binder_deferred_releaseMirsal Ennaime2013-03-251-10/+22
| | | | | | | | | | | | | | | | | | | | * Use tabs where applicable * Remove a few "80-columns" checkpatch warnings * Separate code paths with empty lines for readability Signed-off-by: Mirsal Ennaime <mirsal@mirsal.fr> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers: android: binder: Move the node release code to a separate functionMirsal Ennaime2013-03-251-30/+46
| | | | | | | | | | | | | | | | | | | | | | | | The binder_deferred_release() function has many levels of indentation which makes it difficult to read. This patch moves the code which deals with disposing of a binder node to a separate binder_node_release() function, thus removing one level of indentation and allowing the code to fit in 80 columns. Signed-off-by: Mirsal Ennaime <mirsal@mirsal.fr> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: remove dependency on TINY_SHMEMPaul Bolle2013-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | The Kconfig entry for the "Anonymous Shared Memory Subsystem" got added in v3.3. It has an optional dependency on TINY_SHMEM. But TINY_SHMEM had already been removed in v2.6.29. So this optional dependency can safely be removed too. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: fix return value check in sync_fence_alloc()Wei Yongjun2013-03-111-1/+1
| | | | | | | | | | | | | | | | | | In case of error, the function anon_inode_getfile() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sw_sync: sw_sync_timeline_ops can be staticChanglong Xie2013-03-111-8/+8
| | | | | | | | | | | | | | Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Changlong Xie <changlongx.xie@intel.com> Acked-by: Erik Gilling <konkers@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: ashmem: Add support for 32bit ashmem calls in a 64bit kernelSerban Constantinescu2013-03-062-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android's shared memory subsystem, Ashmem, does not support calls from a 32bit userspace in a 64 bit kernel. This patch adds support for syscalls coming from a 32bit userspace in a 64bit kernel. The patch has been successfully tested on ARMv8 AEM(64bit platform model) and Versatile Express A9(32bit platform). v2: Fix missing compat.h include. Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com> Acked-by: Arve Hjønnevåg <arve@android.com> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: logger: enforce GID and CAP check on log flushCharndeep Grewal2013-03-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | Restrict log flushing to those in the logs group, or anyone with CAP_SYSLOG. Cc: Android Kernel Team <kernel-team@android.com> Cc: Charndeep Grewal <csgrewa@tycho.ncsc.mil> Signed-off-by: Charndeep Grewal <csgrewa@tycho.ncsc.mil> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: logger: Allow a UID to read it's own log entriesNick Kralevich2013-03-052-29/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the kernel logger to record the UID associated with the log entries. Always allow the same UID which generated a log message to read the log message. Allow anyone in the logs group, or anyone with CAP_SYSLOG, to read all log entries. In addition, allow the client to upgrade log formats, so they can get additional information from the kernel. Cc: Android Kernel Team <kernel-team@android.com> Cc: Nick Kralevich <nnk@google.com> Signed-off-by: Nick Kralevich <nnk@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: lowmemorykiller: Change default debug_level to 1Arve Hjønnevåg2013-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The select...to kill messages are not very useful when not debugging the lowmemorykiller itself. After the change to check TIF_MEMDIE instead of using a task notifer this message can also get very noisy. Cc: Android Kernel Team <kernel-team@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: lowmemorykiller: Don't count reserved free memoryArve Hjønnevåg2013-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The amount of reserved memory varies between devices. Subtract it here to reduce the amount of devices specific tuning needed for the minfree values. Cc: Android Kernel Team <kernel-team@android.com> Cc: Arve Hjønnevåg <arve@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: android: ashmem: get_name,set_name not to hold ashmem_mutexShankar Brahadeeswaran2013-03-051-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There exists a path in ashmem driver that could lead to acquistion of mm->mmap_sem, ashmem_mutex in reverse order. This could lead to deadlock in the system. For Example, assume that mmap is called on a ashmem region in the context of a thread say T1. sys_mmap_pgoff (1. acquires mm->mmap_sem) | --> mmap_region | ----> ashmem_mmap (2. acquires asmem_mutex) Now if there is a context switch after 1 and before 2, and if another thread T2 (that shares the mm struct) invokes an ioctl say ASHMEM_GET_NAME, this can lead to the following path ashmem_ioctl | -->get_name (3. acquires ashmem_mutex) | ---> copy_to_user (4. acquires the mm->mmap_sem) Note that the copy_to_user could lead to a valid fault if no physical page is allocated yet for the user address passed. Now T1 has mmap_sem and is waiting for ashmem_mutex. and T2 has the ashmem_mutex and is waiting for mmap_sem Thus leading to deadlock. Solution: Do not call copy_to_user or copy_from_user while holding the ahsmem_mutex. Instead copy this to a local buffer that lives in the stack while holding this lock. This will maintain data integrity as well never reverse the lock order. Testing: Created a unit test case to reproduce the problem. Used the same to test this fix on kernel version 3.4.0 Ported the same patch to 3.8 Signed-off-by: Shankar Brahadeeswaran <shankoo77@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Fix timeout = 0 wait behaviorJamie Gennis2013-03-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix wait behavior on timeout == 0 case Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Jamie Gennis <jgennis@google.com> [jstultz: Added commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Don't log wait timeouts when timeout = 0Erik Gilling2013-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the timeout is zero, don't trip the timeout debugging Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Added commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Fix race condition between merge and signalØrjan Eide2013-03-041-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The copied sync_pt was activated immediately. If the sync_pt was signaled before the entire merge was completed, the new fence's pt_list could be iterated over while it is still in the process of being created. Moving the the sync_pt_activate call for all new sync_pts to after both the sync_fence_copy_pts and the sync_fence_merge_pts calls ensure that the pt_list is complete and immutable before it can be reached from the timeline's active list. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Add tracepoint supportErik Gilling2013-03-042-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for tracepoints Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Whitespace changes, add commit message, move to staging] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sw_sync: Convert to use new value_str debug opsErik Gilling2013-03-041-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch from print_obj/print_pt to the new timeline_value_str and pt_value_str ops. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Add commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Refactor sync debug printingErik Gilling2013-03-042-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move driver callbacks to fill strings instead of using seq_files. This will allow those values to be used in a future tracepoint patch. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Use proper barriers when waiting indefinitelyErik Gilling2013-03-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix only addressed waiting with a timeout. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Update new fence status with sync_fence_signal_ptErik Gilling2013-03-041-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a fence's pt is signaled before sync_fence_create is called, the fence will never transition into the signaled state. This also address a tiny race if a merged fence's pt after sync_fence_get_status checks it's status and before fence->status is updated. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Protect unlocked access to fence statusErik Gilling2013-03-041-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fence status is checked outside of locks in both sync_fence_wait and sync_fence_poll. This patch adds propper barrier protection in these cases to avoid seeing stale status. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Dump sync state on fence errorsErik Gilling2013-03-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we get a bad status, dump sync state Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Added commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Improve timeout dump messagesErik Gilling2013-03-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the output of the timeout dumps, including the fence pointer. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Added commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Dump sync state to console on timeoutErik Gilling2013-03-041-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we hit a timeout, dump sync state to console Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Add commit message, whitespace fixups] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: sync: Change wait timeout to mirror poll semanticsErik Gilling2013-03-042-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change wait timeout to act like poll Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Added commit message, squished typo-fix] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>