firefly-linux-kernel-4.4.55.git
10 years agoMerge branch 'linaro-fixes/android-3.10' into linaro-android-3.10-lsk
John Stultz [Fri, 13 Dec 2013 02:52:48 +0000 (18:52 -0800)]
Merge branch 'linaro-fixes/android-3.10' into linaro-android-3.10-lsk

10 years agoMerge branch 'upstream/android-3.10' into linaro-fixes/android-3.10
John Stultz [Fri, 13 Dec 2013 02:52:34 +0000 (18:52 -0800)]
Merge branch 'upstream/android-3.10' into linaro-fixes/android-3.10

10 years agoion: Improve ION config description
John Stultz [Fri, 8 Nov 2013 03:58:41 +0000 (19:58 -0800)]
ion: Improve ION config description

Mostly just to quiet checkpatch warnings, be more verbose
in describing the ION config option.

Change-Id: I194235f1a68623dca15ae6e658fc99d00943a827
Signed-off-by: John Stultz <john.stultz@linaro.org>
10 years agoion: Cleanup whitespace issues and other checkpatch problems
John Stultz [Fri, 8 Nov 2013 03:51:09 +0000 (19:51 -0800)]
ion: Cleanup whitespace issues and other checkpatch problems

Just some simple cleanups to address whitespace issues and
other issues found w/ checkpatch.

Change-Id: I181444505627894b8f3bbf59192703b0f65736ee
Signed-off-by: John Stultz <john.stultz@linaro.org>
10 years agoandroid: configs: Reorder config fragments, update README
JP Abgrall [Fri, 22 Nov 2013 22:07:03 +0000 (14:07 -0800)]
android: configs: Reorder config fragments, update README

Change-Id: I5ee4b794dcc00f74f26562e49a406ea292af63ee
(cherry picked from commit 9ebedefd06142c9bc812bfa23401031525002a76)

10 years agoMerge branch 'linaro-fixes/android-3.10' into linaro-android-3.10-lsk
John Stultz [Fri, 13 Dec 2013 00:32:07 +0000 (16:32 -0800)]
Merge branch 'linaro-fixes/android-3.10' into linaro-android-3.10-lsk

10 years agoMerge branch 'upstream/android-3.10' into linaro-fixes/android-3.10
John Stultz [Fri, 13 Dec 2013 00:31:19 +0000 (16:31 -0800)]
Merge branch 'upstream/android-3.10' into linaro-fixes/android-3.10

Pull in updates from AOSP, mostly focused on ION

Signed-off-by: John Stultz <john.stultz@linaro.org>
10 years agoion: fix bugs in cma heap
Colin Cross [Wed, 27 Nov 2013 23:53:21 +0000 (15:53 -0800)]
ion: fix bugs in cma heap

Implement ion_cma_unmap_kernel, ion will call it unconditionally.
Use correct gfp flags when calling dma_alloc_coherent so it doesn't
try to use atomic DMA memory.
Check for invalid alignment when allocating.
Reject cached allocations - the cpu address returned by
dma_alloc_coherent is always going to be an uncached mapping, so
map_kernel will not see data written by a cached userspace mapping.

Change-Id: I2ea03f28fae3749f6de0b89700b69da3845926ea
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: add alignment check to chunk heap
Colin Cross [Wed, 27 Nov 2013 23:53:01 +0000 (15:53 -0800)]
ion: add alignment check to chunk heap

Change-Id: I4be12b9545a81f9b46339a905f00e1e64896b3ed
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: add helper to zero contiguous region of pages
Colin Cross [Wed, 27 Nov 2013 23:51:02 +0000 (15:51 -0800)]
ion: add helper to zero contiguous region of pages

Add ion_heap_pages_zero for ion heaps to use to zero pages
during initialization or allocation, when a struct ion_buffer
may not be available.  Use it from the chunk heap and carveout
heaps.

Change-Id: Ic6c921943a8820cf9896da5164f2d9794d0fe91f
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: carveout heap: zero buffers on free, fix memory leak
Colin Cross [Wed, 27 Nov 2013 05:36:54 +0000 (21:36 -0800)]
ion: carveout heap: zero buffers on free, fix memory leak

The carveout heap wasn't zeroing its buffers after use.
Create the sg_table during allocate instead of map_dma, to allow
using the sg_table during free, and call ion_heap_buffer_zero
during free.  Also fixes a missing kfree when destroying the
table.

Change-Id: I318a8493cce32580250884cae336dd2e2c28e73b
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: fix sparse warnings
Colin Cross [Wed, 27 Nov 2013 05:25:47 +0000 (21:25 -0800)]
ion: fix sparse warnings

Fix sparse warnings in ion.

Change-Id: Icbadf2ca53bea20914f608f619568629c178eae3
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: use alloc_pages in system contig heap
Colin Cross [Tue, 26 Nov 2013 23:35:29 +0000 (15:35 -0800)]
ion: use alloc_pages in system contig heap

There is no reason to use kzalloc, just call alloc_pages directly.
Change the GFP from GFP_KERNEL to include __GFP_HIGH, to allow it
to return contiguous pages from highmem.  virt_to_* functions
aren't valid on highmem pages, so store the struct page * in an
sg_table in buffer->priv_virt like most other heaps, and replace
virt_to_* with page_to_*.

Change-Id: Ida78888b101f080883716e1fa5038dfc4dbabd16
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: allow cached mappings of chunk and system heap buffers
Colin Cross [Tue, 26 Nov 2013 23:33:33 +0000 (15:33 -0800)]
ion: allow cached mappings of chunk and system heap buffers

Now that ion_vm_fault uses vm_insert_pfn instead of vm_insert_page
cached buffers can be supported in any heap.  Remove the checks
in the chunk and system heaps.

Change-Id: I371a44c400ed8a342c3b0eed90d0fb7060537697
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: remove ion_heap_alloc_pages
Colin Cross [Tue, 26 Nov 2013 23:25:59 +0000 (15:25 -0800)]
ion: remove ion_heap_alloc_pages

Now that ion_vm_fault doesn't need a struct page with a nonzero
refcount, there is no need allocate heap memory for cached pages using
split_page.  Remove the ion_heap_alloc_pages and ion_heap_free_pages
helpers in favor of direct calls to alloc_pages and __free_pages,
and remove the special handling in the system heap.

Change-Id: I5966a798f48df2d56642e662a69c1495944f6509
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: use vm_insert_pfn for faulted pages
Colin Cross [Tue, 26 Nov 2013 23:05:46 +0000 (15:05 -0800)]
ion: use vm_insert_pfn for faulted pages

Most ion userspace mappings are created with remap_pfn_range.  Use
vm_insert_pfn instead of vm_insert_page to make faulted cached
mappings look more like uncached mappings.

Change-Id: I9ec5cad3fef54f3b80be8b306d7ff2f1fe3f0e66
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: check return value from remap_pfn_range
Colin Cross [Tue, 26 Nov 2013 23:34:50 +0000 (15:34 -0800)]
ion: check return value from remap_pfn_range

Check the return value of remap_pfn_range and return an error if
it fails.

Change-Id: I206cf95a24607ebe1c80274e3ed15cc7c076d007
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: free low memory from page pools first
Colin Cross [Fri, 22 Nov 2013 02:56:37 +0000 (18:56 -0800)]
ion: free low memory from page pools first

When the shrinkers are called with GFP_HIGH free low memory first,
it is more important to have free than high memory.

Change-Id: I7ad8a9c133830f04d429c3d87b781b3e862ccedb
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: optimize ion_heap_buffer_zero
Colin Cross [Mon, 25 Nov 2013 21:32:51 +0000 (13:32 -0800)]
ion: optimize ion_heap_buffer_zero

ion_heap_buffer_zero can spend a long time in unmap_kernel_range
if it has to broadcast a tlb flush to every cpu for every page.
Modify it to batch pages into a larger region to clear using a
single mapping.  This may cause the mapping size to change if
the buffer size is not a multiple of the mapping size, so
switch to allocating the address space for each chunk.  This
allows us to use vm_map_ram to handle the allocation and mapping
together.

The number of pages to zero using a single mapping is set to 32
to hit the fastpath in vm_map_ram.

Change-Id: I1accfe67b285cbc9e95e387bea4246864197827d
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: add alignment check to carveout heap
Colin Cross [Tue, 26 Nov 2013 21:43:29 +0000 (13:43 -0800)]
ion: add alignment check to carveout heap

Change-Id: I25c752b3eacb48cccea5be2df319634b3affd331
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: drop dependency on ARM
Colin Cross [Sat, 23 Nov 2013 06:48:42 +0000 (22:48 -0800)]
ion: drop dependency on ARM

Ion will compile and run on other platforms now, remove the
dependency on ARM.

Change-Id: I9da0ab686708bdab575a021031392b4402cce090
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: Fix two small issues in system_heap allocation
John Stultz [Fri, 22 Nov 2013 23:36:27 +0000 (15:36 -0800)]
ion: Fix two small issues in system_heap allocation

In testing ion system heap allocations, I ran across two issues:

1) Not k*z*allocing the sg table. This can cause trouble if
we end up trying call sg_alloc_table() with too many entries,
then sg_alloc_table() internally fails and tries to free what it
thinks is internal table structure, which causes bad pointer
traversals.

2) The second list_for_each_entry probably should be _safe,
since I was seeing  strange lock warnings and oopses on occasion.
This seems to resolve it, but could use some extra checking.

Change-Id: I59d4c90104a8cf23dc4ae814d0b17348f1b68ac0
Signed-off-by: John Stultz <john.stultz@linaro.org>
10 years agogpu: ion: fix use-after-free in ion_heap_freelist_drain
Mitchel Humpherys [Tue, 6 Aug 2013 18:19:42 +0000 (11:19 -0700)]
gpu: ion: fix use-after-free in ion_heap_freelist_drain

The `buffer' variable is being used after being freed. Fix this.

Change-Id: Iea3471fa7dc7535bbf0620c1639fea2008d7cf19
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
10 years agoion: clean up ioctls
Colin Cross [Sat, 9 Nov 2013 00:55:35 +0000 (16:55 -0800)]
ion: clean up ioctls

Convert the ion ioctls to use _IOW instead of _IOWR where
appropriate, and factor out the copy_from_user and copy_to_user
based on the _IOC_DIR bits.  For the existing incorrect ioctls,
add a function to wrap _IOC_DIR to return the corrected value.

Change-Id: I3cc34c84b9c52305bdbec27a9224447b102fadcd
Signed-off-by: Colin Cross <ccross@android.com>
10 years agogpu: ion: remove unnecessary function from system heap
Colin Cross [Thu, 7 Nov 2013 20:18:57 +0000 (12:18 -0800)]
gpu: ion: remove unnecessary function from system heap

ion_system_contig_heap buffers have an sglist, just call
ion_heap_map_user to map it.

Change-Id: I6dea383955834613fa8833659b31533c957c2b0b
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: fix printk warnings
Colin Cross [Thu, 19 Sep 2013 14:20:23 +0000 (09:20 -0500)]
ion: fix printk warnings

Use %z for size_t and %pa for dma_addr_t to avoid warnings in printks.

Change-Id: I2c72874acd0b69cb35fca691928783817deb9394
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: don't use phys_to_page or __phys_to_pfn
Colin Cross [Thu, 19 Sep 2013 15:13:53 +0000 (10:13 -0500)]
ion: don't use phys_to_page or __phys_to_pfn

phys_to_page and __phys_to_pfn don't exist on all platforms.
Use a combination of pfn_to_page, PFN_DOWN, page_to_pfn, and
virt_to_page to get the same results.

Change-Id: I53cef26059800bc8b7fb85ae458741574c97c257
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: don't use __arm_ioremap to map pages
Colin Cross [Thu, 19 Sep 2013 15:12:05 +0000 (10:12 -0500)]
ion: don't use __arm_ioremap to map pages

ion_heap_map_kernel already implements mapping a scatterlist of
pages into the kernel, and all heaps are required to have struct
pages associated with them, so delete the functions that use
__arm_ioremap and use ion_heap_map_kernel instead.

Change-Id: Ia2dfd8d8c6e719d7d2f68dd4c458826fdb938260
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: update idr to avoid deprecated apis
Colin Cross [Thu, 19 Sep 2013 19:54:56 +0000 (14:54 -0500)]
ion: update idr to avoid deprecated apis

Use idr_alloc instead if idr_pre_get/idr_get_new_above, and
remove idr_remove_all.

Change-Id: I675b789879549bd3767ed3ef2016cf108eb622d2
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: add test device for unit tests to interact with dma_bufs
Colin Cross [Sat, 9 Nov 2013 00:32:47 +0000 (16:32 -0800)]
ion: add test device for unit tests to interact with dma_bufs

Add a /dev/ion-test device that will be created if CONFIG_ION_TEST
is set.  The device accepts a dma_buf fd and allows reading and
writing to the backing memory using DMA-like apis or kernel mapping
apis.  Can be used to test the dma_buf mapping ops, including
the ion implementations, from userspace.

Change-Id: I30703ba69cd75bdfe7767ac642e5f0cacd8d0478
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: check invalid values in ion_system_heap
Colin Cross [Wed, 13 Nov 2013 22:46:06 +0000 (14:46 -0800)]
ion: check invalid values in ion_system_heap

ion_system_heap can only satisfy page alignment, and
ion_system_contig_heap can only satisify alignment to the
allocation size.  Neither can support faulting user mappings
because they use slab pages.

Change-Id: I895c2d4184c672f647f83a17aeb862985dc92f2c
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoARM: fiq_glue: Add custom fiq return handler api.
Arve Hjønnevåg [Tue, 25 Jun 2013 01:02:05 +0000 (18:02 -0700)]
ARM: fiq_glue: Add custom fiq return handler api.

Change-Id: I5ff2764e85151ca0a88576542fda07c2d33dd065
Signed-off-by: Arve Hjønnevåg <arve@android.com>
10 years agonetfilter: xt_qtaguid: fix memory leak in seq_file handlers
Greg Hackmann [Thu, 5 Dec 2013 01:39:27 +0000 (17:39 -0800)]
netfilter: xt_qtaguid: fix memory leak in seq_file handlers

Change-Id: I15b21230d52479d008a00d9e2191dda020f00925
Signed-off-by: Greg Hackmann <ghackmann@google.com>
10 years agoepoll: drop EPOLLWAKEUP if PM_SLEEP is disabled
Amit Pundir [Fri, 15 Nov 2013 07:26:31 +0000 (12:56 +0530)]
epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled

Drop EPOLLWAKEUP from epoll events mask if CONFIG_PM_SLEEP is disabled.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
10 years agoMerge branch 'upstream/android-3.10' into linaro-fixes/android-3.10
John Stultz [Mon, 25 Nov 2013 18:54:08 +0000 (10:54 -0800)]
Merge branch 'upstream/android-3.10' into linaro-fixes/android-3.10

Update to latest android-3.10 branch.

Minor conflict with the direct printk stuff

Signed-off-by: John Stultz <john.stultz@linaro.org>
10 years agovideo: adf: fix fbdev blank -> dpms state mapping
Greg Hackmann [Fri, 22 Nov 2013 21:50:24 +0000 (13:50 -0800)]
video: adf: fix fbdev blank -> dpms state mapping

Change-Id: I96132a1b7275d389a6d0ba8899c6be838b63c422
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agovideo: adf: validate dpms state passed to blank
Greg Hackmann [Wed, 20 Nov 2013 20:10:35 +0000 (12:10 -0800)]
video: adf: validate dpms state passed to blank

Change-Id: I3a4228d50fc4a2553b3e92e5675a94cbc6e71b8a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agovideo: adf: fix ADF_MAX_ATTACHMENTS declaration
Greg Hackmann [Mon, 11 Nov 2013 22:31:12 +0000 (14:31 -0800)]
video: adf: fix ADF_MAX_ATTACHMENTS declaration

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>
11 years agovideo: adf: remove PAGE_SIZE from userspace-facing header
Greg Hackmann [Wed, 20 Nov 2013 22:02:09 +0000 (14:02 -0800)]
video: adf: remove PAGE_SIZE from userspace-facing header

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>
11 years agovideo: adf: make device node names less hierarchical
Greg Hackmann [Thu, 7 Nov 2013 18:12:00 +0000 (10:12 -0800)]
video: adf: make device node names less hierarchical

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>
11 years agoion: convert sg_dma_len(sg) to sg->length
Colin Cross [Tue, 12 Nov 2013 23:28:08 +0000 (15:28 -0800)]
ion: convert sg_dma_len(sg) to sg->length

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>
11 years agoion: fix dma APIs
Colin Cross [Wed, 18 Sep 2013 17:30:20 +0000 (12:30 -0500)]
ion: fix dma APIs

__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>
11 years agoion: fix crash when alloc len is -1
Colin Cross [Wed, 13 Nov 2013 22:44:53 +0000 (14:44 -0800)]
ion: fix crash when alloc len is -1

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>
11 years agoion: hold reference to handle after ion_uhandle_get
Colin Cross [Wed, 6 Nov 2013 00:51:27 +0000 (16:51 -0800)]
ion: hold reference to handle after ion_uhandle_get

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>
11 years agoion: Fix compat support to use proper compat ioctl numbers
John Stultz [Fri, 15 Nov 2013 00:25:08 +0000 (16:25 -0800)]
ion: Fix compat support to use proper compat ioctl numbers

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>
11 years agoARM: Fix "Make low-level printk work" to use a separate config option
Arve Hjønnevåg [Sat, 15 Jun 2013 02:54:40 +0000 (19:54 -0700)]
ARM: Fix "Make low-level printk work" to use a separate config option

Signed-off-by: Arve Hjønnevåg <arve@android.com>
11 years agoMerge branch 'linaro-fixes/android-3.10' into linaro-android-3.10-lsk
John Stultz [Tue, 12 Nov 2013 22:23:31 +0000 (14:23 -0800)]
Merge branch 'linaro-fixes/android-3.10' into linaro-android-3.10-lsk

11 years agoMerge branch 'upstream/android-3.10' into linaro-fixes/android-3.10
John Stultz [Tue, 12 Nov 2013 22:18:51 +0000 (14:18 -0800)]
Merge branch 'upstream/android-3.10' into linaro-fixes/android-3.10

11 years agoARM: Fix dtb list when DTB_IMAGE_NAMES is empty
Benoit Goby [Fri, 8 Nov 2013 23:24:19 +0000 (15:24 -0800)]
ARM: Fix dtb list when DTB_IMAGE_NAMES is empty

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>
11 years agoanonymous vma names: fix build with !MMU
Colin Cross [Wed, 30 Oct 2013 20:17:34 +0000 (13:17 -0700)]
anonymous vma names: fix build with !MMU

Disable PR_SET_VMA when building with !MMU

Change-Id: I896b6979b99aa61df85caf4c3ec22eb8a8204e64
Signed-off-by: Colin Cross <ccross@android.com>
11 years agomm: fix anon vma naming
Colin Cross [Wed, 30 Oct 2013 20:14:12 +0000 (13:14 -0700)]
mm: fix anon vma naming

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>
11 years agodrivers: staging: android: split uapi out of sync.h and sw_sync.h
Colin Cross [Thu, 7 Nov 2013 21:46:41 +0000 (13:46 -0800)]
drivers: staging: android: split uapi out of sync.h and sw_sync.h

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>
11 years agodrivers: staging: android: split uapi out of binder.h
Colin Cross [Thu, 7 Nov 2013 21:46:41 +0000 (13:46 -0800)]
drivers: staging: android: split uapi out of binder.h

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>
11 years agodrivers: staging: android: split uapi out of ashmem.h
Colin Cross [Thu, 7 Nov 2013 21:46:41 +0000 (13:46 -0800)]
drivers: staging: android: split uapi out of ashmem.h

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>
11 years agodrivers: staging: android: split uapi out of android_alarm.h
Colin Cross [Thu, 7 Nov 2013 21:38:57 +0000 (13:38 -0800)]
drivers: staging: android: split uapi out of android_alarm.h

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>
11 years agonet: move PPPoLAC and PPPoPNS headers to uapi
Colin Cross [Thu, 7 Nov 2013 21:19:34 +0000 (13:19 -0800)]
net: move PPPoLAC and PPPoPNS headers to uapi

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>
11 years agousb: gadget: f_accessory: move userspace interface to uapi
Colin Cross [Thu, 7 Nov 2013 21:08:39 +0000 (13:08 -0800)]
usb: gadget: f_accessory: move userspace interface to uapi

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>
11 years agousb: gadget: f_mtp: move userspace interface to uapi
Colin Cross [Thu, 7 Nov 2013 21:08:15 +0000 (13:08 -0800)]
usb: gadget: f_mtp: move userspace interface to uapi

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>
11 years agoinput: misc: keychord: move header to uapi
Colin Cross [Thu, 7 Nov 2013 20:46:33 +0000 (12:46 -0800)]
input: misc: keychord: move header to uapi

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>
11 years agoion: move userspace api into uapi/ion.h
Colin Cross [Thu, 7 Nov 2013 21:29:12 +0000 (13:29 -0800)]
ion: move userspace api into uapi/ion.h

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>
11 years agoion: move into staging
Colin Cross [Thu, 7 Nov 2013 20:25:56 +0000 (12:25 -0800)]
ion: move into staging

Move ion from drivers/gpu/ion to drivers/android/staging/ion.

Change-Id: Id6e996aa3954cbb8e1a8abc9578a56204f5eb211
Signed-off-by: Colin Cross <ccross@android.com>
11 years agogpu: ion: delete ion_system_mapper.c
Colin Cross [Fri, 30 Aug 2013 00:50:42 +0000 (17:50 -0700)]
gpu: ion: delete ion_system_mapper.c

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>
11 years agoMerge branch 'linaro-fixes/android-3.10' into linaro-android.3.10-lsk
John Stultz [Mon, 4 Nov 2013 22:48:40 +0000 (14:48 -0800)]
Merge branch 'linaro-fixes/android-3.10' into linaro-android.3.10-lsk

Merge "official" android-3.10 branch in w/ older experimental/android-3.10
to update lsk targetted branch to the official branch w/o any rebase trouble.

Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agoMerge branch 'upstream/android-3.10' into linaro-fixes/android-3.10
John Stultz [Mon, 4 Nov 2013 22:46:43 +0000 (14:46 -0800)]
Merge branch 'upstream/android-3.10' into linaro-fixes/android-3.10

11 years agodrivers: switch: remove S_IWUSR from dev_attr
Qiao Zhou [Thu, 31 Oct 2013 01:36:50 +0000 (09:36 +0800)]
drivers: switch: remove S_IWUSR from dev_attr

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>
11 years agoMerge branch 'android-3.10-adf' into android-3.10
Greg Hackmann [Tue, 29 Oct 2013 19:43:07 +0000 (12:43 -0700)]
Merge branch 'android-3.10-adf' into android-3.10

11 years agoion: add compat_ioctl
Rom Lemarchand [Thu, 24 Oct 2013 12:39:34 +0000 (05:39 -0700)]
ion: add compat_ioctl

Add a compat_ioctl to the ion driver

Change-Id: I43da387e22ff9c4a29f0159dfe9e898efc500553
Signed-off-by: Rom Lemarchand <romlem@google.com>
11 years agoion: change ion_user_handle_t definition to int
Rom Lemarchand [Thu, 24 Oct 2013 02:30:58 +0000 (19:30 -0700)]
ion: change ion_user_handle_t definition to int

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>
11 years agousb: gadget: android: Remove device if probe fails
Benoit Goby [Sat, 19 Oct 2013 00:16:38 +0000 (17:16 -0700)]
usb: gadget: android: Remove device if probe fails

Make sure the android0 device is removed before we can destroy
the class.

Change-Id: Id584888c407beb80a1df4990f73fe31ccb9d4767
Signed-off-by: Benoit Goby <benoit@android.com>
11 years agovideo: adf: expose adf_modeinfo_set_{name,vrefresh} to drivers
Greg Hackmann [Thu, 17 Oct 2013 20:18:53 +0000 (13:18 -0700)]
video: adf: expose adf_modeinfo_set_{name,vrefresh} to drivers

Change-Id: Id9f8b2184927a77b244ce0b33d619d6e44a0f17a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agovideo: adf: set default interface dpms_state to OFF
Greg Hackmann [Wed, 16 Oct 2013 21:53:12 +0000 (14:53 -0700)]
video: adf: set default interface dpms_state to OFF

Interfaces default to unplugged, so they should also default to off

Change-Id: I36500a54b11f354a0d7dd2c9924a79e0d9c6f855
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agovideo: adf: make dpms_state sysfs attribute writable
Greg Hackmann [Thu, 15 Aug 2013 19:51:22 +0000 (12:51 -0700)]
video: adf: make dpms_state sysfs attribute writable

Change-Id: I04e7785cbddac160003e6c9edaf62d20b367fdc9
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agovideo: adf: add helpers for validating custom formats
Greg Hackmann [Tue, 15 Oct 2013 19:51:20 +0000 (12:51 -0700)]
video: adf: add helpers for validating custom formats

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>
11 years agosync: Fix a race condition between release_obj and print_obj
Alistair Strachan [Wed, 10 Apr 2013 23:35:14 +0000 (16:35 -0700)]
sync: Fix a race condition between release_obj and print_obj

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

11 years agoion: add new ion_user_handle_t type for the user-space token
Rom Lemarchand [Wed, 23 Oct 2013 22:09:11 +0000 (15:09 -0700)]
ion: add new ion_user_handle_t type for the user-space token

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)

11 years agousb: gadget: android: Remove device if probe fails
Benoit Goby [Sat, 19 Oct 2013 00:16:38 +0000 (17:16 -0700)]
usb: gadget: android: Remove device if probe fails

Make sure the android0 device is removed before we can destroy
the class.

Change-Id: Id584888c407beb80a1df4990f73fe31ccb9d4767
Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agoconfig: Set CPU_FREQ_GOV_INTERACTIVE default n
John Stultz [Tue, 9 Apr 2013 17:45:09 +0000 (10:45 -0700)]
config: Set CPU_FREQ_GOV_INTERACTIVE default n

The CPU_FREQ_GOV_INTERACTIVE text states:
"If in doubt, say N." however the option defaults to Y.

Make this consistent by defaulting to n.

Change-Id: I9625aa6b083c8ca0a99deb81c1e91b720fc76943
Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agoconfig: Set PARANOID_NETWORK and NET_ACTIVITY_STATS as default ANDROID
John Stultz [Tue, 9 Apr 2013 17:41:49 +0000 (10:41 -0700)]
config: Set PARANOID_NETWORK and NET_ACTIVITY_STATS as default ANDROID

While ANDROID_PARNOID_NETWORK and NET_ACTIVITY_STATS should default
to yes for Android devices, they aren't completely appropriate as
a default y option in non-android enviornments.

Thus set the default to ANDROID.

Change-Id: Ie8b1f32ef82aaa8ac347f40ea8fff44f0ce79a64
Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agoRevert "ARM: Make low-level printk work"
John Stultz [Tue, 21 May 2013 17:00:44 +0000 (10:00 -0700)]
Revert "ARM: Make low-level printk work"

This reverts commit 63d454ab530bb3ab5412aabd6be6ee8cd340888e.

Per Andy's request,

Andy's rational:
    "I don't think that makes any sense any more and should be removed,
    unless there's some case on Android side that really needs it.  Vanilla
    has better DEBUG_LL support now since 2005 when that patch was
    introduced and the Android kernels will inherit it.  I've reverted it in
    my tree since we commonly need DEBUG_LL on (but we don't need printascii
    garbling all our logging as if there was an echo in there).

    ...[It] basically forces all printk output down printascii() which is
    not what we want.

        earlyprintk=1 earlycon=ttyO2,115200n8

    On your commandline will get you going [without this]"

Change-Id: I1da455354b4a8ff3bc9c5f66f5a174b13e179ae6
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agoRevert "ARM: convert build of appended dtb zImage to list of dtbs"
John Stultz [Wed, 8 May 2013 20:50:33 +0000 (13:50 -0700)]
Revert "ARM: convert build of appended dtb zImage to list of dtbs"

This reverts commit 5e9468632ea81e7d17fc9bd4457acbaffda7b370.

Tixy was seeing trouble with "make dtbs" and "make my-boards.dtb",
and found reverting this resolves the issue. So for now lets
revert this.

Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agomm: vmscan: Fix up build warning
Andy Green [Tue, 6 Aug 2013 02:48:32 +0000 (19:48 -0700)]
mm: vmscan: Fix up build warning

There's an unused var warning

/projects/linaro/linux-2.6/mm/vmscan.c: In function ‘debug_shrinker_show’:
/projects/linaro/linux-2.6/mm/vmscan.c:170:8: warning: unused variable ‘name’ [-Wunused-variable]

introduced from this patch from androidization
series -->

commit ad42da0cc73761e405128e71c58eda40c25367d4
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date:   Fri Oct 5 13:54:59 2012 -0700

    mm: vmscan: Add a debug file for shrinkers

this patch cleans it out

Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agoion: Use size_t-specific format
Andy Green [Tue, 6 Aug 2013 02:59:25 +0000 (19:59 -0700)]
ion: Use size_t-specific format

struct ion_platform_heap .size is a size_t, use %zu instead of %lu

Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agostaging: android: binder: Fix build warnings
Andy Green [Tue, 6 Aug 2013 02:50:26 +0000 (19:50 -0700)]
staging: android: binder: Fix build warnings

This commit in mainline (now) causes a couple of warnings

commit 975a1ac9a9fe65d66ee1726c0db6dc58e53d232a
Author: Arve Hjønnevåg <arve@android.com>
Date:   Tue Oct 16 15:29:53 2012 -0700

    Staging: android: binder: Add some tracepoints

This patch fixes them

Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agodcc_tty: Build fixups
John Stultz [Wed, 8 May 2013 23:06:16 +0000 (16:06 -0700)]
dcc_tty: Build fixups

Fix spinlock declaration and tty_insert/flip arguments.

Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agocpufreq: interactive: delete timers for GOV_START
Shridhar Rasal [Mon, 9 Sep 2013 13:47:14 +0000 (19:17 +0530)]
cpufreq: interactive: delete timers for GOV_START

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>
11 years agocpufreq: Interactive: Implement per policy instances of governor
Viresh Kumar [Thu, 16 May 2013 09:28:54 +0000 (14:58 +0530)]
cpufreq: Interactive: Implement per policy instances of governor

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>
11 years agocpufreq: interactive: Move definition of cpufreq_gov_interactive downwards
Viresh Kumar [Thu, 16 May 2013 09:28:53 +0000 (14:58 +0530)]
cpufreq: interactive: Move definition of cpufreq_gov_interactive downwards

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>
11 years agocpufreq: interactive: Remove unnecessary cpu_online() check
Viresh Kumar [Thu, 16 May 2013 09:28:52 +0000 (14:58 +0530)]
cpufreq: interactive: Remove unnecessary cpu_online() check

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>
11 years agosync: signal pt before sync_timeline object gets destroyed
Prakash Kamliya [Fri, 4 Oct 2013 12:20:50 +0000 (17:50 +0530)]
sync: signal pt before sync_timeline object gets destroyed

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>
11 years agovideo: adf: add informational flags to interfaces
Greg Hackmann [Fri, 13 Sep 2013 18:23:05 +0000 (11:23 -0700)]
video: adf: add informational flags to interfaces

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>
11 years agovideo: adf: add fbdev compatibility helper
Greg Hackmann [Tue, 9 Jul 2013 20:07:26 +0000 (13:07 -0700)]
video: adf: add fbdev compatibility helper

Change-Id: I2b82bb625f805e8edb27799743b290dda5befb97
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agovideo: adf: add supported formats to adf_overlay_engine_data
Greg Hackmann [Tue, 11 Jun 2013 19:59:41 +0000 (12:59 -0700)]
video: adf: add supported formats to adf_overlay_engine_data

Change-Id: If2aa783b9ece60160f465bf697508fc58682e1bc
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agovideo: adf: support "simple" buffers
Greg Hackmann [Thu, 10 Oct 2013 20:03:26 +0000 (13:03 -0700)]
video: adf: support "simple" buffers

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>
11 years agovideo: adf: add memblock helper
Greg Hackmann [Mon, 8 Jul 2013 21:18:18 +0000 (14:18 -0700)]
video: adf: add memblock helper

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>
11 years agovideo: add atomic display framework
Greg Hackmann [Wed, 22 May 2013 21:23:10 +0000 (14:23 -0700)]
video: add atomic display framework

Change-Id: I693257e269a99012cd0dbb57576ac222869cf4c7
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agostaging: sw_sync: add stubs for kernels without CONFIG_SW_SYNC
Greg Hackmann [Fri, 11 Oct 2013 20:54:41 +0000 (13:54 -0700)]
staging: sw_sync: add stubs for kernels without CONFIG_SW_SYNC

Change-Id: I7a12679eb3c10b1beaf36c6612cf2e3f6662a034
Signed-off-by: Greg Hackmann <ghackmann@google.com>
11 years agomm: remove compressed copy from zram in-memory
Minchan Kim [Wed, 3 Jul 2013 22:01:24 +0000 (15:01 -0700)]
mm: remove compressed copy from zram in-memory

Swap subsystem does lazy swap slot free with expecting the page would be
swapped out again so we can avoid unnecessary write.

But the problem in in-memory swap(ex, zram) is that it consumes memory
space until vm_swap_full(ie, used half of all of swap device) condition
meet.  It could be bad if we use multiple swap device, small in-memory
swap and big storage swap or in-memory swap alone.

This patch makes swap subsystem free swap slot as soon as swap-read is
completed and make the swapcache page dirty so the page should be
written out the swap device to reclaim it.  It means we never lose it.

I tested this patch with kernel compile workload.

1. before

   compile time : 9882.42
   zram max wasted space by fragmentation: 13471881 byte
   memory space consumed by zram: 174227456 byte
   the number of slot free notify: 206684

2. after

   compile time : 9653.90
   zram max wasted space by fragmentation: 11805932 byte
   memory space consumed by zram: 154001408 byte
   the number of slot free notify: 426972

[akpm@linux-foundation.org: tweak comment text]
[artem.savkov@gmail.com: fix BUG due to non-swapcache pages in end_swap_bio_read()]
[akpm@linux-foundation.org: invert unlikely() test, augment comment, 80-col cleanup]
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Konrad Rzeszutek Wilk <konrad@darnok.org>
Cc: Shaohua Li <shli@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoAdd compat_ioctl support for VFAT_IOCTL_GET_VOLUME_ID
Bintian Wang [Sun, 30 Jun 2013 12:34:24 +0000 (20:34 +0800)]
Add compat_ioctl support for VFAT_IOCTL_GET_VOLUME_ID

Add VFAT_IOCTL_GET_VOLUME_ID to vfat dir compat_ioctl() interface,
which enable you read vfat volume ID from a 32bit app on a 64bit
kernel

Change-Id: I3e93dfcc1e7a364a6b11bc7e3f5f210e82f306ed
Signed-off-by: Bintian Wang <bintian.wang@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
11 years agoMerge branch 'upstream/experimental/android-3.10' into linaro-fixes/experimental...
John Stultz [Mon, 23 Sep 2013 22:23:47 +0000 (15:23 -0700)]
Merge branch 'upstream/experimental/android-3.10' into linaro-fixes/experimental/android-3.10

11 years agoUSB: remove duplicate out endpoint creation in MTP mode
Peter Oh [Thu, 12 Sep 2013 01:42:18 +0000 (01:42 +0000)]
USB: remove duplicate out endpoint creation in MTP mode

Android MTP gadget uses 3 endpoints which are 1 in endpoint,
1 out endpoint, and 1 interrupt endpoint. However when MTP
gadget creates its endpoints, it creates the out endpoint twice
and overwrites the first created out endpoint with the second one,
so that it causes a leak of endpoint resources.

Change-Id: Iba82950095610b26b362f4b10a67cedfb1fee366
Signed-off-by: Peter Oh <poh@broadcom.com>
Reviewed-on: http://mps-gerrit.broadcom.com/37744
Reviewed-by: Graham Williams <gwilli@broadcom.com>
Reviewed-by: John Garry <jgarry@broadcom.com>
Branch-Open: Branch Status <branch_status_noreply@broadcom.com>
Reviewed-by: Checkpatch Status <checkpatch_status_noreply@broadcom.com>
Reviewed-by: Joyjit Nath <joyjit@broadcom.com>
Tested-by: AutoSubmit Status <autosubmit_status_noreply@broadcom.com>