aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-13netfilter: fix function return types for 64bitv3.10/topic/aosp-warningsMark Hambleton
Fix functions to return ssize_t instead of int to match prototypes. Signed-off-by: Mark Hambleton <mahamble@broadcom.com> Reviewed-by: Edwin Chan <echan@broadcom.com> Reviewed-by: James King <jamesk@broadcom.com> Reviewed-by: John Garry <jgarry@broadcom.com> Reviewed-by: Mark Hambleton <mark.hambleton@broadcom.com> Reviewed-by: Joyjit Nath <joyjit@broadcom.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-09Merge branch 'android-3.10' of ↵Mark Brown
https://android.googlesource.com/kernel/common into lsk-v3.10-aosp
2013-12-04netfilter: xt_qtaguid: fix memory leak in seq_file handlersGreg Hackmann
Change-Id: I15b21230d52479d008a00d9e2191dda020f00925 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-11-22video: adf: fix fbdev blank -> dpms state mappingGreg Hackmann
Change-Id: I96132a1b7275d389a6d0ba8899c6be838b63c422 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-11-20video: adf: validate dpms state passed to blankGreg Hackmann
Change-Id: I3a4228d50fc4a2553b3e92e5675a94cbc6e71b8a Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-11-20video: adf: fix ADF_MAX_ATTACHMENTS declarationGreg Hackmann
Userspace-facing ADF_MAX_ATTACHMENTS must be in terms of userspace-facing struct adf_attachment_config Change-Id: Iaaddcd6366f13b3e52eb3911efcfff8a61e0b225 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-11-20video: adf: remove PAGE_SIZE from userspace-facing headerGreg Hackmann
Systems may define PAGE_SIZE in userspace limits.h but don't have to. PAGE_SIZE was picked as an arbitrary "reasonable" limit so just use 4096 instead. Change-Id: I9555e39aba64a3a70f61eb6ded2a4129ab236ce0 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-11-20video: adf: make device node names less hierarchicalGreg Hackmann
adf/foobar/device -> adf0 adf/foobar/interface1 -> adf-interface0.1 adf/foobar/overlay-engine1 -> adf-overlay-engine0.1 Change-Id: I7af7f84ce3f101ecb02f448070c200ff3e03f2ec Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-11-15ion: convert sg_dma_len(sg) to sg->lengthColin Cross
ion is always dealing with the allocation and not the mapping, so it should always be using sg->length and not sg->dma_length. Change-Id: Id9b07f1196b2bafe04636fa1aa46dfc84d003cf0 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-15ion: fix dma APIsColin Cross
__dma_page_cpu_to_dev is a private ARM api that is not available on 3.10 and was never available on other architectures. We can get the same behavior by calling dma_sync_sg_for_device with a scatterlist containing a single page. It's still not quite a kosher use of the dma apis, we still conflate physical addresses with bus addresses, but it should at least compile on all platforms, and work on any platform that doesn't have a physical to bus address translation. Change-Id: I8451c2dae4bf85841015c016640684ac28430a5a Signed-off-by: Colin Cross <ccross@android.com>
2013-11-15ion: fix crash when alloc len is -1Colin Cross
If userspace passes a length between -4095 and -1 to allocate it will pass the len != 0 check, but when len is page aligned it will be 0. Check len after page aligning. Drop the warning as well, userspace shouldn't be able to trigger a warning in the kernel. Change-Id: I96c7142637638991f3a9af9be7cfbb50f79f3803 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-15ion: hold reference to handle after ion_uhandle_getColin Cross
commit 1262ab1846cf76f7549c66ef709120dbfbe6d49f (ion: replace userspace handle cookies with idr) broke the locking in ion. The ION_IOC_FREE and ION_IOC_MAP ioctls were relying on ion_handle_validate to detect the case where a call raced with another ION_IOC_FREE which may have freed the struct ion_handle. Rename ion_uhandle_get to ion_handle_get_by_id, and have it take the client lock and return with an extra reference to the handle. Make each caller put its reference once it is done with the handle. Also modify users of ion_handle_validate to continue to hold the client lock after calling ion_handle_validate until they are done with the handle, and warn if ion_handle_validate is called without the client lock held. Change-Id: I56da5624fca3bed4ee24806b6ec39de903543341 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-14ion: Fix compat support to use proper compat ioctl numbersJohn Stultz
The compat support added to ion didn't provide compat ioctl numbers (who's value depends on the compat structure size). So 32bit applications would get an error when trying to make ioctl calls. This patch adds the needed COMPAT_ macros and uses them in the compat_ion_ioctl, translating them to their non-compat cmd when calling the normal ioctl call. Change-Id: I53636d4ec46d8dc5e694697aaf2d62b98bd78cb1 Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-13ARM: Fix "Make low-level printk work" to use a separate config optionArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-11-08ARM: Fix dtb list when DTB_IMAGE_NAMES is emptyBenoit Goby
In the 3.10 kernel, dtb-y is not defined in Makefile.boot anymore but in dts/Makefile, so it needs to be included too. Change-Id: I6d6fccf933709bcb6220ce8f12b4b9e2a7c40d63 Signed-off-by: Benoit Goby <benoit@android.com>
2013-11-07anonymous vma names: fix build with !MMUColin Cross
Disable PR_SET_VMA when building with !MMU Change-Id: I896b6979b99aa61df85caf4c3ec22eb8a8204e64 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07mm: fix anon vma namingColin Cross
Fix two bugs caused by merging anon vma_naming, a typo in mempolicy.c and a bad merge in sys.c. Change-Id: Ia4ced447d50573e68195e95ea2f2b4d9456b8a90 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07drivers: staging: android: split uapi out of sync.h and sw_sync.hColin Cross
Move the userspace interfaces of sync.h and sw_sync.h to drivers/staging/android/uapi/ Change-Id: I3b2598b37385bb993bd03f5faa98a8e196befe45 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07drivers: staging: android: split uapi out of binder.hColin Cross
Move the userspace interface of binder.h to drivers/staging/android/uapi/binder.h. Change-Id: I2e56ba89ade5e1f33b121e6ecd456392d588a14e Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07drivers: staging: android: split uapi out of ashmem.hColin Cross
Move the userspace interface of ashmem.h to drivers/staging/android/uapi/ashmem.h Change-Id: I60f5baa4ce8e2425262a406f2733c089ec55aa72 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07drivers: staging: android: split uapi out of android_alarm.hColin Cross
Move the userspace interface of android_alarm.h to drivers/staging/android/uapi/android_alarm.h Change-Id: Ieb96e8e9bf742786efc4e248e6a242dab8199ca3 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07net: move PPPoLAC and PPPoPNS headers to uapiColin Cross
Move the entire contents of the linux/if_pppolac.h and linux/if_pppopns.h headers to uapi, they only contain userspace interfaces. Change-Id: I3cfed7f2ae400b53269a1f59144aa3dbc30ae0b5 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07usb: gadget: f_accessory: move userspace interface to uapiColin Cross
Move the entire contents of linux/usb/f_accessory.h header to uapi, it only contains a userspace interface. Change-Id: Ieb5547da449588ae554988a201c0e6b4e3afc531 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07usb: gadget: f_mtp: move userspace interface to uapiColin Cross
Move the most of linux/usb/f_mtp.h header to uapi. Move the only remaining structure definition into f_mtp.c, the only place that uses it. Change-Id: I952c1a9dc15c36bf295a0eb4d74b6b1ad912ed03 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07input: misc: keychord: move header to uapiColin Cross
Move the entire contents of linux/keychord.h header to uapi, it only contains a userspace interface. Change-Id: If94f83328b19efb58c66391dce3bd8e927788d8d Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07ion: move userspace api into uapi/ion.hColin Cross
Split the userspace api out of drivers/staging/android/ion/ion.h into drivers/staging/android/uapi/ion.h Change-Id: I51baa4a7c86bf99c493e28a15f8664a489fd5a2d Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07ion: move into stagingColin Cross
Move ion from drivers/gpu/ion to drivers/android/staging/ion. Change-Id: Id6e996aa3954cbb8e1a8abc9578a56204f5eb211 Signed-off-by: Colin Cross <ccross@android.com>
2013-11-07gpu: ion: delete ion_system_mapper.cColin Cross
The mapper abstraction layer was removed before the initial ion commit, but a stray ion_system_mapper.c file was left in. Delete it. Change-Id: I0001d1ea1b866ebd7ec1306e94472c67a094855f Signed-off-by: Colin Cross <ccross@android.com>
2013-10-31drivers: switch: remove S_IWUSR from dev_attrQiao Zhou
it doesn't need S_IWUSR attribute since xxx_store API is un-needed. otherwise the WARN check in device_create_file will alert. Change-Id: I6360bf022dcd659bfb3f41c84624f954d5d15ea5 Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
2013-10-29Merge branch 'android-3.10-adf' into android-3.10Greg Hackmann
2013-10-24ion: add compat_ioctlRom Lemarchand
Add a compat_ioctl to the ion driver Change-Id: I43da387e22ff9c4a29f0159dfe9e898efc500553 Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-10-24ion: change ion_user_handle_t definition to intRom Lemarchand
Turn ion_user_handle_t to int. This change reflects the underlying type returned by the ion driver. Change-Id: I40390dae8138327769510525bf62e55877a4b37d Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-10-24usb: gadget: android: Remove device if probe failsBenoit Goby
Make sure the android0 device is removed before we can destroy the class. Change-Id: Id584888c407beb80a1df4990f73fe31ccb9d4767 Signed-off-by: Benoit Goby <benoit@android.com>
2013-10-24video: adf: expose adf_modeinfo_set_{name,vrefresh} to driversGreg Hackmann
Change-Id: Id9f8b2184927a77b244ce0b33d619d6e44a0f17a Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24video: adf: set default interface dpms_state to OFFGreg Hackmann
Interfaces default to unplugged, so they should also default to off Change-Id: I36500a54b11f354a0d7dd2c9924a79e0d9c6f855 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24video: adf: make dpms_state sysfs attribute writableGreg Hackmann
Change-Id: I04e7785cbddac160003e6c9edaf62d20b367fdc9 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24video: adf: add helpers for validating custom formatsGreg Hackmann
Many custom formats look a lot like the standard ones, but with different subsampling, bpp, etc. Expose and document adf_buffer_validate()'s main body, so drivers can reuse its logic when validating these formats. Change-Id: I1d06981c9e5aab26f3ab2956c08c679f2c823bcc Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-24sync: Fix a race condition between release_obj and print_objAlistair Strachan
Before this change, a timeline would only be removed from the timeline list *after* the sync driver had its release_obj() called. However, the driver's release_obj() may free resources needed by print_obj(). Although the timeline list is locked when print_obj() is called, it is not locked when release_obj() is called. If one CPU was in print_obj() when another was in release_obj(), the print_obj() may make unsafe accesses. It is not actually necessary to hold the timeline list lock when calling release_obj() if the call is made after the timeline is unlinked from the list, since there is no possibility another thread could be in -- or enter -- print_obj() for that timeline. This change moves the release_obj() call to after the timeline is unlinked, preventing the above race from occurring. Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com> (cherry picked from commit 3bfc1e9e0c7d0c0e3f52ee1f3803482416afa295) Change-Id: Ib2b2b23fde5be34016f9d86b8b9c5e561b56cd4c
2013-10-24ion: add new ion_user_handle_t type for the user-space tokenRom Lemarchand
Declare new ion_user_handle_t type to contain the token returned to user-space. This allows a 2-step migration of the user-space code to a new kernel header first, then will allow us to change the definition of the ion_user_handle_type_t to int without breaking the API. Change-Id: I4200b6600df8e56fe98cf1580a13a65cb25ec646 Signed-off-by: Rom Lemarchand <romlem@google.com> (cherry picked from commit ebb8269bbb05b06ecedca3e21b3e65f23d48eadd)
2013-10-16cpufreq: interactive: delete timers for GOV_STARTShridhar Rasal
Make sure that timers cpu_timer and cpu_slack_timer deactivated before addition of new. Change-Id: If31c4049606871df6f00efdc24b1d713c86a6f69 Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
2013-10-15cpufreq: Interactive: Implement per policy instances of governorViresh Kumar
If we have a multi-package system, where we have multiple instances of struct policy (per package), currently we can't have multiple instances of same governor. i.e. We can't have multiple instances of Interactive governor for multiple packages. This is a bottleneck for multicluster system, where we want different packages to use Interactive governor, but with different tunables. This patch uses the infrastructure provided by earlier patches pushed in Mainline in v3.10-rc1/rc2 and implements per policy instances of Interactive governor. Change-Id: I70436d4a5a45c6cb6edf37f3e46d0b9fbc930982 [toddpoynor@google.com: merge with later code, minor changes] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-10-15cpufreq: interactive: Move definition of cpufreq_gov_interactive downwardsViresh Kumar
This moves definition of cpufreq_gov_interactive towards the bottom of file, so that we don't have to add prototype of cpufreq_governor_interactive() in the beginning of file. Change-Id: I04bd1004954eb36502c5cd7e35d3d7274cddaf95 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-10-15cpufreq: interactive: Remove unnecessary cpu_online() checkViresh Kumar
Cpufreq no longer calls governor callback for offlined cpus. i.e. All policy->cpus are guaranteed to be online. Hence we don't need explicit check to see if cpu is online or not. Change-Id: I9ad85ea4addd5b4a40952e59ed730dd15e328690 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-10-13sync: signal pt before sync_timeline object gets destroyedPrakash Kamliya
There is a race condition Assume we have *one* sync_fence object, with *one* sync_pt which belongs to *one* sync_timeline, given this condition, sync_timeline->kref will have two counts, one for sync_timeline (implicit) and another for sync_pt. Assume following is the situation on CPU Theead-1 : (Thread which calls sync_timeline_destroy()) -> (some function calls) -> sync_timeline_destory() -> sync_timeline_signal() (CPU is inside this function after putting reference to sync_timeline) At this time Thread-2 comes and does following Thread-2 : (fclose on fence fd) > sync_fence_release() -> because of fclose() on fence object -> sync_fence_free() -> sync_pt_free() -> kref_put(&pt->parent->kref, sync_timeline_free); -> sync_timeline_free() (CPU is inside this because this time kref will be zero after _put) Thread-2 will free sync_timeline object before Thread-1 has finished its work inside sync_timeline_signal. With this change we signals all sync_pt before putting reference to sync_timeline object. Change-Id: Ic680e4d0bbef1c46bcb7cfba693395645241d203 Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
2013-10-11video: adf: add informational flags to interfacesGreg Hackmann
Informational flags don't affect ADF directly but may be useful to clients. Currently used to indicate primary and external displays. Change-Id: I343c7f0148da0869244c8e818350e9855525df85 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: add fbdev compatibility helperGreg Hackmann
Change-Id: I2b82bb625f805e8edb27799743b290dda5befb97 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: add supported formats to adf_overlay_engine_dataGreg Hackmann
Change-Id: If2aa783b9ece60160f465bf697508fc58682e1bc Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: support "simple" buffersGreg Hackmann
Simple buffers are linear RGB buffers analogous to KMS's dumb buffers. Simple buffers can be allocated and posted to a display interface without any driver-private data. Internally, ADF drivers provide the driver-private data needed (if any) to post a simple buffer to the display. Change-Id: Ib0b737622eaf343111310f6623f99d69cf3807d2 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: adf: add memblock helperGreg Hackmann
Provides a dma-buf exporter for memblocks, mainly useful for ADF devices to wrap their bootloader logos Change-Id: I936a9b5df099ab6084d433fcaf50f3bc29f93289 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-10-11video: add atomic display frameworkGreg Hackmann
Change-Id: I693257e269a99012cd0dbb57576ac222869cf4c7 Signed-off-by: Greg Hackmann <ghackmann@google.com>