QDSS components depend on "CONFIG_CORESIGHT", so enable it.
Enable "STM_PROTO_BASIC“ to support to write log to /dev/coresight-stm.
Change-Id: Ib8770c9a5c72abe718c814766a0e2d9f4e091524
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
Memlat and compute governors are made immutable to avoid governor
switch at run time as the devices using these governors are tightly
coupled with hardware features. These governors allocate pmu counters
to count various events used in the algorithm. These counters are
allocated exclusively for algorithm's use.
This leaves limited counters available for other uses in the system
such as profiling in user space using perf tool. Add and export a
function in devfreq memlat governor to remove immutable flag to allow
governor switch, which in turn can free pmu counters.
Similarly add and export a function in rimps_memlat driver to
free pmu counters.
The intended use of these functions is to be called by test modules
to allow freeing of pmu counters at runtime.
Change-Id: I243a3201368d5a82aeaf820e775cdc1aecdfea07
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Discard character printing in ipc log buf when get_next_logbuf()
returns count value less than the size argument.
Change-Id: I0ba388400c76c16da423a2ccb67d961ed31e87b4
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
set_event will return NULL if event_id is not valid, the
caller is proceeding further without proper check for NULL.
Update pmu event setup function to check pevent for NULL.
From the RIMPS perspective, pmu counter IDs 0 and 1 correspond
to 64bit cycle counter with ID 0 representing low 32 bit and
ID 1 representing high 32bit, while the counter IDs from 2 to 7
correspond to remaining PMUs. At the time of storing pmu counter
values to RIMPS shared memory, the function store_event_val()
stores both low and high 32bit values of cycle counter when ID 0 is
passed as argument to pmu index, hence no need to handle ID 1
separately. Update logic accordingly to drop check for ID 1.
Change-Id: Idd345c825572710753f18306f565043347921216
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Update master and slave ID constants for all Qualcomm Technologies, Inc.
Yupik interconnect providers which consumers can use to set bandwidth
constraints and find paths in the NoC (Network-On-Chip) topology.
Change-Id: I0deffed7d8c08d5921cd54b396fa7daad673550e
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Commit 3bb697514e ("usb: dwc3: Add support for nominal
elastic buffer") breaks working of current 5.4 kernel
based targets by clearing elastic buffer which is not
expected. Hence revert the change.
Change-Id: I3a492289eea1cb728c2e16ea1b991862d2219bbe
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
If we want to disable clocks but still keep the link active, both
ref_clk and core_clk_unipro should be skipped.
Commit 284fa080cb5f ("scsi: ufs: fix broken hibern8_on_idle sysfs
nodes") is the original change from msm-4.14. We pick it up to msm-5.4
due to upstream missed this change. To follow GKI policy on 5.4, we
simplifed it and kept parameters name to avoid breaking ABI.
Change-Id: I5f86775c150e495322d14ec57ebf76a710257931
Signed-off-by: Ziqi Chen <ziqichen@codeaurora.org>
Use the exported function instead of kallsyms_lookup to get
log_buf size, this can save a lot of time during boot up.
Change-Id: I99fe49e9f014c0a4bb16162d836c38e31236e8ea
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
IRQ workqueue handler should be initialized before irq register,
or that when irq was triggered, could lead a crash.
Change-Id: If5551f622ae58a75ae655d4752bb397af0a00f98
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
In older kernel target we had ICB and it use to take input
in BCM units for QUP core path, whereas in recent kernel we
have ICC for BW NOC voting and it accept input in KHz.
So correct unit for ICC optimization code.
Change-Id: Ia6c88dbd328dad1ff96c6c7ffd22c93db942d509
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
cnss2: Increase mhi timeout in debug builds to 30sec from 10sec
for firmware download. Once MHI power On is done then the
timeout is reverted to default 10sec.
Change-Id: Ib18cda6da612d37e69cc6f1fee169f01d994daaa
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
There is a race during page offline that can lead to infinite loop:
a page never ends up on a buddy list and __offline_pages() keeps
retrying infinitely or until a termination signal is received.
Thread#1 - a new process:
load_elf_binary
begin_new_exec
exec_mmap
mmput
exit_mmap
tlb_finish_mmu
tlb_flush_mmu
release_pages
free_unref_page_list
free_unref_page_prepare
set_pcppage_migratetype(page, migratetype);
// Set page->index migration type below MIGRATE_PCPTYPES
Thread#2 - hot-removes memory
__offline_pages
start_isolate_page_range
set_migratetype_isolate
set_pageblock_migratetype(page, MIGRATE_ISOLATE);
Set migration type to MIGRATE_ISOLATE-> set
drain_all_pages(zone);
// drain per-cpu page lists to buddy allocator.
Thread#1 - continue
free_unref_page_commit
migratetype = get_pcppage_migratetype(page);
// get old migration type
list_add(&page->lru, &pcp->lists[migratetype]);
// add new page to already drained pcp list
Thread#2
Never drains pcp again, and therefore gets stuck in the loop.
The fix is to try to drain per-cpu lists again after
check_pages_isolated_cb() fails.
Change-Id: I7d9b42fdbf436458242385f795126e42294562b1
Fixes: c52e75935f ("mm: remove extra drain pages on pcp list")
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200903140032.380431-1-pasha.tatashin@soleen.com
Link: https://lkml.kernel.org/r/20200904151448.100489-2-pasha.tatashin@soleen.com
Link: http://lkml.kernel.org/r/20200904070235.GA15277@dhcp22.suse.cz
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-Commit: 9683182612214aa5f5e709fad49444b847cd866a
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>