Commit graph

601899 commits

Author SHA1 Message Date
Linux Build Service Account
7454980b83 Merge "platform: msm: resolve NULL pointer dereference issue" 2018-08-20 08:15:52 -07:00
Linux Build Service Account
207be80505 Merge "msm: adsprpc: DSP device node to provide restricted access to ADSP/SLPI" 2018-08-20 00:38:29 -07:00
Linux Build Service Account
15288f73bd Merge "drm: msm: update dsi state context when splash is on" 2018-08-17 07:09:09 -07:00
Ankit Jain
57bafa4361 ARM: dts: msm: set qcom,guard-memory property for rmtfs on sdm660
This is needed to address the XPU limitation, so that the
shared memory is not contiguous with other memory allocations
that may happen from other clients in the system.

Change-Id: Ibc9961245f32ecc63892007a3d12b7956cf63e67
Signed-off-by: Ankit Jain <jankit@codeaurora.org>
2018-08-16 18:49:14 -07:00
Sahitya Tummala
7b270ed198 uio: msm_sharedmem: add guard page around shared memory
If guard_memory dtsi property is set, then the shared memory
region will be guarded by SZ_4K at the start and at the end.
This is needed to overcome the XPU limitation on few MSM HW,
so as to make this memory not contiguous with other allocations
that may possibly happen from other clients in the system.

Change-Id: I57637619cea8fe7f0f7254624e07177ea4a4fce0
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2018-08-16 08:00:12 -07:00
Yao Jiang
ac44aac0b2 platform: msm: resolve NULL pointer dereference issue
Fix some null pointer dereference flaw and parameter not init issues.

change-Id: I0ed5f3f62c3794775bf97d353c4e50dd8ceb32da
Signed-off-by: Yao Jiang <yaojia@codeaurora.org>
2018-08-16 11:45:37 +08:00
Linux Build Service Account
4bef50d041 Merge "q6asm: retry asm_open_read and asm_open_loopback when session id conflict" 2018-08-15 05:58:51 -07:00
Linux Build Service Account
cae5c018df Merge "drm/msm: Clear the mode private flags before setting" 2018-08-14 20:44:02 -07:00
Erin Yan
2a7de56683 q6asm: retry asm_open_read and asm_open_loopback when session id conflict
The ADSP asm session ids are managed by the kernel driver. It's all right
for native use cases. But for virtualization use cases, there's no way to
synchronize the session ids' status among virtual machines.  Playing back
in one virtual machine is probably failed, because the session id may had
been occupied by a use case in another virtual machine.

The patch allowed audio capture stream and loopback stream to try all
available session ids in case of session id conflict error, to support
concurrent playback from multiple virtual machines.

Change-Id: I01b4da65f3e5716dd14c20c614b53f3c45dd9ea3
Signed-off-by: Erin Yan <xinyey@codeaurora.org>
2018-08-14 19:49:31 -07:00
Linux Build Service Account
2d6cc4c81b Merge "Merge android-4.4.146 (13962260) into msm-4.4" 2018-08-14 08:35:08 -07:00
Linux Build Service Account
601ae48764 Merge "Merge android-4.4.145 (05670d3) into msm-4.4" 2018-08-14 08:35:07 -07:00
Linux Build Service Account
41155385a0 Merge "Merge android-4.4.142 (8ec9fd8) into msm-4.4" 2018-08-14 08:35:05 -07:00
Linux Build Service Account
e04bed8a99 Merge "cgroup: Fix deadlock in cpu hotplug path" 2018-08-14 08:35:04 -07:00
Linux Build Service Account
c0d9b81150 Merge "ext4: fix check to prevent initializing reserved inodes" 2018-08-14 08:35:02 -07:00
Linux Build Service Account
fc45839675 Merge "power: smb2: expose CHARGE_FULL/CYCLE_COUNT properties" 2018-08-13 23:30:09 -07:00
Linux Build Service Account
bb2cb8d2fe Merge "cnss2: cnss api update for genoa pcie" 2018-08-13 23:30:07 -07:00
Prateek Sood
47d4272073 cgroup: Fix deadlock in cpu hotplug path
Deadlock during cgroup migration from cpu hotplug path when a task T is
being moved from source to destination cgroup.

kworker/0:0
cpuset_hotplug_workfn()
   cpuset_hotplug_update_tasks()
      hotplug_update_tasks_legacy()
        remove_tasks_in_empty_cpuset()
          cgroup_transfer_tasks() // stuck in iterator loop
            cgroup_migrate()
              cgroup_migrate_add_task()

In cgroup_migrate_add_task() it checks for PF_EXITING flag of task T.
Task T will not migrate to destination cgroup. css_task_iter_start()
will keep pointing to task T in loop waiting for task T cg_list node
to be removed.

Task T
do_exit()
  exit_signals() // sets PF_EXITING
  exit_task_namespaces()
    switch_task_namespaces()
      free_nsproxy()
        put_mnt_ns()
          drop_collected_mounts()
            namespace_unlock()
              synchronize_rcu()
                _synchronize_rcu_expedited()
                  schedule_work() // on cpu0 low priority worker pool
                  wait_event() // waiting for work item to execute

Task T inserted a work item in the worklist of cpu0 low priority
worker pool. It is waiting for expedited grace period work item
to execute. This work item will only be executed once kworker/0:0
complete execution of cpuset_hotplug_workfn().

kworker/0:0 ==> Task T ==>kworker/0:0

In case of PF_EXITING task being migrated from source to destination
cgroup, migrate next available task in source cgroup.

Change-Id: I706aeff24c336c660b5a9b3e5a409c5769968960
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2018-08-13 23:21:04 -07:00
Theodore Ts'o
13e2e3a8ad ext4: fix check to prevent initializing reserved inodes
Commit 8844618d8aa7: "ext4: only look at the bg_flags field if it is
valid" will complain if block group zero does not have the
EXT4_BG_INODE_ZEROED flag set.  Unfortunately, this is not correct,
since a freshly created file system has this flag cleared.  It gets
almost immediately after the file system is mounted read-write --- but
the following somewhat unlikely sequence will end up triggering a
false positive report of a corrupted file system:

   mkfs.ext4 /dev/vdc
   mount -o ro /dev/vdc /vdc
   mount -o remount,rw /dev/vdc

Instead, when initializing the inode table for block group zero, test
to make sure that itable_unused count is not too large, since that is
the case that will result in some or all of the reserved inodes
getting cleared.

This fixes the failures reported by Eric Whiteney when running
generic/230 and generic/231 in the the nojournal test case.

Fixes: 8844618d8aa7 ("ext4: only look at the bg_flags field if it is valid")
Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-Commit: 5012284700775a4e6e3fbe7eac4c543c4874b559
Change-Id: I9ae663e67e6ee32ef0c0e98a9e0ae9193cf7c880
Signed-off-by: Ankit Jain <jankit@codeaurora.org>
2018-08-12 22:56:18 -07:00
Lloyd Atkinson
5298eb8be5 drm/msm: add DRM_IOCTL_MSM_RMFB2
Add new remove framebuffer ioctl that simply unreferences the
given framebuffer instead of triggering a shutdown of the CRTC
if the buffer is in active use. This allows the user space to
proactively unref the buffer without triggering an unwanted
shutdown.

Change-Id: Iac06985d069989b28affcf620d4e3feba6d07644
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
2018-08-13 11:57:37 +08:00
Skylar Chang
6d92c598ae msm:ipa3: fix the header table gap issue
Move those deleted entries to the free
list to avoid the gap in hdr tbl list.

Change-Id: I5f5b6ec845e6b7e52c7079c2a3200a8290616951
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2018-08-11 23:08:45 -07:00
Skylar Chang
726ce06fae msm: ipa: fix the ipa-hw rules not clean
After getting reset ioctl from user-space
module, the caches in ipa-driver are clean
however ipa-hw still has it. The fix is
to commit those caches in ipa-hw.

Change-Id: Iee0009b2bf3cdff2979d1fdba629c86a7c5afe21
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2018-08-11 15:49:02 +05:30
Linux Build Service Account
bf2009f9d8 Merge "soc: qcom: pil: Disable a clock to maintain clock state across modem SSR" 2018-08-10 11:08:39 -07:00
Linux Build Service Account
5af3bac064 Merge "diag: Add NULL checks for the mask and mask pointer" 2018-08-10 11:08:38 -07:00
Linux Build Service Account
0712c44637 Merge "soc: qcom: pil: Remove a register read as it causes an unclocked access" 2018-08-10 11:08:36 -07:00
Anant Goel
c4273f6c0c soc: qcom: pil: Disable a clock to maintain clock state across modem SSR
A disable and unprepare is called on a clock which is voted for, but never
unvoted for. By disabling and unpreparing this clock, the clock state is
maintained the same across modem restarts.

Change-Id: I4d6cb219ac718de4b7bad593d7f7aa9fd67b1cef
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-08-09 23:26:26 -07:00
Manoj Prabhu B
0b3dc1a93e diag: Add NULL checks for the mask and mask pointer
The chances of accessing uninitialized mask is prevented
by adding null pointer checks for the mask structure and its
member pointer.

Change-Id: Ibf0467228794b773fc2537d34f1da6719bbb975a
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2018-08-09 21:59:04 -07:00
Linux Build Service Account
c691d29c1a Merge "sched: walt: fix out-of-bounds access" 2018-08-09 19:19:43 -07:00
Linux Build Service Account
239c94bb32 Merge "msm: ipa: Add WLAN FW SSR event" 2018-08-09 19:19:42 -07:00
Linux Build Service Account
7e0b4a018d Merge "arm64: hibernate: Support DEBUG_PAGEALLOC" 2018-08-09 19:19:35 -07:00
Linux Build Service Account
66c9443b80 Merge "arm64: Create sections.h" 2018-08-09 19:19:33 -07:00
Anant Goel
cdd6ec91e1 soc: qcom: pil: Remove a register read as it causes an unclocked access
A read of a register during the software fatal error handling is removed.
This read causes an unclocked access which prevents the modem subsystem
from succssfully restarting.

Change-Id: I8338830573e55af2e5c9d0f688756d975a3302af
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-08-09 18:46:11 -07:00
Linux Build Service Account
a829ffa673 Merge "msm: camera: cpp: Check for valid tx level" 2018-08-09 08:19:06 -07:00
Mohammed Javid
b96d7a6b84 msm: ipa: Add WLAN FW SSR event
Add WLAN FW SSR event to handle FW rejuvenate
scenario.

Change-Id: I417d46cc07f455792906a18f4b6dc8e5ca8ca3de
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-08-09 00:00:59 -07:00
Pratap Nirujogi
a98c0c6552 msm: camera: cpp: Check for valid tx level
TX and RX FIFOs of Microcontroller are used to exchange commands
and messages between Micro FW and CPP driver. TX FIFO depth is
16 32-bit words, incase of errors there is a chance of overflow.
To prevent possible out of bound access, TX FIFO depth or
level is checked for MAX depth before accessing the FIFO.

Change-Id: I5adf39b46ff10e358c4a2c03a2de07d44b99cedb
Signed-off-by: Pratap Nirujogi <pratapn@codeaurora.org>
2018-08-09 11:36:18 +05:30
Linux Build Service Account
0f9b5738c5 Merge "msm: ADSPRPC: Disable CDSP loader" 2018-08-08 18:28:49 -07:00
Linux Build Service Account
b0dc81a983 Merge "media: camera: Fix Major and Minor number" 2018-08-08 18:28:47 -07:00
Abhinav Kumar
63f9f30f6f drm/msm: Clear the mode private flags before setting
Clear the display mode private flags before assigning
the new value. These flags retain the values from the
previous mode set which could be stale in cases where
the mode is different across the hotplugs.

Change-Id: I4bd7021970737e5ae22bade3074d8debfeddc7b3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2018-08-08 16:35:24 -07:00
Abhinav Kumar
03e2cf926f drm/msm: Clear HDMI VSDB and VCDB info across hotplug
SDE connector stores the information related to the HDMI
VSDB and VCDB data blocks. This connector information is
retained till the connector is destroyed which does not
happen across hotplug.

Clear the HDMI VSDB and VCDB related data fields when
the bridge is disabled so that across a hotplug stale
information is not retained.

Change-Id: I4dabfda03a6446f38913ac45d9df2d2ae411a7f0
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2018-08-08 16:35:03 -07:00
Abhinav Kumar
1d134898cd drm/msm: refactor Y420CMDB block parsing logic
Y420CMDB block parsing is too complex and incorrect
in handling cases where more than one byte of bitmap
is present.

Fix this logic to make it more simple and capable to
handle all such cases.

Change-Id: I7aef80f588ec44def000c9f04e1da4c10020699d
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2018-08-08 16:34:30 -07:00
Linux Build Service Account
ae2dd2807d Merge "ARM: dts: msm: disable pm8994 adc on vplatform" 2018-08-08 02:39:39 -07:00
Linux Build Service Account
51568631aa Merge "diag: Add missing protection while accessing session's info" 2018-08-08 02:39:38 -07:00
Linux Build Service Account
6d53b9684a Merge "ARM: dts: msm: Remove blsp1_uart2 on msm8996 ivi vplatform" 2018-08-08 02:39:35 -07:00
Linux Build Service Account
8963a5a4aa Merge "uio: msm_sharedmem: Add stub shutdown function" 2018-08-08 02:39:33 -07:00
Neeraj Soni
b98ee859fc media: camera: Fix Major and Minor number
Fix TA Major and Minor number.

Change-Id: I65a800ec8d84445efc05b9763062d476b1d0f27a
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2018-08-08 02:30:14 -07:00
John Dias
bd4ac8e584 sched: walt: fix out-of-bounds access
A computation in update_top_tasks() is indexing
off the end of a top_tasks array. There's code
to limit the index in the computation, but it's
insufficient.

Bug: 110529282
Change-Id: Idb5ff5e5800c014394bcb04638844bf1e057a40c
Signed-off-by: John Dias <joaodias@google.com>
[pkondeti@codeaurora.org: Backported to 4.4 for HMP scheduler]
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2018-08-08 09:09:01 +05:30
Zhiqiang Tu
d612b3792d ARM: dts: msm: disable pm8994 adc on vplatform
Disable adc since they are not needed.

Change-Id: I5e08ae819f8c5c8a25eca4e523b214606105cb65
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-08-08 10:16:49 +08:00
Zhiqiang Tu
731d27ce78 ARM: dts: msm: Remove blsp1_uart2 on msm8996 ivi vplatform
Remove blsp1_uart since it is not needed.

Change-Id: Id0327fc601f87376eebfbe6d3cfb06b84ed9a407
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-08-07 19:14:12 -07:00
Anant Goel
ca463d4e79 uio: msm_sharedmem: Add stub shutdown function
A stub shutdown function is added as the default
implementation. This function is used by targets
that do not need to free their memory when the
driver is shutdown.

Change-Id: I073cda4fee7a1c6c34c5ba72d9ba73478ef2d90d
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-08-07 18:04:35 -07:00
James Morse
66859cc29f arm64: hibernate: Support DEBUG_PAGEALLOC
DEBUG_PAGEALLOC removes the valid bit of page table entries to prevent
any access to unallocated memory. Hibernate uses this as a hint that those
pages don't need to be saved/restored. This patch adds the
kernel_page_present() function it uses.

hibernate.c copies the resume kernel's linear map for use during restore.
Add _copy_pte() to fill-in the holes made by DEBUG_PAGEALLOC in the resume
kernel, so we can restore data the original kernel had at these addresses.

Finally, DEBUG_PAGEALLOC means the linear-map alias of KERNEL_START to
KERNEL_END may have holes in it, so we can't lazily clean this whole
area to the PoC. Only clean the new mmuoff region, and the kernel/kvm
idmaps.

This reverts commit da24eb1f3f9e2c7b75c5f8c40d8e48e2c4789596.

Change-Id: I862226802c9c726590c89e3d9e8062ed680309f3
Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Git-Commit: 5ebe3a44cc744d11cb60d8438106a9322b7c04dc
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Arun KS <arunks@codeaurora.org>
2018-08-07 15:56:05 -07:00
James Morse
8357b00fc7 arm64: vmlinux.ld: Add mmuoff data sections and move mmuoff text into idmap
Resume from hibernate needs to clean any text executed by the kernel with
the MMU off to the PoC. Collect these functions together into the
.idmap.text section as all this code is tightly coupled and also needs
the same cleaning after resume.

Data is more complicated, secondary_holding_pen_release is written with
the MMU on, clean and invalidated, then read with the MMU off. In contrast
__boot_cpu_mode is written with the MMU off, the corresponding cache line
is invalidated, so when we read it with the MMU on we don't get stale data.
These cache maintenance operations conflict with each other if the values
are within a Cache Writeback Granule (CWG) of each other.
Collect the data into two sections .mmuoff.data.read and .mmuoff.data.write,
the linker script ensures mmuoff.data.write section is aligned to the
architectural maximum CWG of 2KB.

Change-Id: I3f5add863896e0acaa54dd11929fc1d553d402f4
Signed-off-by: James Morse <james.morse@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-Commit: b61130381120398876b86282082ad9f24976dfcf
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Arun KS <arunks@codeaurora.org>
2018-08-07 15:54:46 -07:00