Add GPIO pins that are routed to PDC interrupt controller and can be
used as wakeup capable GPIOs.
Change-Id: If2044dfe89f7593ee3a6fd843866d4f86f3f42a6
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
With active-mode memory offlining, it would be helpful to track the
total Online and Offline times of each blocks and determine percentage
of time they have been in that state.
This patch adds the below additional stats:
- current state of each blocks.
- total Online and Offline time of each blocks.
- percentage of total system runtime that blocks were in Online
and Offline state.
- total overall percentage of time all blocks were in Online
and Offline state.
Also, change the sysfs node from 'perf_stats' to 'stats'.
Change-Id: Ie18ad68194df8c7702dc496821c4f680d15486ce
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
With charger mode enabled in android, device boots into charger
mode when it is powered on with USB insertion. In this mode,
health HAL and charger service handles the power supply uevents
sent from power supply framework to take certain actions. For
example, when the USB or travel adapter (TA) is removed, device
would shut down in 10 seconds.
With a TA connected, device can enter suspend whenever possible
during charging. When the TA is removed after the device has
entered suspend, device comes out of suspend upon the notification
received from charger firmware (CHGFW) over PMIC Glink. Battery
charger driver handles this and calls power_supply_changed on one
of the power supply devices. However, before this uevent is
received and handled by charger service in the userspace, device
can enter suspend immediately.
In a low power discharging state, device stays in this state for
minutes until it gets another notification from CHGFW for battery
power supply, a periodic event which makes charger service to
initiate a shutdown. This conflicts with the user expectation
where the device has to shutdown in 10 seconds upon TA removal.
Workaround this problem by keeping the device awake for at least
50 ms when a notification is received from CHGFW. This way,
userspace process like charger could get a chance to receive and
handle the power supply uevents.
Change-Id: I9ea78eb6565988ffac0e6c5eee1ccae8dc7e3e3a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Some USB function driver (e.g. mass storage) performs USB endpoint enable
and disable functionality from worker thread context instead of composite/
controller work context. This may result into endpoint enable/disable
racing against USB controller low power mode functionality with USB cable
disconnect. This race may result into unclock register access. Hence fix
this issue by checking USB controller status and perform resume/autosuspend
with endpoint disable whereas return -EINVAL with endpoint enable if USB
controller is suspended (in low power mode).
Change-Id: I76cd75fc90b52ceefe099f48be6c880c04136301
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
If minidump is configured to be ELF32, avoid using complete
ramdump property, so that only the required segments area is
dumped.
Change-Id: I34fe359204309fda47d0a665ca641cb042d87054
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
The iommu driver is responsible for enabling the required clocks
for map/unmap operations, not clients.
For the fastmap case, clocks are theoretically left enabled forever
after the initial attach, although in practice this does not occur
because there are no clocks required for Apps smmu.
Change-Id: Ibdfced1f62c79fbb3234d80bc9c65808d818c27a
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Deprecate this option in favor of CONFIG_ARM_SMMU_SELFTEST
Change-Id: Ic5014c4bef9bb3d509bef20443281f1b57612096
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Fastmap uses the same page table format as arm_lpae_s1_cfg,
so they can share the same data structure format. Additionally,
arm-smmu.c *assumes* that struct arm_lpae_s1_cfg is in use.
This has not caused any issues so far because the formats of
av8l_fast_cfg and arm_lpae_s1_cfg are sufficiently similar.
Change-Id: I93dc42f82d988318af35125df3a5fa0739ebae6a
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Enable ZRAM, as well as slub freelist randomization.
Change-Id: I15f248b4ac11353c90b8bb4d60073ce033357f64
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Enable the ion memory manager, which allows both kernel and
userspace clients to allocate buffers from specific memory regions.
Change-Id: Ie583cbf6b8836e1b4459bcd27399a965384d6a52
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Enable the ARM smmu driver, and its associated debugfs.
Change-Id: I6249b155a02299d6e5e3b6da807d7936c5f89736
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
It is needed for many UFS devices, so build it in so that devices can
boot properly :)
Bug: 162046707
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3c8d57dafbf985533e7d5b0977aaa8155cc34cf3
Update the ABI snapshot version with the release of the new feature in
libabigail which also does CRC checks.
Change-Id: I0112a733015f608d53351c96a56f86e9086aee76
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Add a new property, to dump minidump ELF in ELF32 format,
as some subsystems do not support the default format,
which is ELF64.
Change-Id: I87bc46097b4dfc0be44f0904823c5e88c476c86b
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Incfs's magic is bigger than 32-bit, but super block structure's
s_magic is unsigned long which is 32-bit in ARM 32-bit platform.
Do the cast for magic!
Bug: 159772865
Signed-off-by: Peng Zhou <Peng.Zhou@mediatek.com>
Signed-off-by: mtk81325 <peng.zhou@mediatek.com>
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Iae4f38774440c7d6ae44529d4f0f8ebb2ec5dacc
Add support to print the perf state, pstate status and cycle
counter status registers for various frequency domain and notifier
to print cpufreq hardware debug registers during crash.
Change-Id: I043f5a29869f505adf49e6adb62035ceb04d810a
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
Some targets have RPM than RPMh controllers where the message format to the
controller is different.
Add support for it.
Change-Id: Icb1056badac7ef17df2a52a5f725d9f8aa96503e
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[guptap@codeaurora.org: resolve trivial merge conflicts.]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Add support for hot plug detection when memshare driver
is dynamically loaded.
Change-Id: I2f875c06778e4be9ffce234cec48f8fd4b4491a8
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Hook into preemptirq trace points and print the call stacks of
scenarios where preemption/irqs is disabled for more than
a use configured threshold. The threshold tunables are available
under /proc/sys/preemptirq directory. All the units are in nano seconds.
The following commands can be used to enable the trace. The stacktrace
trigger prints the stacktrace when the trace event is printed.
echo 1 > /d/tracing/events/preemptirq_long/enable
echo stacktrace > /d/tracing/events/preemptirq_long/preempt_disable_long/trigger
echo stacktrace > /d/tracing/events/preemptirq_long/irq_disable_long/trigger
Sample output is copied below. Note that this format works with both systrace
and commandline ftrace utilities.
init-1 [005] d..2 187.905211: irq_disable_long: delta=15244480(ns)
init-1 [005] d..3 187.905216: <stack trace>
=> test_irq_disable_long
=> trace_irq_enable_rcuidle
=> trace_hardirqs_on
=> console_unlock
=> vprintk_emit
=> devkmsg_emit
=> devkmsg_write
=> do_iter_readv_writev
=> do_iter_write
=> do_writev
=> __arm64_sys_writev
=> el0_svc_common
=> el0_svc_handler
=> el0_svc
kworker/u16:4-419 [000] .N.2 187.905221: preempt_disable_long: delta=4923646(ns)
kworker/u16:4-419 [000] .N.3 187.905226: <stack trace>
=> test_preempt_disable_long
=> trace_preempt_enable_rcuidle
=> trace_preempt_on
=> preempt_count_sub
=> perf_event_read
=> __perf_event_read_value
=> perf_event_read_value
=> memlat_monitor_work
=> process_one_work
=> worker_thread
=> kthread
=> ret_from_fork
Change-Id: If87a8d65359632b93da10b691e9b83e37000aeb3
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This patch adds the logic to enable the RIMPS timer based
rail-pc trigger functionality. This patch programs the RIMPS
timer when each core of corresponding clock domain entering
into the rail-pc LPM and enables the RIMPS timer feature so
that RIMPS allows to turn off rail/PLL based on the timer
threshold and timeout values.
Change-Id: Ib3589933d339a7224147a7c7afc006f260d8205b
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>