aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-17Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidlsk-android-13.12Mark Brown
2013-12-17Merge remote-tracking branch 'lsk/v3.10/topic/misc' into linux-linaro-lsklsk-13.12Mark Brown
2013-12-17arm64: pgtable: Include <asm/types.h>v3.10/topic/miscMark Brown
arch/arm64/include/asm/pgtable-3level-types.h uses Linux-specific types but doesn't include the header defining them causing build failures if it's not pulled in by some other header first. Fix that by adding the required include. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-17Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidMark Brown
2013-12-17Merge remote-tracking branch 'lsk/v3.10/topic/configs' into linux-linaro-lskMark Brown
2013-12-17configs: vexpress64: Update to 8 CPUsMark Brown
For the 4x4 fast model. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-16Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidMark Brown
2013-12-16Merge remote-tracking branch 'lsk/v3.10/topic/arm64-fvp' into linux-linaro-lskMark Brown
2013-12-16arm64: dts: Add properties required for CLCD enumerationv3.10/topic/arm64-fvpMark Brown
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-13Merge remote-tracking branch 'lsk/v3.10/topic/aosp-warnings' into ↵Mark Brown
linux-linaro-lsk-android
2013-12-13Merge remote-tracking branch 'lsk/v3.10/topic/aosp' into ↵Mark Brown
linux-linaro-lsk-android Conflicts: drivers/staging/android/ion/ion_chunk_heap.c kernel/printk.c
2013-12-13Merge branch 'android-3.10' of ↵v3.10/topic/aospMark Brown
https://android.googlesource.com/kernel/common into lsk-v3.10-aosp
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-13Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidlsk-android-vexpress-13.12Mark Brown
2013-12-13Merge remote-tracking branch 'lsk/v3.10/topic/arm64-hmp' into linux-linaro-lsklsk-vexpress-13.12Mark Brown
2013-12-13arm64: Enable HMP for ARMv8v3.10/topic/arm64-hmpMark Hambleton
Signed-off-by: Mark Hambleton <mahamble@broadcom.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-13Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidMark Brown
2013-12-13Merge remote-tracking branch 'lsk/v3.10/topic/arm64-cpu' into linux-linaro-lskMark Brown
2013-12-13ARM64: DT: define ARM64 specific arch_match_cpu_phys_idv3.10/topic/arm64-cpuSudeep KarkadaNagesha
OF/DT core library provides architecture specific hook to match the logical cpu index with the corresponding physical identifier. On ARM64, the MPIDR_EL1 contains specific bitfields(MPIDR_EL1.Aff{3..0}) which uniquely identify a CPU, in addition to some non-identifying information and reserved bits. The ARM cpu binding defines the 'reg' property to only contain the affinity bits, and any cpu nodes with other bits set in their 'reg' entry are skipped. This patch overrides the weak definition of arch_match_cpu_phys_id with ARM64 specific version using MPIDR_EL1.Aff{3..0} as cpu physical identifiers. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> (cherry picked from commit 6e15d0e04bfeaa5662a289ee915273307326e45a)
2013-12-13Merge remote-tracking branch 'lsk/v3.10/topic/arm64-topology' into ↵Mark Brown
linux-linaro-lsk
2013-12-13arm64: Add scheduler multicore and SMT Kconfig optionsMark Brown
Enable additional use of additional scheduler features with the topology information. Reported-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-12ion: Improve ION config descriptionJohn Stultz
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>
2013-12-12ion: Cleanup whitespace issues and other checkpatch problemsJohn Stultz
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>
2013-12-13android: configs: Reorder config fragments, update READMEJP Abgrall
Change-Id: I5ee4b794dcc00f74f26562e49a406ea292af63ee (cherry picked from commit 9ebedefd06142c9bc812bfa23401031525002a76)
2013-12-12ion: fix bugs in cma heapColin Cross
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>
2013-12-12ion: add alignment check to chunk heapColin Cross
Change-Id: I4be12b9545a81f9b46339a905f00e1e64896b3ed Signed-off-by: Colin Cross <ccross@android.com>
2013-12-12ion: add helper to zero contiguous region of pagesColin Cross
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>
2013-12-12ion: carveout heap: zero buffers on free, fix memory leakColin Cross
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>
2013-12-12ion: fix sparse warningsColin Cross
Fix sparse warnings in ion. Change-Id: Icbadf2ca53bea20914f608f619568629c178eae3 Signed-off-by: Colin Cross <ccross@android.com>
2013-12-12ion: use alloc_pages in system contig heapColin Cross
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>
2013-12-12ion: allow cached mappings of chunk and system heap buffersColin Cross
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>
2013-12-12ion: remove ion_heap_alloc_pagesColin Cross
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>
2013-12-12ion: use vm_insert_pfn for faulted pagesColin Cross
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>
2013-12-12ion: check return value from remap_pfn_rangeColin Cross
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>
2013-12-12ion: free low memory from page pools firstColin Cross
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>
2013-12-12ion: optimize ion_heap_buffer_zeroColin Cross
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>
2013-12-12ion: add alignment check to carveout heapColin Cross
Change-Id: I25c752b3eacb48cccea5be2df319634b3affd331 Signed-off-by: Colin Cross <ccross@android.com>
2013-12-12ion: drop dependency on ARMColin Cross
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>
2013-12-12ion: Fix two small issues in system_heap allocationJohn Stultz
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>
2013-12-12gpu: ion: fix use-after-free in ion_heap_freelist_drainMitchel Humpherys
The `buffer' variable is being used after being freed. Fix this. Change-Id: Iea3471fa7dc7535bbf0620c1639fea2008d7cf19 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-12-12ion: clean up ioctlsColin Cross
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>
2013-12-12gpu: ion: remove unnecessary function from system heapColin Cross
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>
2013-12-12ion: fix printk warningsColin Cross
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>
2013-12-12ion: don't use phys_to_page or __phys_to_pfnColin Cross
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>
2013-12-12ion: don't use __arm_ioremap to map pagesColin Cross
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>
2013-12-12ion: update idr to avoid deprecated apisColin Cross
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>
2013-12-12ion: add test device for unit tests to interact with dma_bufsColin Cross
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>
2013-12-12Merge remote-tracking branch 'lsk/v3.10/topic/arm64-fvp' into linux-linaro-lskMark Brown
2013-12-12video: amba-clcd: Make CLCD driver available on more platformsMark Brown
The CLCD driver is used on ARM reference models for ARMv8 so add ARM64 to the list of dependencies. The driver also has no build time dependencies on ARM (stubs are provided for ARM-specific DMA functions in the code) so make it available with COMPILE_TEST in order to maximise build coverage. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-12Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidMark Brown