Doesn't save and restore ETMs state while CPU being offline and
online hot-plug. Since ETM driver can save and restore ETMs state
in hot-plug process. If JTAG driver save and restore ETMs state
as well, there could be some conflicts with ETM driver.
Change-Id: Ib4de3c0e3d0abb4cb15946fc444e0c1fc9188fd1
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
When a secure system heap buffer is freed, the buffer's heap pointer
is changed to the system heap, so that the buffer's pages can be freed
into the secure pools properly. However, the buffer's heap pointer
is not reset back to the secure system heap after the buffer has been
freed.
This is problematic, as the ION buffer tracking code uses the buffer's
heap pointer to figure out which heap's memory accounting stats it has
to decrement when a buffer is freed. In this case, we end up not
decrementing the system secure heap's memory accounting stats, but
instead, decrement the system heap's accounting stats, which is not
correct.
After freeing a buffer's pages, restore the buffer's heap pointer to
the secure system heap, to ensure that the correct heap's accounting
stats are adjusted.
Change-Id: I4ade80660fb5585a2be93be4929db5c534351c2d
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This allows communication with external entities.
It also required fixing up the netlink policy, since NLA_UNSPEC
attributes are no longer accepted.
Signed-off-by: Erel Geron <erelx.geron@intel.com>
[port to backports, inline the ID, use 29 as the ID as requested,
drop != NULL checks, reduce ifdefs]
Link: https://lore.kernel.org/r/20200305143212.c6e4c87d225b.I7ce60bf143e863dcdf0fb8040aab7168ba549b99@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 5d44fe7c9808c56e136e59147bd932f5491520f1)
Bug: 173808904
Signed-off-by: Weilun Du <wdu@google.com>
Change-Id: I6097464f47460c2383e941594c88637446a77dd5
The number of PCIe PARF testbus signals available varies for each
PCIe controller version. In order to capture all possible signals
during a PARF dump, add support to define how many PCIe PARF
testbus selectors are provided.
Change-Id: I4d99df6f61b66cbccc3c5e2e7ce6ab2f89db5669
Signed-off-by: Tony Truong <truong@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>
Add type casting in alloc_trace_locations to avoid build below warning.
mm/slub.c: In function ‘alloc_trace_locations’:
mm/slub.c:6322:27: warning: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
error, forbidden warning: slub.c:6322.
Change-Id: I87e337cc73c36274aaaa8dfd384f3f80f0d2d79d
Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
Add pid and page allocated time in page owner dump.
Change-Id: I8ea2b18c14ad887f49fc7b05174169cc1fbb902e
Fixes: 65b0515874 ("mm, page_owner: record time and pid")
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Avoid returning from slab_sysfs_init if debugfs is off as it is not fatal.
Change-Id: Ice8c26861ad6d6d143e910bb36aeed61dc23cb2f
Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
In case if link fails to transition to L0 trigger inferred link
down recovery to collect RDDM dump.
Change-Id: I43326af34744501c542a1a1e22d6a9b5378c7289
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This patch disables the RIMPS timer based PLL/RAIL trigger
timer in core C4 exit so that it stops the RIMPS from ticking
timer when core C4 exit happen before this timer expires.
Change-Id: I74b3e2222dc3ef5ba0fdebd71b7e86201016fc42
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
Check qcg before dereferencing to avoid NULL pointer
dereference and return if its NULL. This is is to
fix below kw warnings.
ufs-qcom.c:2489: 'qcg' is assigned the return value from
function 'cpu_to_group'.
ufs-qcom.c:2439: 'cpu_to_group' explicitly returns
a NULL value.
ufs-qcom.c:2490: 'qcg' is explicitly dereferenced.
Change-Id: I291c9230bb7fb5df414db8f80bfb17a50c8fc7cf
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
Add support for global clock controller for peripheral
clock clients to be able to request for the clocks.
Change-Id: If68b92b5f599c06412434dacb0e438e5d8aaa5f5
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Update bits for switch ctl in reg notifier so that
after PDR euro headset is detected as US and playback dosent
get paused on headset.
Change-Id: I02639b2c1db64bea03c0bb0696568a3aa9275b01
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
wake up wait_event_interruptible_timeout after receiving
acknowledgment from viewer.
Change-Id: I8d80b72ccfcfcb97a59185a35bb2824fe105198c
Signed-off-by: rbandi <rohitbandi@codeaurora.org>
If PCIe link is down, skip setting wlaon_pwr_ctrl registers to avoid
unclocked access.
Change-Id: I156f936ad87089754d6644d2eb3199105065ee32
Signed-off-by: Yue Ma <yuem@codeaurora.org>
The previous commit d378aeae512d ("usb: gadget: f_accessory: avoid
requeuing write req if disconnected") added a check for
dev->disconnected during write operation, but incorrectly
inverted the value, thus it fails when connected. Fix the polarity
of this check.
Change-Id: I447871d054e35a9d21eb9e55087facfbf7701dd5
Signed-off-by: Jack Pham <jackp@codeaurora.org>
There is a race condition when a write operation is blocked
waiting for an available request and the function is disabled
due to disconnection or reset. usb_ep_disable() is called from
acc_function_disable() and causes the UDC to call the pending
requests' completions, which will wake up the writer thread and
proceed to call usb_ep_queue() before the endpoint is fully
disabled. The UDC driver may not handle this and could allow
the request to be requeued inadvertently. In DWC3's case, this
allows the HW to attempt a transfer with stale TRBs that point
to invalid DMA buffers.
Let's ensure the function driver acts as a good citizen and handle
it by moving the check for dev->offline || dev->disconnected to
after the wait_event to make sure the endpoint is enabled before
attempting to queue another request.
Change-Id: I1aa005e0c1e3ed1e1d814ff79496b70fdb401571
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add dbg_state sysfs to facilitate trace instance to be enabled
only on debug flavor builds.
Change-Id: I6524e6184e2a81b2e39b0f0338e4d8a9b7989542
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Enable USB PD config flag on sdxlemur to add
PD support.
Change-Id: If7a91abb4c6d1b0f368a931c9c686012a310eb99
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Calling SSR unregister for other peripherals from glink_ssr device remove
call back results in deadlock if multiple SSRs happens in parallel.
SSR unregister is defer to other worker to avoid notifier SRCU deadlock.
Change-Id: Ifa5c461201eec4b4beb8bf405bd0a2904a2cc90f
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
Get kernel time during start and end of map create
to keep track of time taken to create map. The time
variables are added as member of map struct. Same
time variables are added for buffers also.
Change-Id: I6454f5b60bec1a24a43ea1b7539ec45ba5358f2e
Acked-by: Ekansh Gupta <ekangupt@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
There is potential issue where uninitialized variable can be
used, so fix it.
Change-Id: If725b7efc2979889415da2673c68d4be71e41631
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Add clock ids for GCC/DISPCC/GPUCC for clients to be able
to request for clocks from these clock controllers for
monaco.
Change-Id: Ie09a5a7a5fd1101fb863e836a0e554198e699511
Signed-off-by: Saurabh Sahu <sausah@codeaurora.org>
Avoid race condition between soc wake release from queue
context and host driver context.
Change-Id: I6e20a9a8781f65447e89160ff4e362a04ec4ec5c
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>