This reverts commits:
- 2d26472b398e2850755e0f447f11762948876758 [memlat: Read perf counters in parallel and reduce system jitter]
- 91164894044c9682faf3da668c06cd588975dc15 [soc: qcom: watchdog_v2: Optimize IPI pings to reduce system jitter]
- f060136685304ae86aad3da35b1a098642d4e8de [smp: Use migrate disable/enable in smp_call_function_single_async()]
- d1155d942a10a5fe166941db835aad60f8e7603d [smp: Make generic_exec_single() public]
Change-Id: I8723ded1aaa7241ace7c56613a7abf6c46b7808d
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (278 commits)
LTS: Update to 4.14.348
docs: kernel_include.py: Cope with docutils 0.21
serial: kgdboc: Fix NMI-safety problems from keyboard reset code
btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
dm: limit the number of targets and parameter size area
Revert "selftests: mm: fix map_hugetlb failure on 64K page size systems"
LTS: Update to 4.14.347
rds: Fix build regression.
RDS: IB: Use DEFINE_PER_CPU_SHARED_ALIGNED for rds_ib_stats
af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc().
net: fix out-of-bounds access in ops_init
drm/vmwgfx: Fix invalid reads in fence signaled events
dyndbg: fix old BUG_ON in >control parser
tipc: fix UAF in error path
usb: gadget: f_fs: Fix a race condition when processing setup packets.
usb: gadget: composite: fix OS descriptors w_value logic
firewire: nosy: ensure user_length is taken into account when fetching packet contents
af_unix: Fix garbage collector racing against connect()
af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()
...
Change-Id: If329d39dd4e95e14045bb7c58494c197d1352d60
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
[ Upstream commit 914f8b228ede709274b8c80514b352248ec9da00 ]
This adds a function to update a CGR with new parameters. qman_create_cgr
can almost be used for this (with flags=0), but it's not suitable because
it also registers the callback function. The _safe variant was modeled off
of qman_cgr_delete_safe. However, we handle multiple arguments and a return
value.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: fbec4e7fed89 ("soc: fsl: qbman: Use raw spinlock for cgr_lock")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e2bd2df406edd2dff1b105f9dea3c502ee5808c3)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Sending synchronous IPIs to other CPUs involves spinning with preemption
disabled in order to wait for each IPI to finish. Keeping preemption off
for long periods of time like this is bad for system jitter, not to mention
the perf event IPIs are sent and flushed one at a time for each event for
each CPU rather than all at once for all the CPUs.
Since the way perf events are currently read is quite naive, rewrite it to
make it exploit parallelism and go much faster. IPIs for reading each perf
event are now sent to all CPUs asynchronously so that each CPU can work on
reading the events in parallel, and the dispatching CPU now sleeps rather
than spins when waiting for the IPIs to finish. Before the dispatching CPU
starts waiting though, it works on reading events for itself and then
reading events which can be read from any CPU in order to derive further
parallelism, and then waits for the IPIs to finish afterwards if they
haven't already.
Furthermore, there's now only one IPI sent to read all of a CPU's events
rather than an IPI sent for reading each event, which significantly speeds
up the event reads and reduces the number of IPIs sent.
This also checks for active SCM calls on a per-CPU basis rather than a
global basis so that unrelated CPUs don't get their counter reads skipped
and so that some CPUs can still receive fresh counter readings.
Overall, this makes the memlat driver much faster and more efficient, and
eliminates significant system jitter previously caused by IPI abuse.
Change-Id: I238c4e57f672a0337e2377c8fd38d0f6a1dbc2d0
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
When a bearer is removed, calling qdisc reset on a tx queue
could have a race condition with qdisc dequeue for lockless
qdisc such as pfifo_fast.
This change uses a different mechanism not relying on qdisc
implementation to achieve packet purge on bearer remove.
Change-Id: I8f9201809853b07293896d6cb8e010e9e0904e46
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
Signed-off-by: Sharath Chandra Vurukala <quic_sharathv@quicinc.com>
[Dark-Matter7232: Backport to 4.14]
Signed-off-by: Dark-Matter7232 <kerneldeveloper7232@gmail.com>
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
Reverts commits 52fed5ed969de6ad2d9c0de9920428086323edd6 and 55d08959bdd6286d3fa1712d2d90e5c823634865
It doesn't play well with s2idle and causes warnings in dmesg.
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Zlatan Radovanovic <zlatan.radovanovic@fet.ba>
Signed-off-by: azrim <mirzaspc@gmail.com>
memlat works based on perf event to calculate algorithm.
Perf event needs IPI to read count from other CPU.
However, if the CPU is under heavy scm call(+20ms), it could
be stuck until the CPU could complete the scm call.
It would cause long latency.
This patch adds global atomic count to check whether scm is
going. If it's under going, memlat doesn't invoke perf event
function to avoid IPI stuck. Although there is still race to
check it, the race should be small enough so effectivey, it
mitigate such long latency.
Please check to memlat owner what happens when read_event
sometimes returns zero due to scm call in parallel.
Bug: 134440633
Change-Id: I0403d151ededcc80d531c8cd81daa783000902d1
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
Added Support for SOTA notification Check status from HLOS
Change-Id: I1bf58c0ee0dce8a5b1351812c1e9813438d0c0a8
Signed-off-by: Vishvesh Deobhankar <vdeobhan@codeaurora.org>
[ Upstream commit 89d29997f103d08264b0685796b420d911658b96 ]
eznps driver is supposed to be platform independent however it ends up
including stuff from inside arch/arc headers leading to rand config
build errors.
The quick hack to fix this (proper fix is too much chrun for non active
user-base) is to add following to nps platform agnostic header.
- copy AUX_IENABLE from arch/arc header
- move CTOP_AUX_IACK from arch/arc/plat-eznps/*/**
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lkml.kernel.org/r/20200824095831.5lpkmkafelnvlpi2@linutronix.de
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
In cases of system suspend, there is a requirement to update
existing boot marker. Add API to update existing boot marker.
Change-Id: If26249578f4a2594f37f53f3ea819e5032db2b85
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Provide APIs to be used by the ethernet transport/adaption layer to
interface with qrtr-ethernet driver. Ethernet transport/adaption layer
will use these APIs to:
1. Let qrtr-ethernet know when the ethernet link is up/down so that
endpoint registration/deregistration is done as needed.
2. Provide a function pointer for qrtr-ethernet module to transmit
data to the ethernet adaption layer.
Change-Id: Ifd1a07aef2fc5cd906128d2bed68574a2ab4c29b
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Rename EVT_WAKE_UP to EVENT_REQUEST_WAKE_UP to clearly
expalin that this notification is to request to wake up
the remote processor.
Change-Id: Icc829f3b6c6d8b0cfc2e0ff189a0152759bb6415
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Add socinfo support for trinket-iot Soc and update the
bindings for the same.
Change-Id: I377526de9e7e7d95d93f6f954f6ff94e8f886b71
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
Remove Unnecessary socinfo support and update the
bindings for the same.
Change-Id: I724b37fd7e466307db0c209cef834c4a308fa940
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
For msm targets that have slave side access control, iommu
driver is not allowed to write to secure context bank register
space. Extend arm_smmu_skip_write logic to consider such
protected context bank ttbr address space as well for skipping.
Change-Id: Ibb6ee5a0425c1aa86ab82b78eca386de09baaace
Signed-off-by: Vishwanath Raju K <vishk@codeaurora.org>
Skip writes to global space of SMMU on targets with slave side
protection where this space was preprogrammed by TZ that need to be
wkept intact.
Change-Id: I03f8ba708144ad9846ec8d6b8a89bd53773bdded
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vishwanath Raju K <vishk@codeaurora.org>
This commit introduces helper APIs and header file to be used
by sideband events publishers and subscribers. Communication
is through standard kernel APIs.
Change-Id: I12114bdf3e1e0e6c3fe0677e313bd7ad8e1649b7
Signed-off-by: Rishi Gupta <rishgupt@codeaurora.org>
Add watchdog timer to recover potential data stall when data is
not going to the expected DRB and no DFC indication is received.
Change-Id: Iaa4b4814967cf9400c36115a083922376d23928d
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Add snapshot of profiler driver from msm-4.4.
This snapshot is taken as of msm-4.4 commit bf01369440c0
(profiler: Add a communication interface between userspace and tz services)
Refine code for llcc support.
Change-Id: I37db17202fbd09feb36a118e6e9c3e3aa00bec9d
Signed-off-by: Lei wang <leiwan@codeaurora.org>
Add socinfo support for QCM6125/QCS6125 Soc and update the
bindings for the same.
Change-Id: Ia2a9729e6b668559393c6660deca2da97f545c67
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
'bootloader_load_kernel' and 'bootloader_chksum_time' are
redundant information. As the entries in IMEM have a limit
(as of now 8 entries), recreate them from *_start and *_done
variants, which are populated from the bootloader.
Change-Id: I4794cd5665a7593aca94542fd759fbd0da068d96
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Add socinfo support for SDM429W SoC and update the
bindings for the same.
Change-Id: Ic29fb6d1561c2c0de94223d976d23270df6d9e3c
Signed-off-by: Archit Saxena <archsaxe@codeaurora.org>
Fixes the size of VMID_LAST to avoid the index
out of bound error.
Change-Id: Iacf449b131f8003ac8252cfe81c9bcb98d9280c0
Signed-off-by: Manohar Vavilapalli <mvavilap@codeaurora.org>
This reverts commit 61d8f5d55089f630f2386b62fc327054c893dc96.
Change-Id: I361bec080d51245973936999af1ddf5cf80851a6
Signed-off-by: Chetan C R <cchinnad@codeaurora.org>
Add necessary flags for secure encoder feature to
request this type of memory.
Change-Id: I81521ac8c9c1b1dd003c96998052a9f1b9ab8c11
Signed-off-by: Vishwanath Raju K <vishk@codeaurora.org>
Add changes to track and predict next rescheduling IPI
based on past history. Add a module param to control enabling
it.
Change-Id: Ie495d8906288ee410708693ee15ed51643aefb44
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
CPU spm is programmed to handshake with rpm for single cpu devices.
If cluster level LPM is not selected even then spm handshakes with
rpm.
Fix this issue by allowing rpm handshake only if cluster level
LPM is selected.
CRs-Fixed: 1043098.
Change-Id: I30d10bfbf34a211563d0a3c4a43fdd5c174b8a3f
Signed-off-by: Haribabu Gattem <haribabu@codeaurora.org>
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Add dp-mst sideband message protocol simulator to simulate
downstream reply. This is useful for special bridge that
doesn't support sideband message.
Change-Id: I7670abd3505affb9db3232747b86681cea0b4310
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Create the framework to support external dp aux bridge device which
can handle DPCD/I2C/HPD from external.
Change-Id: Iabd0998efc8bf7134d186b1751d219c00217385c
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Add SDA660 SOC information in socinfo driver.
Change-Id: I8e66312d1755480f8ca9de281a9906b338c59e71
Signed-off-by: Vishwanath Raju K <vishk@codeaurora.org>
Compilation failed, due to updated function declarations lpm_levels
driver where the lpm_levels_legacy driver is not updated in parallel
Rectified all errors occurred during compilation for mdm9607 target.
Change-Id: Iacb6ce9949454a949bcba90a8e8285ca18b832d5
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Signed-off-by: Haribabu Gattem <haribabu@codeaurora.org>
Add non psci legacy lpm support. Modify and align changes
for clock event, MPM and cpu hotplug for LPM callback notification.
Remove deprecated scheduler c-state(idle cpu), d-state(idle cluster)
setting from lpm driver.
Snapshot is taken from msm-4.9 kernel version @commit b9ad452666da39.
("soc: qcom: bgrsb: Increase time out for RSB channel opening").
Change-Id: I8958ab4f098cc6d875071e3f100b8b74845e0cfa
Signed-off-by: Haribabu Gattem <haribabu@codeaurora.org>
Signed-off-by: Suresh Kumar Allam <allamsuresh@codeaurora.org>
Use the exsisting SCM call for QUPv3 firmware loading during SSR
of SSC subsystem, instead of creating a new one.
Change-Id: I6561137202fdc859c24fcaaeb11c74d160a6a282
Signed-off-by: Ashish Kori <akori@codeaurora.org>
Add socinfo support for SDM660 SoC and update the
bindings for the same.
Change-Id: I66220a73e921ea4f2758137ba0440a470ff9872d
Signed-off-by: Naitik Bharadiya <bharad@codeaurora.org>