Setup pmu counter functions of rimps memlat driver check cpu_is_hp
flag before creating counters, and the setup of pmu counters will
be called in two places one in probe and other when cpu is coming
up from hotplug path.
The hotplug path will clear cpu_is_hp after the pmu setup calls are
issued, but pmu setup function will not create pmu events as the
cpu_is_hp flag not cleared at this point, this results in pmu
counters not getting setup even cpu is up from the hotplug path.
Add a parameter to these functions indicating from which path these
are called and update the logic accordingly to allow creation of
pmu events when core is coming up.
Change-Id: I8bf8d52d91d14ab3f4d837271055f03e704e98a0
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
RIMPS memlat driver reads the current PMU counter value
using perf_event_read_local() API at the time of core
going offline or entering LPM and saves the current
snapshot to a shared memory for access by RIMPS.
RIMPS reads these values from the shared memory when
core is offline or in LPM state, and reads directly
from PMU hardware when core is online. The value read
from hardware and the one read from shared memory are
going out of sync because perf event driver limits the
counting range of PMU counter to half of the total range
supported by hardware, and it configures the counter to
start counting from midpoint at the time of counter reset
and upon overflow. It keeps adding the delta read from
hardware counters to software maintained counters and it
returns the same through perf_event_read API.
As this is not the exact same value as what is read from
hardware counters, the values read by RIMPS from shared
memory are going out of sync.
To address this get the current snapshot of hardware counter
value from prev_count member of hw_perf_event structure which
is part of perf_event structure, and store that to shared memory.
Change-Id: I71f416270a02f7925b16e576f637cf3579fec6ce
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
When releasing a thread todo list when tearing down
a binder_proc, the following race was possible which
could result in a use-after-free:
1. Thread 1: enter binder_release_work from binder_thread_release
2. Thread 2: binder_update_ref_for_handle() -> binder_dec_node_ilocked()
3. Thread 2: dec nodeA --> 0 (will free node)
4. Thread 1: ACQ inner_proc_lock
5. Thread 2: block on inner_proc_lock
6. Thread 1: dequeue work (BINDER_WORK_NODE, part of nodeA)
7. Thread 1: REL inner_proc_lock
8. Thread 2: ACQ inner_proc_lock
9. Thread 2: todo list cleanup, but work was already dequeued
10. Thread 2: free node
11. Thread 2: REL inner_proc_lock
12. Thread 1: deref w->type (UAF)
The problem was that for a BINDER_WORK_NODE, the binder_work element
must not be accessed after releasing the inner_proc_lock while
processing the todo list elements since another thread might be
handling a deref on the node containing the binder_work element
leading to the node being freed.
Signed-off-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20201009232455.4054810-1-tkjos@google.com
Cc: <stable@vger.kernel.org> # 4.14, 4.19, 5.4, 5.8
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f3277cbfba763cd2826396521b9296de67cf1bbc)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7c1bf0b74824f272664e76206c5dc3b66b9eeaff
Use alloc_skb_with_frags for skb allocation to keep it uniform
throughout the rx path.
Change-Id: Id38eeea0a7d422b50c1ad6a90b9b569f26c45917
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Add a pool of SKBs that can be used when the system is in low memory
conditions. This pool will be shared between all nodes and replenished
by a worker function.
Change-Id: I639a9ac76db726dc8ad46b12d3b3d560c674939c
Signed-off-by: Chris Lew <clew@codeaurora.org>
When invoke cnss_force_collect_rddm(), if device is already in bad
state, wait till dump collection is completed.
Change-Id: Ic3d907bd512bb8ca99f88baf7a8d38f0c00cfe64
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Previous iterations of the llcc driver did not account for caches with
no llcc broadcast hardware. This fixes this issue.
Change-Id: I221d0d65d17c34645cd1a4070737fe9bebfa4b16
Signed-off-by: Melody Olvera <molvera@codeaurora.org>
Declare war on uninterruptible sleep. Add a tracepoint which
walks the kernel stack and dumps the first non-scheduler function
called before the scheduler is invoked.
Bug: 120445457
Change-Id: I19e965d5206329360a92cbfe2afcc8c30f65c229
Signed-off-by: Riley Andrews <riandrews@google.com>
[astrachan: deleted an unnecessary whitespace change]
Signed-off-by: Alistair Strachan <astrachan@google.com>
Bug: 170916884
Signed-off-by: Todd Kjos <tkjos@google.com>
Remove target specific QMP register macro definition file
and replace it with the generic 5nm files for broader use.
Change-Id: I9c9b9f0615a74b71b35734e585d829f156bf2449
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Clear the table pointer after it is freed to make sure
it doesn't get freed again.
Change-Id: Ica693a048fd76473a3937084c87f3631ef5b27dd
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
This change add USB QUSB PHY driver used on QTI MSM platforms.
This snapshot is taken as of msm-4.19 commit b82cc3a4ac60
("usb: phy: qusb: Do not power down PHY if EUD is enabled").
Change-Id: Id6ef9d554ab3d87205ee85a66d503e9733b1b5f1
Signed-off-by: Harsh Agarwal <harshq@codeaurora.org>
Update the register offsets for the debug mux to measure
the clock frequency correctly.
Change-Id: I329f3f3416d6b097e0fc38e72d136a5b21db7049
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
This module is used to tunnel multicast
packets received on an interface to WLAN
clients which have registered for these
packet streams. Mainly used to tunnel
EMBMS packets received on TMGI streams.
Change-Id: I1cea29bff192d375317dda3d1baebb594e0b9c39
Acked-by: Raju Velpula <rvelpula@qti.qualcomm.com>
Signed-off-by: Paras Singh Jain <parassin@codeaurora.org>
Pass minimum and maximum voltage values while enabling regulators.
Change-Id: I3de7f343cd0d8fd1953fa5d091c411c013a0dd29
Signed-off-by: Pradeep P V K <ppvk@codeaurora.org>
Update the android/abi_gki_aarch64_qcom with recent symbol additions.
No need to update the .xml file, as no new symbol addition.
Bug: 171024164
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Change-Id: I38fdb82878c578a19fb01df1e97eb7fafd7dac06
This change add initial board config support to enable build 32 bit
kernel for NIGHTJAR.
Change-Id: Ie5e24a45840d667fce1bd8ee9901d19dd6c47f3f
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
CDSPRM module implements a RPMSG interface to communicate with CDSP
while providing a way for CDSP to vote for CPU QoS to benefit CDSP
applications performance.
Change-Id: Ib2627e611b3d4e25f68b7ecee672d4a6474050c3
Acked-by: Sreekanth Gande <sgande@qti.qualcomm.com>
Signed-off-by: Bavyasritha Alahari <alahari@codeaurora.org>
Currently ipc_logging will capture the usb request's dma address but
when sg list is used usb request's dma address is not populated. This
change adds start_sg's dma address which is populated when sg list is
used for usb transfers. Also increase the number of log pages to capture
more ep events.
Change-Id: I36ada11429e168e2d3d09cf3427b1f3bcdacc285
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
The pm8008 regulator is connected over I2C and the I2C device configures
its clocks in runtime_resume and runtime_suspend. These callbacks are
triggered from the pm8008 driver's regmap calls. This means regulator
framework requests for pm8008 call into the clock framework with the
regulator framework locks held. The qcom clock providers also call into
the regulator framework with the clock framework locks held. If thread A
makes a pm8008 request at the same time thread B makes a clock request,
then it can result in deadlocks. Thread A will be stuck waiting on the
clock locks while thread B is stuck waiting on the regulator locks.
To prevent these deadlocks, enable the I2C clocks required for pm8008 by
default during probe and stop registering them with the framework. This
NOPs any client requests, since of_clk_get() returns NULL when passed an
unregistered clock and all other clock APIs return success before
grabbing any locks when passed NULL.
Change-Id: I90c72e2588745d95472ad4a5b28144a3d4439762
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The KMI was changed by several patches on Oct 15. Update the
generation number.
Bug: 161946584
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: If641819d24743f319cfe704b79ec479be8aae78f
Removed the support for game status node to specifically compare
for gfx events, the same is archived with checking the value of pid.
This saves an extra fops on each iteration for game on and off.
Rejecting events with timestamp = 0.
Change-Id: Icbafc4d1f8fa1e444b9074fcf2fde47a6e85d609
Signed-off-by: Aman Mehta <amanmeht@codeaurora.org>
Recently, sequence to resume stalled SMMU was updated to use GBIF GX
and CX halt to properly resume stalled SMMU but it was only taken care
for GMU devices. This patch updates the sequence for no GMU devices
as well to ensure that this debug feature works properly.
Change-Id: Idbdc5c8782ef5a63d05c879996792ce42c1bcf0b
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
Leaf changes summary: 3291 artifacts changed (10 filtered out)
Changed leaf types summary: 5 (1 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 3237 Changed (9 filtered out), 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 49 Changed, 0 Added variable
3237 functions with some sub-type change:
49 Changed variables:
type of variable changed:
type size hasn't changed
1 data member insertion:
'deferred_split pglist_data::deferred_split_queue', at offset 42048 (in bits) at mmzone.h:785:1
there are data member changes:
'lruvec pglist_data::lruvec' offset changed from 42048 to 42304 (in bits) (by +256 bits)
'unsigned long int pglist_data::flags' offset changed from 43136 to 43392 (in bits) (by +256 bits)
3325 impacted interfaces
type of variable changed:
type size hasn't changed
there are data member changes:
type 'u64[2]' of 'task_struct::android_vendor_data1' changed:
type name changed from 'u64[2]' to 'u64[3]'
array type size changed from 128 to 192
array type subrange 1 changed length from 2 to 3
'u64 task_struct::android_kabi_reserved1' offset changed from 21312 to 21376 (in bits) (by +64 bits)
'u64 task_struct::android_kabi_reserved2' offset changed from 21376 to 21440 (in bits) (by +64 bits)
'u64 task_struct::android_kabi_reserved3' offset changed from 21440 to 21504 (in bits) (by +64 bits)
'u64 task_struct::android_kabi_reserved4' offset changed from 21504 to 21568 (in bits) (by +64 bits)
'u64 task_struct::android_kabi_reserved5' offset changed from 21568 to 21632 (in bits) (by +64 bits)
'u64 task_struct::android_kabi_reserved6' offset changed from 21632 to 21696 (in bits) (by +64 bits)
'u64 task_struct::android_kabi_reserved7' offset changed from 21696 to 21760 (in bits) (by +64 bits)
'u64 task_struct::android_kabi_reserved8' offset changed from 21760 to 21824 (in bits) (by +64 bits)
3325 impacted interfaces
'struct file at fs.h:955:1' changed:
type size changed from 2048 to 2176 (in bits)
2 data member insertions:
'u64 file::android_kabi_reserved1', at offset 2048 (in bits) at fs.h:995:1
'u64 file::android_vendor_data1', at offset 2112 (in bits) at fs.h:996:1
3325 impacted interfaces
'struct mem_cgroup at memcontrol.h:208:1' changed:
type size changed from 21504 to 22528 (in bits)
1 data member insertion:
'deferred_split mem_cgroup::deferred_split_queue', at offset 22144 (in bits) at memcontrol.h:334:1
there are data member changes:
type 'atomic_long_t[56]' of 'mem_cgroup::vmevents' changed:
type name changed from 'atomic_long_t[56]' to 'atomic_long_t[70]'
array type size changed from 3584 to 4480
array type subrange 1 changed length from 56 to 70
'atomic_long_t mem_cgroup::memory_events[7]' offset changed from 17280 to 18176 (in bits) (by +896 bits)
'atomic_long_t mem_cgroup::memory_events_local[7]' offset changed from 17728 to 18624 (in bits) (by +896 bits)
'unsigned long int mem_cgroup::socket_pressure' offset changed from 18176 to 19072 (in bits) (by +896 bits)
'bool mem_cgroup::tcpmem_active' offset changed from 18240 to 19136 (in bits) (by +896 bits)
'int mem_cgroup::tcpmem_pressure' offset changed from 18272 to 19168 (in bits) (by +896 bits)
'int mem_cgroup::kmemcg_id' offset changed from 18304 to 19200 (in bits) (by +896 bits)
'memcg_kmem_state mem_cgroup::kmem_state' offset changed from 18336 to 19232 (in bits) (by +896 bits)
'list_head mem_cgroup::kmem_caches' offset changed from 18368 to 19264 (in bits) (by +896 bits)
'int mem_cgroup::last_scanned_node' offset changed from 18496 to 19392 (in bits) (by +896 bits)
'list_head mem_cgroup::cgwb_list' offset changed from 18560 to 19456 (in bits) (by +896 bits)
'wb_domain mem_cgroup::cgwb_domain' offset changed from 18688 to 19584 (in bits) (by +896 bits)
'memcg_cgwb_frn mem_cgroup::cgwb_frn[4]' offset changed from 19776 to 20672 (in bits) (by +896 bits)
'list_head mem_cgroup::event_list' offset changed from 21056 to 21952 (in bits) (by +896 bits)
'spinlock_t mem_cgroup::event_list_lock' offset changed from 21184 to 22080 (in bits) (by +896 bits)
'mem_cgroup_per_node* mem_cgroup::nodeinfo[]' offset changed from 21248 to 22400 (in bits) (by +1152 bits)
420 impacted interfaces
'struct memcg_vmstats_percpu at memcontrol.h:88:1' changed:
type size changed from 6272 to 7168 (in bits)
there are data member changes:
type 'unsigned long int[56]' of 'memcg_vmstats_percpu::events' changed:
type name changed from 'unsigned long int[56]' to 'unsigned long int[70]'
array type size changed from 3584 to 4480
array type subrange 1 changed length from 56 to 70
'unsigned long int memcg_vmstats_percpu::nr_page_events' offset changed from 6016 to 6912 (in bits) (by +896 bits)
'unsigned long int memcg_vmstats_percpu::targets[3]' offset changed from 6080 to 6976 (in bits) (by +896 bits)
420 impacted interfaces
'struct pglist_data at mmzone.h:713:1' changed:
details were reported earlier
'struct task_struct at sched.h:636:1' changed:
details were reported earlier
Bug: 161946584
Change-Id: I84324ddd226df0c756d61fc02081dc4bc37f36b1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>