Add notifiers for hotplug and power collapse in perf events.
Preserve counters and user enables across these events.
Disable and enable interrupts across events.
This allows perf-events to be used in an environment where
cores are power collapsing and being hotplugged.
Change-Id: Id27ac3b1c0733677e0bc9740ce7534c3e5fdac7c
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: merge conflict resolution and move changes in
arch/arm64/kernel/perf_event.c to drivers/perf/arm_pmu.c
to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
While porting kryo CPU PMU driver to kernel 4.4, some functionality
got dropped unintentionally. This commit adds the dropped functionality
back. Also, update driver to be compliant to kernel 4.4.
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Enable OPTIMIZE_FOR_SIZE for msmcobalt debug and perf.
defconfigs and also fix one of the warning in the
EDAC driver.
8996 defconfig is also auto-updated during the build.
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Instead of #ifdef, use the IS_ENABLED() macro which correctly
handles if the Kconfig symbol is built-in (=y) or a module (=m).
Also add missing MODULE_LICENSE and MODULE_DESCRIPTION to
f_diag.c to allow building as a module.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
To allow msm_iommu kernel test compilation, add a
iommu_unmap_range declaration and the corresponding stub
function.
Change-Id: If80918cc01afa7d0df2673f4e1962989af26f4bf
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
msm_iommu kernel test has a dependency on
include/linux/msm_iommu_domains.h header file.
Add a snapshot of this file to allow msm_iommu kernel test
compilation.
Change-Id: I2c9b634bdc8a06e51d139fc610c9005d9c93f4ee
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
The function regulator_set_optimum_mode has been changed
to regulator_set_load from regulator code. Also rename
regulator_set_mode_check to follow naming convention.
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
Enable hbtp_input driver to support host based touch processing.
Change-Id: Id56beccb53a0c64210e318a3a0a7f1a8d5d2bc27
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
Signed-off-by: Jigarkumar Kishorkumar Zala <j_zala@codeaurora.org>
Add support for the digital regulator in hbtp_input driver.
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
Change-Id: I315d4b4c985917e55823a3c3951f2bffb20b39e6
Add input driver for virtual mouse feature. The events
are received through ioctls and transfer them through
input framework.
Change-Id: I0842b49ec1c8c6bef3005d9f4419ab15e3abe024
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Port the HBTP Input driver and apply the following driver
changes taken from msm-3.10 kernel branch as of msm-3.10 commit.
31773451 input: misc: add input driver for HBTP
20bf9c5f input: hbtp_input: bypass alphabetical and numeric
key config
e424ee72 input: misc: hbtp-input: add event type in uevents
Change-Id: I122d22cf738c747bcd43ec7f90c33a239288fd9d
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Squash and apply the following touchscreen changes taken from the msm-3.14
kernel branch as of msm-3.14 commit 8139d0b
(ARM: dts: msm: Set flag to manage clks during suspend for msm8996)
421c2f3 input: touchscreen: atmel_maxtouch_ts: delay init call
48e0a07 input: atmel_maxtouch_ts: recover from bootloader
b3ebb61 input: atmel_maxtouch_ts: add support for force cfg update
8467fe3 input: atmel_maxtouch_ts: fix firmware update routines
c83ee59 input: atmel: Secure Touch support
1c7d5e2 input: atmel_maxtouch_ts: fix power up sequence
d4c1ffc input: atmel_maxtouch_ts: add support to ignore CRC
f402790 input: atmel_maxtouch_ts: add support for standard features
9374cef input: atmel_maxtouch_ts: use proper data types
0fbe83e input: atmel_maxtouch_ts: add regulator error conditions
e22d100 input: atmel_maxtouch_ts: add gpio support
63d4b74 input: atmel_maxtouch_ts: add device tree support
575c2fc input: atmel_maxtouch_ts: enable compilation on 3.10 kenrel
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
Add entries so compilation can be chosen for latest
Atmel touchscreen driver.
Change-Id: Ib63a56215e52cc80cb8532c50b16112d39c1e6f7
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
The secure touch ISR and the poll logic in the user space layer is
going out of sync because the completion lock in the driver
is getting released in some corner cases unexpectedly. Clear all
outstanding completions before waiting for one helps fix the issue.
Change-Id: Ia3a6d318330263e7bfd8dfc3cea71c5300ab82b4
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Add reset in resume function to enable touch panel S332U
for MSM8996 DTP.
Change-Id: Id13ee3a8426cbd90692bc8a658f166c79accd7fd
Signed-off-by: Mao Li <maol@codeaurora.org>
Modify the firmware upgrade procedure based on the following requirements:
If config id of the firmware file is greater than the config id in the
device and if packrat id of the firmware img file is greater than the
firmware build id in the device, then during the firmware upgrade
procedure, both firmware and config areas are upgraded. Otherwise,
if the packrat id of the firmware img file is equal to the firmware
build id in the device, then only the config area is upgraded. However,
if the packrat id of the firmware img file is lesser than the firmware
build id in the device, then it is considered as an error.
Similarly, if config id of the firmware file is equal to the config id
in the device and if packrat id of the firmware img file is greater than
the firmware build id in the device, then during the firmware upgrade
procedure, both firmware and config areas are upgraded. Otherwise, if
the packrat id of the firmware img file is equal to the firmware build
id in the device, then no upgrade is needed. However, if the packrat id
of the firmware img file is lesser than the firmware build id in the
device, then it is considered as an error.
This is a propagated patch from 3.10 kernel
commit - d9921ff0ce4024b43837d794cc261b52ae58f776 ,
input: synaptics_dsx_fw_update: modify firmware upgrade procedure
Change-Id: I646d2c04243a30b77d48698cce76e9e183bd6db1
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Update the firmware based on strict config ID versioning, rather than
the entire config ID as a 4 byte number. This will also protect
against config ID major number mismatches and packrat id mismatches.
This is a propagated patch from 3.10 kernel.
commit - 458cbab5c53d5141a66590441f9567d67d580c6f,
input: synaptics_dsx_fw_update: update fw based on config id
Change-Id: I1097585d3bd8b6ab753676dc56f268c7ce52680d
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Add support for reading configuration ID from the touch controller
during probe and print it. This is required to identify if touch
controller is programmed with correct touch firmware or not.
Change-Id: I155f0392ae67e5f9b184b9cef2a7bbb7666be30d
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Parse the panel coordinates before using it for the debug
message.
Change-Id: I6e893b91e9f11cf7d80602058358d8256a96726d
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
This snapshot is taken as of msm-3.14 commit 3bc54cf86b (Merge "msm:
camera: Add dummy sub module in sensor pipeline")
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
The arm64 uapi sigcontext.h can be included by 32-bit userspace
modules. Since arm and arm64 sigcontext definition are not
compatible, add arm sigcontext definition to arm64 sigcontext.h.
Change-Id: I94109b094f6c8376fdaeb2822d7b26d18ddfb2bc
Signed-off-by: David Ng <dave@codeaurora.org>
Enable OPTMIZE_FOR_SIZE for msm-perf_defconfig and
also fix the forbidden warning found during the compilation.
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
It is sometimes useful to profile how long CPU frequency switches
take, and traces have already been added for this purpose. Make
use of these and the trace_stat framework to generate statistical
histograms of frequency switch times in the following format:
# cat /sys/kernel/debug/tracing/trace_stat/cpu_freq_switch
CPU START_KHZ END_KHZ COUNT AVG_US MIN_US MAX_US
| | | | | | |
0 384000 1512000 3 2787 1648 3418
0 486000 384000 1 1129 1129 1129
0 1458000 384000 1 3174 3174 3174
0 1512000 384000 1 3265 3265 3265
0 1512000 486000 1 3235 3235 3235
0 1512000 1458000 1 213 213 213
0 1512000 1512000 1 0 0 0
Profiling is disabled by default (since it does incur some
overhead). It can be enabled or re-disabled echoing 1 or 0
to /sys/kernel/debug/tracing/cpu_freq_switch_profile_enabled
Change-Id: I3ef7f9d681b7bd13bcaa031003b10312afe1aefe
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
It's good security practice to make your executable code read-only. On
hypervisor-enabled targets, this can be trivially accomplished by
removing the writable attribute from all stage-2 mappings of the kernel
text. Add a small library and initcall to do this.
Due to constraints on the hypervisor, this needs to happen before all of
the cores are brought out of reset, so make it an early_initcall.
Change-Id: I2d3ee4ad69402d98f0f6a9078c58e66cd227d222
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Fix some variable initializations which would otherwise cause
forbidden warnings.
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Rather than forcing authors of reverts to truncate the summary line
because the "Revert" prefix added pushes it over the character limit,
excuse reverts from this rule.
Change-Id: I395dfff3327e360ef935d4a685c38df6577e3867
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
There are some very frequently used tags that checkpatch can look
for as an ending to the commit text rather than using a pattern,
which can generate false positives in the "no commit text" rule.
Change-Id: I5b4400017b8273bcd9f5a59b3e28965c0062bef4
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Commit text is almost always necessary to explain why a change is
needed. Exceptions are rare enough that these can be granted through
manual checkpatch overrides.
Change-Id: I926b2276f717940c2fec77a6709fa3088b1bf0c3
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
When patches contain extended character sets, patches will contain
MIME headers after the subject line, which should not be confused
for a too-long summary line.
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 8e6b9d3790595198a34320f1c3f4504cd258fed1)
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Fixed case when no warning generated for long subject line that is
wrapped to more than one line, and all lines are less than line limit.
New warning message added:
"non-blank line after summary line"
Now there are two warnings possible for the subject line, the original
line over limit and the new one. Depending on the error(s) any
combination of the two warnings are possible.
Commit text requirements now:
1) Must be less than 75 characters
2) Must be followed by blank line.
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Warn on summary or commit text lines greater than 75 characters.
The summary and commit text are indented and may wrap on a terminal
if they are longer than 75 characters.
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Currently checkpatch.pl throws error for any use of "dsb"
keyword. Add exceptions when it is used in a variable or a
function name. Expectations are when 'dsb' keyword is used in a
variable or a function name, it is prefixed with class [-_>*\.]
and/or suffixed with class [-_\.;].
Change-Id: I06cd21e42135334bb41cf31f13088b118fcf3ac9
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Current MSM targets continue to use the USB_G_ANDROID composite
driver rather than USB_CONFIGFS.
Change-Id: Iaeab9effcea1276cbe85ebb70f5e7e2c664dccd9
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Android kernel trees include some config fragments of options that are
required to be set or unset. This script compares a specific full
.config with these fragments to determine which configs are possibly
missing. An exemption file for the current msm-3.18 kernel tip is
included with this commit for perf and debug defconfigs. Errors related
to configs in these files are ignored.
Change-Id: I66e65dbc01081921f6695ec626594ec022a3f3c0
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Many systems these days have both python2 and python3 installed. The
unversioned executable `python` may point to either version. Per
https://www.python.org/dev/peps/pep-0394/ , scripts that need Python 2
should explicitly call this out in the shebang line.
These build scripts are both specific to python 2, so call this out in
the shebang line.
Change-Id: I11f70c341e484254dc1679db65c2ed5ac61e510f
Signed-off-by: David Brown <davidb@codeaurora.org>
Bypass forbidden warnings in code coming from upstream in order to
avoid compilation errors with gcc5.
sysrq.c:956:33: warning: array subscript is above array bounds
hci_sock.c:980:8: warning: passing argument 2 of 'hci_test_bit'
discards 'const' qualifier from pointer target type
Change-Id: I5056078112fdc457c424c0f49c4dca70c6b97c29
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
Stop building mdm based defconfigs until all kernel
upgrade issues are resolved.
Change-Id: I988ea872c70d5c6645d52ae9d8abc1e1fcb4ec16
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
This reverts commit 7ebd05ef16.
Our process requires Change-Id lines in our commit text while upstream
considers them to be "noise". Remove the blocking checkpatch error for
having a gerrit Change-Id line in the commit text.
Change-Id: I21c6f0e11ecd94facfc2b9a3bbfee4ed4d39609f
Signed-off-by: Ian Maund <imaund@codeaurora.org>