Start confirming to arm,idle-state compatible definition. In addition to
being compliant, this allows us to use the new API to setup the PSCI
cluster state ids for the CPU, before entering the idle state.
Let's do the following:
- Rename enter/exit latency, residency, label properties
- In addition to qcom,psci-cpu-mode specify
arm,psci-suspend-param.
- Update copyright
Change-Id: I3930fce9788e8be1e43e0e7c9ff247df2ec23f55
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
This is a snapshot of the Sleep driver and related functionality as of
'commit b252df6e0200 ("cpuidle: lpm-levels: log enabled regulators
before entering suspend")' on msm-4.19 branch.
Updates:
- Remove event timers
- Remove per-cpu PM QoS
- Remove rpm stats (Use new soc_sleep_stats driver instead)
- Update __arch_counter_get_cntvct (new)
- Update to get next wakeup from cpuidle device
- Remove pending_ipi and is_IPI_pending() (defined in smp.c)
- Update copyright
- Update Kconfig menu items
- Update hotplug enum to use the already upstreamed
- ifdef's around scheduler functions that are not upstreamed
Change-Id: I75336ec927932d93c0c193a20973fc84e3b05ff5
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Knowing the path of which heap stats debugfs file was not
created is not any more useful than simply knowing that
the heap stats debugfs file could not be created for a
specific heap. Thus, only print the name of the heap and
debugfs file that could not be created.
Change-Id: I177a49cdb5117996971cae626d65ef9cb75c83d8
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Add cancel signaling status for the synx object. This
can be used by the clients to signal cancellation to
other clients waiting on the synx object and helps
distinguish from any error occurred during signaling.
Change-Id: Idba21d364c2306ef65d53ae6728da8a49131605d
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
For NCM gadget function, net device structure opts->net
will be freed when NCM unbind, but user space related
device node doesn't know it, will access net structre
without checking it exist or not, leading to potential
use-after-free.
Fix this by adding check gadget function bind or not.
Change-Id: I6af9e3868f71e7fa923600721e1f716508de9b55
Signed-off-by: Liangliang Lu <luliang@codeaurora.org>
ARM_SMMU_STATS_SYNC_INV_TBU_ACK has been made accessible to HLOS 1, read
it's value directly instead of making an SCM call to retrieve it.
Change-Id: I34f5d18e9a5bdee6857f2398974257a49b1f54fb
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
It may be useful to debug how much time is spent in the
DWC3 hard IRQ context. Add low-overhead statistics counters
which keep a histogram of the last 10 interrupts' time of
occurrence, time spent, and number of events read (which will
get processed in the bottom half handler).
Change-Id: I466144d8141f4236b9fb834dded93225b56d0422
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This change adds debug support to log all received different
events with endpoint0, other endpoints and gadget events. It
tracks these events per endpoint and displays the same.
For each of the endpoint event counters, add the rate (in Hz)
at which it occurs in order to better analyze performance and
aid in optimization.
How to use:
- Mount debugfs
- To see received all dwc3 events/interrupts
cat /sys/kernel/debug/<base_address>.dwc3/int_events
- To clear all received dwc3 events/interrupts
echo 0 > /sys/kernel/debug/<base_address>.dwc3/int_events
Change-Id: Ibf5f3ee57f69c87f94f55a58f50792075be24fbb
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This change creates separate debug buffer with each DWC instance and
provides debug API to log different important events using IPC
logging framework.
CRs-Fixed: 1040809
Change-Id: I9aee21a99f5bcd0e82e81092c05bc2238863f5e4
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
[jackp@codeaurora: since debug.c is gone, added debug_ipc.c]
Signed-off-by: Jack Pham <jackp@codeaurora.org>
XHCI allows interrupt moderation using imod_interval at 250ns
increments. Add DT parameter to specify this imod_value for
targets mainly with single CPU to reduce CPU interrupt loads.
This allows better balance between CPU usage and performance.
CRs-fixed: 1019219
Change-Id: Id479c162da6492caff4dd83de4054fee63b6abc5
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Default 0 value for IP_GAP_ADD_ON field of DWC3_GUCTL1
register is causing failure of EL_23 test. This value
corresponds to inter-packet gap of 182.163 ns. Increase
the value to 1 which corresponds to 199.794 ns. This
improves margin required to pass the test.
Change-Id: Iabc71a746ac90251eaec25597d8506df416796a5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
There was an update to add a device parameter into
wakeup_source_register().
Fixes: c8377adfa7 ("PM / wakeup: Show wakeup sources stats in sysfs")
Change-Id: I2c17f4c8c80cfb16d85da0ff268e5a75e2d0bcad
Signed-off-by: Chris Lew <clew@codeaurora.org>
Switch over to functional interconnect drivers.
Change-Id: I20191b6016839fffac1bf5f4f9f1132d956daf24
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Fix up le32 and le16 to int errors when converting from
le types to cpu.
Change-Id: I45b267195210a6ec4f2a4175eddcc541ec081043
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Add bcm voter driver and add support for RPMh specific interconnect
providers so that they may be re-used for icc-next RPMh based provider
drivers.
Change-Id: I6b0db857ed0724dec0386a9961b3a0b8e676efbd
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Aid debugging by reporting the BID, PID and MID of a transaction during a
context fault, in order to identify the master that initiated the fautling
transaction.
Change-Id: I2bed2b472a754f13bf85e3b576f0bf079d9d5541
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Add cma and migrate trace events to enable CMA allocation
performance to be measured via ftrace.
Change-Id: I1e471e9e21f1a14ce2ed167d8515ccb5f83eb88c
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Ensure that shrinkers are given the option to completely drop
their caches even when their caches are smaller than the batch size.
This change helps improve memory headroom by ensuring that under
significant memory pressure shrinkers can drop all of their caches.
This change only attempts to more aggressively call the shrinkers
during background memory reclaim, inorder to avoid hurting the
perforamnce of direct memory reclaim.
Change-Id: I8dbc29c054add639e4810e36fd2c8a063e5c52f3
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Enable CONFIG_VM_EVENT_COUNTERS on Lahaina to display
VM statistics and information.
Change-Id: I4aad05fe089704026885ca01bafff5dcdbc09a87
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
When the oom starts killing processes, it's useful to
be able to see the state of unaccounted memory in the system. Call the
showmem notifier to get other clients to dump out their state.
Change-Id: Id32ff6d6747fee7d0889447323ddce25282e93f6
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
[swatsrid@codeaurora.org: Fix trivial errors and merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
[isaacm@codeaurora.org: Fix trivial merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Retry the cma alloc only when alloc_contig_range returns
-EBUSY. This avoids unnecessary retries when the heap is
full.
Change-Id: If4626f0a0bc14e4b3a500283eb5a4c33b78fb6f2
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
If a particular cma region has lesser free blocks then
increase retries to avoid allocation failure due to page
being temporarily busy.
Change-Id: I92021fd75315b266a978f7a5b0235344c800cba2
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Register with the show_mem notification framework
to let cma dump out data for debugging.
This is an example output with this patch.
cma: cma-0 pages: => 0 used of 2048 total pages
cma: cma-1 pages: => 0 used of 23552 total pages
cma: cma-2 pages: => 1696 used of 3072 total pages
cma: cma-3 pages: => 8277 used of 9216 total pages
cma: cma-4 pages: => 186 used of 5120 total pages
cma: cma-5 pages: => 3792 used of 8192 total pages.
Change-Id: I80d9291444fd9361f5586bdf60373ed8b5b41705
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
[<swatsrid@codeaurora.org: Fix trivial errors in commit text]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
[isaacm@codeaurora.org: Fix trivial merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Port support from 3.10 for retrying cma allocations
to 3.18 to help resolve cma allocation failures.
It was observed that CMA pages are sometimes getting
pinned down by BG processes scheduled out in their exit
path. Since BG processes have lower priority they end up
getting less time slice by scheduler there by consuming
more time to free up CMA pages.
Also when a process is being forked copy_one_pte
may create copy-on-write mappings, when this is done
the page _count and page _mapcount are each
incremented sequentially. If the process is context
switched out after incrementing the _count but before
incrementing the _mapcount then the page will appear
temporarily pinned.
So instead of failing to allocate and directly
returning an error on the CMA allocation path we do 2
retries, with sleeps, to give the system an opportunity
to unpin any pinned pages.
Change-Id: I022a9341f8ee44f281c7cb34769695843e97d684
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[isaacm@codeaurora.org: resolve merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
With the swap slots feature, the freeing up of swap space
during the mm reap (kill or oom reap for e.g.) is delayed
till a threshold is reached. This is done mainly to reduce
the fragmentation of swap space. The caching is done per
cpu. But with zram, this causes zram space consumed not
being free up immediately on task kill or oom reap. Since
we don't use THP swap, fragmentation is not a concern. So
free up the slots without caching when the swap device is
a synchronous one. Note that this does not disable the swap
slots feature which can take into effect during swap slots
allocation.
Change-Id: I9985edfdd88723d38ae905496556e07fb8bf09af
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
[swatsrid@codeaurora.org: Fix merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>