Start offset is not considered in cache operation logic,
due to which bytes at the end of payload might be stale.
Add logic to add offset to cache operation length
from start of buffer, to ensure correct cache operation.
Change-Id: I5fed2fe78f803d3d4d3283ab293ad86238dbc620
Signed-off-by: Surajit Podder <spodder@codeaurora.org>
On consecutive writes in bulk write API, ensure delay
is provided for atleast 100us between each soundwire
master write for WR_DONE status update and reflect
current register value. Also ensure delay in soundwire
master read is present after register address update
and before register value read.
CRs-Fixed: 2035787
Change-Id: I8399c5ca32328abdd4e90b46d6f8d6a6c0225905
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Pointer from userspace is de-referenced before the command is checked.
This might cause a crash if the command being sent is not a valid command.
Hence changing the de-reference such that the pointer is accessed after
checking if a valid command is sent from the userspace.
Change-Id: I8db9382dd184f1564176ab45355954dcde8a3ab3
Signed-off-by: Samyukta Mogily <smogily@codeaurora.org>
Set OT values to default and enable traffic shaper for 4k
60fps layer.
Change-Id: I34ed7e94c8a323d19cdaeb65b87d853cce8957c9
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
We have observed race condition between inquiring the remote pd state and
indication call back execution. They run asynchronously so we have no
control on their concurrent execution. So to achieve mutual exclusion,
moving the portion of code which result in race condition to indication
acknowledgment routine. Indication acknowledgment is send in separate
thread context which will avoid race condition.
Change-Id: Ib94f7ef4efd5de63fc8bededcf5cb6ae4ca2c3d8
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
When HAL3 is used undelivered requests are stored in request_queue
these requests need to be cleared during overflow recovery.
Change-Id: I733ba127abba8bfb70b3c727c7196adba2cb1973
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
The adaptive clock distribution (ACD) mitigates the impact of
high-frequency supply voltage (VDD) droops on microprocessor
performance. Program ACD functional configuration for both
Silver and Gold clusters of sdm630.
Also set VCTL_RAMP_EN & VCTL_RAMP_EN to 1 in SAW4_AVS_CTL.
CRs-Fixed: 2074210
Change-Id: I1f8021b8b436602b22a87d2036aebbfcf6840f58
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
__list_lru_walk_one() acquires nlru spin lock (nlru->lock) for longer
duration if there are more number of items in the lru list. As per the
current code, it can hold the spin lock for upto maximum UINT_MAX entries
at a time. So if there are more number of items in the lru list, then
"BUG: spinlock lockup suspected" is observed in the below path -
[<ffffff8eca0fb0bc>] spin_bug+0x90
[<ffffff8eca0fb220>] do_raw_spin_lock+0xfc
[<ffffff8ecafb7798>] _raw_spin_lock+0x28
[<ffffff8eca1ae884>] list_lru_add+0x28
[<ffffff8eca1f5dac>] dput+0x1c8
[<ffffff8eca1eb46c>] path_put+0x20
[<ffffff8eca1eb73c>] terminate_walk+0x3c
[<ffffff8eca1eee58>] path_lookupat+0x100
[<ffffff8eca1f00fc>] filename_lookup+0x6c
[<ffffff8eca1f0264>] user_path_at_empty+0x54
[<ffffff8eca1e066c>] SyS_faccessat+0xd0
[<ffffff8eca084e30>] el0_svc_naked+0x24
This nlru->lock is acquired by another CPU in this path -
[<ffffff8eca1f5fd0>] d_lru_shrink_move+0x34
[<ffffff8eca1f6180>] dentry_lru_isolate_shrink+0x48
[<ffffff8eca1aeafc>] __list_lru_walk_one.isra.10+0x94
[<ffffff8eca1aec34>] list_lru_walk_node+0x40
[<ffffff8eca1f6620>] shrink_dcache_sb+0x60
[<ffffff8eca1e56a8>] do_remount_sb+0xbc
[<ffffff8eca1e583c>] do_emergency_remount+0xb0
[<ffffff8eca0ba510>] process_one_work+0x228
[<ffffff8eca0bb158>] worker_thread+0x2e0
[<ffffff8eca0c040c>] kthread+0xf4
[<ffffff8eca084dd0>] ret_from_fork+0x10
Fix this lockup by reducing the number of entries to be shrinked from the
lru list to 1024 at once. Also, add cond_resched() before processing the
lru list again.
Change-Id: I6df8d74cbc4c5ceac294f2d0784702cf096e84be
Link: http://marc.info/?t=149722864900001&r=1&w=2
Link: http://lkml.kernel.org/r/1498707575-2472-1-git-send-email-stummala@codeaurora.org
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Suggested-by: Jan Kara <jack@suse.cz>
Suggested-by: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Alexander Polakov <apolyakov@beget.ru>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Patch-mainline: linux-mm @ 29/06/17, 09:09:35
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
list_lru_count_node() iterates over all memcgs to get the total number of
entries on the node but it can race with memcg_drain_all_list_lrus(),
which migrates the entries from a dead cgroup to another. This can return
incorrect number of entries from list_lru_count_node().
Fix this by keeping track of entries per node and simply return it in
list_lru_count_node().
Change-Id: I19e3b527804e95be75f48ee363c8207c0e7ee2ff
Link: http://lkml.kernel.org/r/1498707555-30525-1-git-send-email-stummala@codeaurora.org
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Alexander Polakov <apolyakov@beget.ru>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Patch-mainline: linux-mm @ 29/06/17, 09:09:15
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Expose HDR capability using a property to the userspace.
This will help userspace to decide whether to invoke the HDR library
and pass the relevant parameters to be sent to the sink.
Change-Id: I3c4bf4d6c4e0f0babdf49b3c99baab42dcb2b5c0
Signed-off-by: Srikanth Rajagopalan <rasrik@codeaurora.org>
This is an implementation of para-virtualized SCM driver.
This driver is the FE. The BE is QCPE running in an hypervisor.
The FE driver forwards SCM calls over HAB to the BE.
Change-Id: I88c269e856b0a6cc20b9ab8bf10110842d90a382
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Add WLAN carveout region of size 1MB. But additional guard of 1MB is
also added due to system limitations.
Change-Id: I1cd38f1ced820132209e31acc55a1321c879a09c
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
ADSP SVA needs LIVE_REC path type for LISTEN pass through mode
for successful loading of SVA App.
Hence set path type to LIVE_REC in LISTEN pass through case.
Change-Id: I4404f2a64f0add62782beab3a5d8d63615d8ac01
Signed-off-by: Revathi Uddaraju <revathiu@codeaurora.org>
* refs/heads/tmp-64a73ff:
Linux 4.4.76
KVM: nVMX: Fix exception injection
KVM: x86: zero base3 of unusable segments
KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh()
KVM: x86: fix emulation of RSM and IRET instructions
cpufreq: s3c2416: double free on driver init error path
iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
iommu: Handle default domain attach failure
iommu/vt-d: Don't over-free page table directories
ocfs2: o2hb: revert hb threshold to keep compatible
x86/mm: Fix flush_tlb_page() on Xen
x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
ARM: 8685/1: ensure memblock-limit is pmd-aligned
ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation
sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting
watchdog: bcm281xx: Fix use of uninitialized spinlock.
xfrm: Oops on error in pfkey_msg2xfrm_state()
xfrm: NULL dereference on allocation failure
xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
jump label: fix passing kbuild_cflags when checking for asm goto support
ravb: Fix use-after-free on `ifconfig eth0 down`
sctp: check af before verify address in sctp_addr_id2transport
net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV
perf probe: Fix to show correct locations for events on modules
be2net: fix status check in be_cmd_pmac_add()
s390/ctl_reg: make __ctl_load a full memory barrier
swiotlb: ensure that page-sized mappings are page-aligned
coredump: Ensure proper size of sparse core files
x86/mpx: Use compatible types in comparison to fix sparse error
mac80211: initialize SMPS field in HT capabilities
spi: davinci: use dma_mapping_error()
scsi: lpfc: avoid double free of resource identifiers
HID: i2c-hid: Add sleep between POWER ON and RESET
kernel/panic.c: add missing \n
ibmveth: Add a proper check for the availability of the checksum features
vxlan: do not age static remote mac entries
virtio_net: fix PAGE_SIZE > 64k
vfio/spapr: fail tce_iommu_attach_group() when iommu_data is null
drm/amdgpu: check ring being ready before using
net: dsa: Check return value of phy_connect_direct()
amd-xgbe: Check xgbe_init() return code
platform/x86: ideapad-laptop: handle ACPI event 1
scsi: virtio_scsi: Reject commands when virtqueue is broken
xen-netfront: Fix Rx stall during network stress and OOM
swiotlb-xen: update dev_addr after swapping pages
virtio_console: fix a crash in config_work_handler
Btrfs: fix truncate down when no_holes feature is enabled
gianfar: Do not reuse pages from emergency reserve
powerpc/eeh: Enable IO path on permanent error
net: bgmac: Remove superflous netif_carrier_on()
net: bgmac: Start transmit queue in bgmac_open
net: bgmac: Fix SOF bit checking
bgmac: Fix reversed test of build_skb() return value.
mtd: bcm47xxpart: don't fail because of bit-flips
bgmac: fix a missing check for build_skb
mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) only
MIPS: ralink: fix MT7628 wled_an pinmux gpio
MIPS: ralink: fix MT7628 pinmux typos
MIPS: ralink: Fix invalid assignment of SoC type
MIPS: ralink: fix USB frequency scaling
MIPS: ralink: MT7688 pinmux fixes
net: korina: Fix NAPI versus resources freeing
MIPS: ath79: fix regression in PCI window initialization
net: mvneta: Fix for_each_present_cpu usage
ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
qla2xxx: Fix erroneous invalid handle message
scsi: lpfc: Set elsiocb contexts to NULL after freeing it
scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
KVM: x86: fix fixing of hypercalls
mm: numa: avoid waiting on freed migrated pages
block: fix module reference leak on put_disk() call for cgroups throttle
sysctl: enable strict writes
usb: gadget: f_fs: Fix possibe deadlock
drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
ALSA: hda - set input_path bitmap to zero after moving it to new place
ALSA: hda - Fix endless loop of codec configure
MIPS: Fix IRQ tracing & lockdep when rescheduling
MIPS: pm-cps: Drop manual cache-line alignment of ready_count
MIPS: Avoid accidental raw backtrace
mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff()
drm/ast: Handle configuration without P2A bridge
NFSv4: fix a reference leak caused WARNING messages
netfilter: synproxy: fix conntrackd interaction
netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
rtnetlink: add IFLA_GROUP to ifla_policy
ipv6: Do not leak throw route references
sfc: provide dummy definitions of vswitch functions
net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
decnet: always not take dst->__refcnt when inserting dst into hash table
net/mlx5: Wait for FW readiness before initializing command interface
ipv6: fix calling in6_ifa_hold incorrectly for dad work
igmp: add a missing spin_lock_init()
igmp: acquire pmc lock for ip_mc_clear_src()
net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
Fix an intermittent pr_emerg warning about lo becoming free.
af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers
net: Zero ifla_vf_info in rtnl_fill_vfinfo()
decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb
net: don't call strlen on non-terminated string in dev_set_alias()
ipv6: release dst on error in ip6_dst_lookup_tail
UPSTREAM: selinux: enable genfscon labeling for tracefs
Change-Id: I05ae1d6271769a99ea3817e5066f5ab6511f3254
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Fence lock is not taken in sync_print_fence() while calling
sync_print_pt() which in turn calls fence_is_signaled() to check the
status of each fence before printing. This creates a race condition
that corrupts fence data structure when another thread calls
fence_is_signaled_locked() on the same fence. Since we don't need to
signal the fence while logging, it can be fixed by simply checking fence
flag status directly instead of calling fence_is_signaled_locked().
Change-Id: I1b4732cf3779a5b75a372e11170b438a4deabe67
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
While switching from hs400 to hs200 mode, high speed mode
timing should be selected in the device before changing the
clock frequency in the host. But current implementation,
(mmc_hs400_to_hs200) first updates the frequency in the host
and then updates mode in the device. This is a spec violation.
Hence update the sequence to comply with the spec.
Change-Id: I0694edac9dd005ec68add9cc38bbe6fa4245ed48
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Making use of return value of snprintf to avoid information
leak and using pk instead of lx for writing address to buffer.
Change-Id: If54b37c43679613658e270c3b0da499c6d82eecf
Signed-off-by: annamraj <annamraj@codeaurora.org>
Couple of code cleanup
- remove dead code
- initialize local variables before use
- validate gsi_ep_cfg_ptr return
Change-Id: Ia2c2a5559fa2c5f89b33cc1ff897df0faa725e7e
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Memory translation fault occurs when incorrect memory
is accessed. To avoid translation fault, do not access
message memory which is not initialized.
Change-Id: Id5e89350a4bc51021964ee63286ea69040f1b32a
Signed-off-by: Shrey Vijay <shreyv@codeaurora.org>
Changes that reset remote cpu backlog state are removed with the
following commit. Adding them back.
I6e688bf0d09 ("net: rps: send out pending IPI's on CPU hotplug")
Change-Id: I436d1a1f185f0ddc375349e135bbb5d6eb8c5f26
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
This reverts commit b67bb93f56 ("power: reset: Do not
disable SDI during reset"), to restore the original
behavior of disabling SDI during reset.
Change-Id: I6ad0472dc5d766ffea2a942fc226fb742fe44242
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Move the input validation for the connector's HDR support
before calling the API to set the infoframe rather than within
the API itself.
This helps to avoid redundant checks and logging.
Change-Id: If21562920edb1613a73b5e18ab258a57e46c1d7b
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Verify IPA client ID is valid before using it to
access clients array for logging purposes. In case of
invalid id, do not access the array.
Change-Id: I7af6ee765a6d70d61721ac21b6a92ed53469b05a
CRs-fixed: 2051257
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
ipa3_qmi_ctx is a global variable that may be accessed by
different worker threads. Protect the access to it
using mutex lock so that the access will be always atomic.
Change-Id: Iaf0c95d66817833c8e8123b12e94a7a01ab8df2c
CRs-fixed: 2056414
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>