summaryrefslogtreecommitdiff
path: root/include (follow)
Commit message (Collapse)AuthorAge
...
* | | | msm: Return -ENOSYS when secure buffer apis are not implementedNeeti Desai2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value -EINVAL is returned in the case of invalid arguments, and is not the correct value when the function is not implemented. Return -ENOSYS instead. Change-Id: I196537f121d5a290fec74e2b7bcb1cfd490468c7 Signed-off-by: Neeti Desai <neetid@codeaurora.org> [pdaly@codeaurora.org Resolve minor conflicts] Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
* | | | iommu: add ftrace profiling for map and unmapLiam Mark2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ftrace start and end logging for map, iommu_map_sg and unmap in order to facilitate performance testing. Change-Id: I9ddf241ffa6cf519f6abece7b0820640f5ce1975 Signed-off-by: Liam Mark <lmark@codeaurora.org>
* | | | iommu: Add support for .dma_supported() opsNeeti Desai2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .dma_supported() checks to see if the device can support DMA to the memory described by the mask. Add support for this operation in the iommu layer Change-Id: Icf37b9540aa68c2be3fd603a48402d6fcccd8208 Signed-off-by: Neeti Desai <neetid@codeaurora.org> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | iommu/arm-smmu: Add support for map/unmap to be atomicNeeti Desai2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain clients need map and unmap operations to be in the atomic context. This currently doesn't work since we need to prepare clocks and enable regulators (for tlb invalidation), and take a mutex (to protect the smmu_domain->smmu instance), which are all sleeping operations. Fix this by introducing a domain attribute to indicate that map and unmap should be atomic. When this domain attribute is set we assume: (1) clocks are already prepared (2) regulators are already on (3) the domain is attached to an SMMU (1) and (2) allow us to skip preparing clocks and enabling regulators during map and unmap and are taken care of internally in the driver. (3) is a contract with clients that allows us to skip taking the mutex that protects smmu_domain->smmu since we assume that the SMMU instance is valid and will not be going away. If clients break this contract then there are race conditions all over the place that will eventually result in a NULL dereference (specifically, of smmu_domain->smmu). Change-Id: I3e21df02f7b0cd116fb558715eea16f2119f1d03 Signed-off-by: Neeti Desai <neetid@codeaurora.org> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | iommu: export iommu_pgsizeMitchel Humpherys2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be useful in IOMMU drivers. Export it. Change-Id: I4c423d256312250f1e33ca8d64dfe1626f008b5e Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXECAntonios Motakis2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support the XN flag pages will always be executable. Change-Id: Ic6b1f0ae8873035dcb798e9c996396fb2bc4921e Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Acked-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Will Deacon <will.deacon@arm.com> Git-commit: a720b41c41f5a7e4c51558cf087882c57331581f Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git [mitchelh: context fixups] Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | Revert "iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC"Mitchel Humpherys2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 433a4b6a37c8f96295a7e80cb603c2318872c1f2. An equivalent patch is being brought in with the upcoming page table refactoring, so rip this guy out in preparation. This also reverts commit af3e3c36d08077856640b28d68c9f99d2188a000, which introduced users of the IOMMU_NOEXEC flag. Change-Id: Ibb36f60f2148170d8a01632043bf36b5f8c60777 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org> [pdaly@codeaurora.org Resolve minor conflicts] Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
* | | | soc: qcom: hvc: add hypervisor call supportPratik Patel2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add API support for calling into the hypervisor. This will allow various drivers to avail hypervisor services. Change-Id: I0a0e8f8fe13a550ad20c5421b712e207933c82f3 Signed-off-by: Pratik Patel <pratikp@codeaurora.org> [pdaly@codeaurora.org Resolve minor conflicts] Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
* | | | iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXECNeeti Desai2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support the XN flag pages will always be executable. Change-Id: Ib785acd8a188fa95aea9991116139a392862764e Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Acked-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Will Deacon <will.deacon@arm.com> Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Git-commit: a720b41c41f5a7e4c51558cf087882c57331581f [rvaswani@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
* | | | Introduce the IOMMU_DEVICE flag.Varun Sethi2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used for indicating device memory type for a DMA transaction. IOMMU driver would set up attributes indicationg access to device memory. CRs-Fixed: 792402 Change-Id: Ifd6f2288353ef737ff4c15d9bd1514c66af8fdd2 Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> [neetid: changed IOMMU_DEVICE to be on bit 5 instead of bit 4] Patch-mainline: iommu @ 10/06/14, 10:28 Signed-off-by: Neeti Desai <neetid@codeaurora.org>
* | | | iommu/arm-smmu: Add support for page table donationNeeti Desai2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For secure domains, the page tables need to be assigned to the correct VMIDs. Add support for the same. Change-Id: Ic46e61300463d969b35ebc5d4d20cfc30a4ba476 Signed-off-by: Neeti Desai <neetid@codeaurora.org>
* | | | arm64: Enable dma_mmap_nonconsistentLaura Abbott2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the non-consistent behavior is fully integrated into the dma mapping subsystem, allow user space to mmap nonconsistent dma buffers. Change-Id: I1b95ba9a1751e00a5812d9df582af20f316fcafe Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Conflicts: arch/arm64/include/asm/dma-mapping.h
* | | | iommu: Add DOMAIN_ATTR_PT_BASE_ADDR domain attributeMitchel Humpherys2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This attribute can be used to get the base address of the page tables for the given domain. This can be useful for some drivers that switch page tables around out-of-band (for example, per-process page tables managed by the GPU). Change-Id: I7c67c4c6435e5aadba129a53be532c2396dccf9c Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | iommu: add IOMMU_PRIV attributeMitchel Humpherys2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Change-Id: If8576c09898bd7953475ab72e178d3288a763b0c Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | soc: qcom: add library for SMMU TZ interfaceMitchel Humpherys2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some targets require calling into TZ for various bits of SMMU configuration. Add a library to provide a clean interface for such configuration. Change-Id: I1dc5cd21d4a09e321039d69cc760eaf6f356c6cf Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org> [pdaly@codeaurora.org Resolve minor conflicts] Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
* | | | iommu: Add iommu_map_sg() functionOlav Haugan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mapping and unmapping are more often than not in the critical path. map_sg allows IOMMU driver implementations to optimize the process of mapping buffers into the IOMMU page tables. Instead of mapping a buffer one page at a time and requiring potentially expensive TLB operations for each page, this function allows the driver to map all pages in one go and defer TLB maintenance until after all pages have been mapped. Additionally, the mapping operation would be faster in general since clients does not have to keep calling map API over and over again for each physically contiguous chunk of memory that needs to be mapped to a virtually contiguous region. Change-Id: I1f3dd2c3cf67b3db40ee1793580d6af5fec1247d Signed-off-by: Olav Haugan <ohaugan@codeaurora.org> Signed-off-by: Joerg Roedel <jroedel@suse.de> Git-commit: 315786ebbf4ad6552b6fd8e0e7b2ea220fcbfdbd Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git [mitchelh: fix existing callers and implementations of iommu_{map,unmap}_range to match the new function names and APIs, maintaining stubs for the old API so that out-of-tree modules can continue to compile] Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | iommu/arm-smmu: add .domain_{set,get}_attr for coherent walk controlMitchel Humpherys2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under certain conditions coherent hardware translation table walks can result in degraded performance. Add a new domain attribute to disable/enable this feature in generic code along with the domain attribute setter and getter to handle it in the ARM SMMU driver. Change-Id: Ic9812d5047af19093ec2db8246a7f0f9ccb626ab Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | | arm64: dma-mapping: make dma_ops constMitchel Humpherys2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dma_ops should be const since they shouldn't be changing after being defined (there's even a checkpatch warning for this). Convert existing dma_ops to const. Change-Id: Ic27ba9a0832b12cae43cd45c72f053335845fd8f Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org> Conflicts: arch/arm64/include/asm/dma-mapping.h arch/arm64/mm/dma-mapping.c
* | | | iommu: Sync files for kernel upgradePatrick Daly2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset the following files: arm-smmu.c iommu.c include/linux/iommu.h include/trace/events/iommu.h to the git merge base between 3.18 and 4.4: b2776bf7149bddd1f4161f14f79520f17fc1d71d Change-Id: I9aa58e08125e3a72d1e9742e26d4a6fab34b0ed5 Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
* | | | input: don't send dummy release event when system resumesKun Liang2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dummy release event is sent when system resumes. This behavior makes long press detection failed for some keys like POWER key and HEADSET key. Add INPUT_PROP_NO_DUMMY_RELEASE to make it is possible for some input to avoid this behavior. Need add set_bit(INPUT_PROP_NO_DUMMY_RELEASE,inputdevice->propbit) in specific drivers that don't want the DUMMY release event. Change-Id: I30ba5045273aca9a4613b7f6dcdcf7a7173b5c27 Signed-off-by: Kun Liang <kunliang@codeaurora.org> [joshc: Renumbered flag due to conflict, adapted to upstream input_reset_device() changes upstream.] Signed-off-by: Josh Cartwright <joshc@codeaurora.org> [abhimany: Renumbered flag due to conflict] Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
* | | | thermal: qpnp-adc-tm: Enable VADC_TMSiddartha Mohanadoss2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit dbdb6776f (Merge "msm: camera: Add dummy sub module in sensor pipeline") Fixup compilation to support int type for temperature value as part of thermal ops API upgrade. Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
* | | | dma-mapping: Exclude remap functions when arch does not use DMANaveen Ramaraj2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 'a106f65b("dma-mapping: Add dma_remap functions")' is defined remap functions for ARM arch only, so it will break other architecture compilation. So remap functions are excluded, if arch is not using DMA. Change-Id: Id39fcbac74f30a0ab1b3ce0c780460017ea189e5 Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org> Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org> Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
* | | | slimbus: Add snapshot of slimbus driverGirish Mahadevan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add snapshot of slimbus driver from msm-3.18 branch. Baseline: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 Change-Id: I82f8f91596d2c3e9ef111e26c80298d990f6c193 Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
* | | | tty: serial: msm_hs: Add snapshot of msm_hs uart driversGirish Mahadevan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Snapshot of msm_hs uart driver from msm-3.18. Baseline: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 Change-Id: I977d80142c2cf8df89810f1c38d523d53371cc46 Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
* | | | i2c: Add snapshot of i2c-msm-v2 driverGirish Mahadevan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a snapshot of the i2c-msm-v2 driver from kernel-3.18. Kernel-3.18 baseline: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 Change-Id: I392a1761ecc324c4a229caf112b1dc4c32a3b9bf Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
* | | | spi: Add snapshot of SPI QSD driverGirish Mahadevan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a snapshot of SPI QSD driver from the 3.18 branch. kernel-3.18 baseline: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 Change-Id: I6e2a4be429a2681603a12e5ecb6853582cd3ffbe Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
* | | | thermal: tsens: Enable TSENSSiddartha Mohanadoss2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit dbdb6776f (Merge "msm: camera: Add dummy sub module in sensor pipeline") Commit 0b46b8a7 (clocksource: arch_timer: Fix code to use physical timers when requested) introduces the use of physical counters and requires clients to use api arch_counter_get_cntvct(). Accordingly update tsens_poll() to the new API to prevent a BUG_ON() during bootup. Fixup TSENS to use supported int type for temperature value. Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
* | | | qcom-charger: batterydata-lib: fix compilation issueNicholas Troast2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | batterydata-lib.h limits function declarations to certain CONFIGs and provides stub function definitions for everyone else. Remove the function defintions and provide function declarations to everyone. Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
* | | | hwmon: Enable EPM driverSiddartha Mohanadoss2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit dbdb6776f (Merge "msm: camera: Add dummy sub module in sensor pipeline") Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
* | | | qseecom: add snapshot of qseecom driverZhen Kong2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of kernel.lnx.3.18-151201.) Signed-off-by: Zhen Kong <zkong@codeaurora.org>
* | | | ARM64: smp: implement arch_trigger_all_cpus_backtrace using IPIRohit Vaswani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ARM64 doesn't have an NMI, send an IPI to all other CPUs (current cpu prints the stack directly) to capture a backtrace. Change-Id: Ib90494123205b3bbaa0b244ccde6c7e40a560199 Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org> [satyap: trivial merge conflict resolution & compilation fixes] Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
* | | | UBSAN: run-time undefined behavior sanity checkerAndrey Ryabinin2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBSAN uses compile-time instrumentation to catch undefined behavior (UB). Compiler inserts code that perform certain kinds of checks before operations that could cause UB. If check fails (i.e. UB detected) __ubsan_handle_* function called to print error message. So the most of the work is done by compiler. This patch just implements ubsan handlers printing errors. GCC has this capability since 4.9.x [1] (see -fsanitize=undefined option and its suboptions). However GCC 5.x has more checkers implemented [2]. Article [3] has a bit more details about UBSAN in the GCC. [1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html [2] - https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html [3] - http://developerblog.redhat.com/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/ Issues which UBSAN has found thus far are: Found bugs: * out-of-bounds access - 97840cb67ff5 ("netfilter: nfnetlink: fix insufficient validation in nfnetlink_bind") undefined shifts: * d48458d4a768 ("jbd2: use a better hash function for the revoke table") * 10632008b9e1 ("clockevents: Prevent shift out of bounds") * 'x << -1' shift in ext4 - http://lkml.kernel.org/r/<5444EF21.8020501@samsung.com> * undefined rol32(0) - http://lkml.kernel.org/r/<1449198241-20654-1-git-send-email-sasha.levin@oracle.com> * undefined dirty_ratelimit calculation - http://lkml.kernel.org/r/<566594E2.3050306@odin.com> * undefined roundown_pow_of_two(0) - http://lkml.kernel.org/r/<1449156616-11474-1-git-send-email-sasha.levin@oracle.com> * [WONTFIX] undefined shift in __bpf_prog_run - http://lkml.kernel.org/r/<CACT4Y+ZxoR3UjLgcNdUm4fECLMx2VdtfrENMtRRCdgHB2n0bJA@mail.gmail.com> WONTFIX here because it should be fixed in bpf program, not in kernel. signed overflows: * 32a8df4e0b33f ("sched: Fix odd values in effective_load() calculations") * mul overflow in ntp - http://lkml.kernel.org/r/<1449175608-1146-1-git-send-email-sasha.levin@oracle.com> * incorrect conversion into rtc_time in rtc_time64_to_tm() - http://lkml.kernel.org/r/<1449187944-11730-1-git-send-email-sasha.levin@oracle.com> * unvalidated timespec in io_getevents() - http://lkml.kernel.org/r/<CACT4Y+bBxVYLQ6LtOKrKtnLthqLHcw-BMp3aqP3mjdAvr9FULQ@mail.gmail.com> * [NOTABUG] signed overflow in ktime_add_safe() - http://lkml.kernel.org/r/<CACT4Y+aJ4muRnWxsUe1CMnA6P8nooO33kwG-c8YZg=0Xc8rJqw@mail.gmail.com> [akpm@linux-foundation.org: fix unused local warning] [akpm@linux-foundation.org: fix __int128 build woes] Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Michal Marek <mmarek@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Yury Gribov <y.gribov@samsung.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kostya Serebryany <kcc@google.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/ Git-commit: c6d308534aef6c99904bf5862066360ae067abc4 [tsoni@codeaurora.org: trivial merge conflict resolution] CRs-Fixed: 969533 Change-Id: I048b9936b1120e0d375b7932c59de78d8ef8f411 Signed-off-by: Trilok Soni <tsoni@codeaurora.org> [satyap@codeaurora.org: trivial merge conflict resolution] Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
* | | | net/ipv6/addrconf: IPv6 tethering enhancementTianyi Gou2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new procfs flag to toggle the automatic addition of prefix routes on a per device basis. The new flag is accept_ra_prefix_route. Defaults to 1 as to not break existing behavior. CRs-Fixed: 435320 Change-Id: If25493890c7531c27f5b2c4855afebbbbf5d072a Acked-by: Harout S. Hedeshian <harouth@qti.qualcomm.com> Signed-off-by: Tianyi Gou <tgou@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | netfilter: xtables: hardidletimer target implementationBhavya Sokke Mallikarjunappa2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a hardidletimer Xtables target that can be used to identify when interfaces have been idle for a certain period of time. Timers are identified by labels and are created when a rule is set with a new label. The rules also take a timeout value (in seconds) as an option. If more than one rule uses the same timer label, the timer will be restarted whenever any of the rules get a hit. One entry for each timer is created in sysfs. This attribute contains the timer remaining for the timer to expire. The attributes are located under the xt_idletimer class: /sys/class/xt_hardidletimer/timers/<label> When the timer expires, the target module sends a sysfs notification to the userspace, which can then decide what to do (eg. disconnect to save power) Compared to xt_IDLETIMER, xt_HARDIDLETIMER can send notifications when CPU is in suspend too, to notify the timer expiry Change-Id: I1723d44e02df864d63da7550766ea7d763076de2 Signed-off-by: Bhavya Sokke Mallikarjunappa <bsokke@codeaurora.org>
* | | | net: add a per-cpu counter for the number of frames coalesced in GROHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A low cost method of determining GRO statistics is required. This change introduces a new counter which tracks whenever GRO coalesces ingress packets. The counter is per-CPU and exposed in /proc/net/softnet_stat as the last column of data. No user space impact is expected as a result of this change. However, this change should be reverted if legacy tools have problems with the new column in softnet_stat. Change-Id: I05965c0cb150947935d5977884cc4d583b37131d Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: Fail explicit bind to local reserved portsSubash Abhinov Kasiviswanathan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reserved ports may have some special use cases which are not suitable for use by general userspace applications. Currently, ports specified in ip_local_reserved_ports will not be returned only in case of automatic port assignment. Add a boolean sysctl flag 'reserved_port_bind'. Default value is 1 which preserves the existing behavior. Setting the value to 0 will prevent userspace applications from binding to these ports even when they are explicitly requested. BUG=20663075 Change-Id: Ib1071ca5bd437cd3c4f71b56147e4858f3b9ebec Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: sockev: Initial CommitHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added module which subscribes to socket notifier events. Notifier events are then converted to a multicast netlink message for user space applications to consume. CRs-Fixed: 626021 Change-Id: Id5c6808d972b69f5f065d7fba9094e75c6ad0b2c Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: socket: Added notifier chains for socket administrative functionsHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows other areas in the kernel to register notifier callbacks which get invoked whenever something performs an administrative action on a socket. This patch adds hooks in socket(), bind(), listen(), accept(), shutdown(). CRs-Fixed: 626021 Change-Id: I4ae99cb2206d7c4eddba69757335c18d10143045 Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: core: add MAP support to RPS flow dissectorHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More efficiently utilize multiple cores when using MAP encoded frames. RPS flow dissector now appropriately decodes IPv4 and IPv6 frames with MAP headers prepended. CRs-Fixed: 681280 Change-Id: Ia4dde47fcc0f3436dcaa71a5160c0a59fe7ed53a Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | Revert "net, lib: kill arch_fast_hash library bits"Rohit Vaswani2016-03-22
| | | | | | | | | | | | | | | | This reverts commit 0cb6c969ed9de43687abdfc63714b6fe4385d2fc.
* | | | msm: pcie: add SMMU support to calculate SID for PCIe EPTony Truong2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SMMU requires PCIe to provide a SID for each of its endpoint so that the endpoint can successful transaction on the bus. This change adds the support for PCIe bus driver to calculate a SID for its endpoint and give it to the SMMU driver. Change-Id: I52099bbfed0a38c75b0277b0f58f45f6e6559695 Signed-off-by: Tony Truong <truong@codeaurora.org>
* | | | msm: pcie: add PCIe bus driver snapshotTony Truong2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PCIe bus driver snapshot is taken as of msm-3.10 commit: 803998b (Merge "ASoC: wcd: don't set autozeroing for conga") This change adds the PCIe bus driver and its dependecies from msm-3.10 to msm-3.14. All the files are as is from msm-3.10. No additional changes were made. Change-Id: Ia1a2d0eea0cc87c16357c95bfcc4df72e910cd34 Signed-off-by: Tony Truong <truong@codeaurora.org>
* | | | rtc: alarm: Add power-on alarm featureMao Jinlong2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android does not support powering-up the phone through alarm. Set rtc alarm in timerfd to power-up the phone after alarm expiration. Change-Id: I781389c658fb00ba7f0ce089d706c10f202a7dc6 Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>
* | | | Snapshot: SSC Sensor driverSatya Durga Srinivasu Prabhala2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit 95a59da3cf (msm: hdcp: proper state sanitization for different versions) Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
* | | | soc: qcom: Add snapshot of System Health MonitorKarthikeyan Ramasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of kernel.lnx.3.18-151201.) Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
* | | | soc: qcom: rq_stats: add snapshot of run queue stats driverMatt Wagantall2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a snapshot of the run queue stats driver as of msm-3.10 commit 4bf320bd ("Merge "ASoC: msm8952: set async flag for 8952 dailink"") Resolve checkpatch warnings in the process, notably the replacement of sscanf with kstrtouint. Change-Id: I7e2f98223677e6477df114ffe770c0740ed37de9 Signed-off-by: Matt Wagantall <mattw@codeaurora.org> Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
* | | | platform: msm: Add snapshot of the SPS/BAM driverYan He2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the MSM SPS (Smart Peripheral Switch) driver. SPS may be used as a DMA engine to move data in either Peripheral-to- Peripheral (a.k.a. BAM-to-BAM) mode or Peripheral-to-Memory (a.k.a BAM-System) mode. This snapshot is taken as of msm-3.18 commit 132e1315c1 Change-Id: I7ec9781c3b608b9ee0fffdf7ba3e1b33bfa4dfcd Signed-off-by: Yan He <yanhe@codeaurora.org>
* | | | soc: qcom: Snapshot of thermal/LMH driversMahesh Sivasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit e70ad0c (Promotion of kernel.lnx.3.18-151201.) Include necessary thermal_core changes to convert long to int inline with upstream kernel changes. Change-Id: I642b666518fe72385794b743989a0f5e5120ec03 Conflicts: drivers/thermal/Makefile
* | | | kobject: increase number of kobject uevent pointers to 64Subbaraman Narayanamurthy2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Power supply framework uses uevents to notify the power supply change events to the userspace. Some power supplies have their properties increasing thus overflowing the number of kobject uevent pointers, triggering warning shown below. [ 10.577545] WARNING: CPU: 3 PID: 406 at kernel/lib/kobject_uevent.c:393 add_uevent_var+0xc0/0x100() [ 10.589680] add_uevent_var: too many keys [ 10.593809] Modules linked in: [ 10.596686] CPU: 3 PID: 406 Comm: kworker/3:2 Tainted: G W 3.18.20-g5e99605-00057-gd18285f #603 [ 10.606373] Hardware name: Qualcomm Technologies, Inc. MSM 8996 v3 + PMI8996 MTP (DT) [ 10.614188] Workqueue: events power_supply_changed_work [ 10.619366] Call trace: [ 10.621803] [<ffffffc00008881c>] dump_backtrace+0x0/0x130 [ 10.627175] [<ffffffc00008895c>] show_stack+0x10/0x1c [ 10.632237] [<ffffffc000cc4d00>] dump_stack+0x74/0xb8 [ 10.637253] [<ffffffc0000a0fec>] warn_slowpath_common+0x90/0xb8 [ 10.643170] [<ffffffc0000a1060>] warn_slowpath_fmt+0x4c/0x58 [ 10.648814] [<ffffffc00031121c>] add_uevent_var+0xbc/0x100 [ 10.654259] [<ffffffc0003116f8>] kobject_uevent_env+0x498/0x5a8 [ 10.660185] [<ffffffc000311814>] kobject_uevent+0xc/0x18 [ 10.665457] [<ffffffc0007fd3c0>] power_supply_changed_work+0xb0/0xf0 [ 10.671830] [<ffffffc0000b617c>] process_one_work+0x23c/0x3f4 [ 10.677529] [<ffffffc0000b7338>] worker_thread+0x280/0x3a8 [ 10.683017] [<ffffffc0000bb384>] kthread+0xe0/0xec Fix this warning by increasing the number of kobject uevent pointers from 32 to 64. CRs-Fixed: 971954 Change-Id: Ide942d25006abd36ba7be945be397a535e91d970 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
* | | | thermal-core: Add separate threads for sysfs notifyShiju Mathew2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add separate threads for sysfs notify. This is required so that any thermal trip is not blocked while handling sysfs notify. Change-Id: Ifee206c29fd1b3c226a342b7f048250d5062397e Signed-off-by: Shiju Mathew <shijum@codeaurora.org> [imaund@codeaurora.org: Resolved context conflicts and updated a call of INIT_COMPLETION to reinit_completion] Signed-off-by: Ian Maund <imaund@codeaurora.org>