Commit Graph
21 Commits
Author SHA1 Message Date
jixj 2393e1a657 utag: Enlarge buffer size to fill full workqueue name
The workqueue actual name is "config_load" and "config_store" and they
are over 10 characters hence name is truncated to 10 characters.

Change-Id: Ie9e4fea1b42df337710d00ee5af0dfa21453f50e
Reviewed-on: https://gerrit.mot.com/2446612
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2022-11-30 19:39:56 -06:00
jixj 2e56ea884d Integrate mmi_device_is_available() into mmi_check_dynamic_device_node()
mmi_check_dynamic_device_node() uses of_find_node_by_path() to get device
node so that mmi_device_is_available() can use this node to find where is
"mmi,status".but need use of_node_put() to put this node in there drivers.
So move "mmi_device_is_available()" into "mmi_check_dynamic_device_node()"
and put the device node at the end.

Change-Id: Id42e73b844ef6928ebea673dcd7f9c57c8804f8b
Reviewed-on: https://gerrit.mot.com/2271017
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2022-05-19 20:02:02 -05:00
jixj f1c46d33ce mmi_info: Add missing of_node_put()
of_find_node_by_path() returns a node point with refcount
incremented and need use of_node_put() to decrement refcount

Change-Id: Ib1cbdc4c40b1ea5e9bfc1c5d02ddd231185a42b1
Reviewed-on: https://gerrit.mot.com/2269870
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2022-05-19 20:01:48 -05:00
jixj ab3a836a04 utags: Free allocated memory when rmmod utags.ko
These two memory are allocated when driver probe, and need free
them to avoid memory leak.

Change-Id: I0a875043e73598baca0436620c26c41750b8ce17
Reviewed-on: https://gerrit.mot.com/2261525
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2022-05-09 20:58:31 -05:00
jixj f28c86729f utags: Free the device name buffer when rmmod utags.ko
If the device name can be expanded, it will allocate a buffer to store expand
name, so need free it when removing.
If not expand, it will keep use buffer getting from "of_property_read_string"
and this buffer can not free on our driver, so allocate a new buffer for it.

Change-Id: Id1c18ac7caae426319813f48d1a67366216fe630
Reviewed-on: https://gerrit.mot.com/2261463
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2022-05-09 20:58:21 -05:00
jixj aaa2820ec1 utags: Use bio to replace kernel_read and write API
GKI2.0 doens't allow to export kernel_read and kernel_write api,
so use regular bio intefaces to read and write utag block device.

Ugprade products which kernel is 5.4, can use the BIO to replaced
kernel_read/kernel_write block device interface with kernel config
CONFIG_MMI_UTAG_RW_BIO.

Change-Id: I74780733c05ae6d992d3ae07dc33bd1e352590d8
Signed-off-by: xizx <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/2056920
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Submit-Approved: Jira Key
2021-09-22 19:37:17 -05:00
jixj 605998546f build: Only include modules needed by product
It takes long time to include all DLKM's makefile even if the
product does not need this module.

Time of "make bootimage" on user build:
- without change: 23 mins
- with change: 9 mins

Change-Id: Icf0cd01b318a17457336dc7627cbf1ab3a8c78b8
Reviewed-on: https://gerrit.mot.com/2057699
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-09-09 21:54:53 -05:00
jixj e5d5b0953c mmi_sigprint: Fix CFI check failure
Kernel changes the signal callback function parameter
from "sigifno" to "kernel_siginfo" on kernel-5.4

change:
ae7795bc6187 signal: Distinguish between kernel_siginfo and siginfo

Change-Id: If120a520bc949b354855f804fcfb3fca97224f47
Reviewed-on: https://gerrit.mot.com/1828677
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-17 01:44:58 -06:00
jixj 6e9ed15514 mmi_sigprint: Use a new way to get kallsyms_lookup_name()
kallsyms_lookup_name() is not exported on kernel5.4,use register_kprobe()
to get kallsyms_lookup_name().
Also fix path incorrect issue on Android R.

Change-Id: I5e0fb8c3bd7a14c5bb8316635261f411c5952577
Reviewed-on: https://gerrit.mot.com/1820763
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-08 03:56:10 -06:00
jixj 669ca8d8d6 qpnp-power-on-mmi: fix build error on user build
"kernel_halt" is not in Google's GKI whitelist, add modules.symvers of
QGKI to fix build error on GKI build.
This module is no must in GKI, it doesn't matter that fails to load

Change-Id: I77c89c1236bcd2352b85b69e180687744e1f59b4
Reviewed-on: https://gerrit.mot.com/1807425
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-11-20 04:09:37 -06:00
jixj 69539ee2e0 Revert "(CR): utags.ko: solve the unused remove_proc_subtree symbol definition"
This reverts commit ad7449af9ac7fd5418a6eb0462b74633b2f1dcca.

It is not needed anymore because remove_proc_subtree has been added to
GKI whitelist

Change-Id: Ic1cf38cfe215357b958de509f9bbf6e80116f564
Reviewed-on: https://gerrit.mot.com/1788234
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2020-10-29 03:09:09 -05:00
jixj 3396f59b2f Revert "(CR): utags.ko: force this module unloadable"
This reverts commit 298e2347dfc445415663afbfc2ff1e8e7053a905.

It is not needed anymore because remove_proc_subtree has been added to
GKI whitelist

Change-Id: Ieee190e012ab338b613c81358298a86443d6944b
Reviewed-on: https://gerrit.mot.com/1788233
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2020-10-29 03:09:04 -05:00
jixj c5ebfbf74d watchdogtest: add qcom_wdt_trigger_bite for trigger wdog
Qcom introduces new watchdog architecture on 4350/8350, so use
"qcom_wdt_trigger_bite" to trigger wdog when enable CONFIG_QCOM_WDT_CORE

Change-Id: Ide2ccb0e5a498454359fd6544e832f109251df5c
Reviewed-on: https://gerrit.mot.com/1782962
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2020-10-28 20:37:29 -05:00
jixj f2c049533f mmi_info: export API for dynamically match mmi device
After flashing GKI, https://gerrit.mot.com/#/c/1439246/ is not available.
Export API to match "mmi,status" rules, the other modules can use this
API to check if driver is available at the begining of probe() function.

Change-Id: I58413e071e32b82037c72c688a7bbbadce28007c
Reviewed-on: https://gerrit.mot.com/1772580
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-10-18 20:32:10 -05:00
jixj b6e534ecf9 utag: free the buffer when failed to open utag
When fail to open utag, the alloc buffer will not be free to cause
memory leak

Change-Id: I9f77a4528513ddfb512f3183f067988ffa9870a9
Reviewed-on: https://gerrit.mot.com/1733773
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-08-27 23:34:25 -05:00
jixj ef8a1cb701 utag: report the return value of store_utags() to userspace
If store worker failed to store utag, report the failure to userspace so
that userspace can deal with it accordingly

Change-Id: I1ba9635b776fca1b27ab672a06df4a823e926684
Reviewed-on: https://gerrit.mot.com/1733628
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-08-27 22:59:53 -05:00
jixj b554de9724 watchdogtest: replace msm_trigger_wdog_bite()
use kallsyms_lookup_name("msm_trigger_wdog_bite") to get
"msm_trigger_wdog_bite" address instead of exporting from
kernel and no need port to kernel every platform

Change-Id: I314d552f480baed0fa418afcf7a80134c69867de
Reviewed-on: https://gerrit.mot.com/1534039
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-04-15 20:47:24 -05:00
jixj 176d2f2dc0 mmi_sigprint: add death signal debug feature driver
Move death signal debug feature driver from kernel to DLKM.
Ported from (CR)

Change-Id: Icbab4faaa58710a6f99433db7807cc175e5f38d8
Reviewed-on: https://gerrit.mot.com/1519314
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2020-03-25 20:54:06 -05:00
jixj 8c6e814168 watchdog_cpu_ctx: don't show raw stack info if offset is a negative value
In some case, the low 15 bit of sp_el1 is less than 128 and offset is a
negative value, causing stack+offset is a invaild point.

[ 5.021619,4] watchdog offset=-128, regs>sp_el1=0xffffffc0f1ae0030,sp=0xffffffc0e8ffc030, stack=0xffffffc0e8ffc000
[ 5.021856,4] Unable to handle kernel paging request at virtual address ffffffc0e8ffbf80
[ 5.021867,4] pgd = ffffffc0e79a1000
[ 5.021877,5] [ffffffc0e8ffbf80] *pgd=0000000000000000, *pud=0000000000000000
[ 5.021928,4] -----------[ cut here ]-----------
[ 5.021938,4] Kernel BUG at ffffff804c405490 [verbose debug info unavailable]
[ 5.021948,4] Internal error: Oops: 96000007 1 PREEMPT SMP
[ 5.021958,4] Modules linked in: watchdog_cpu_ctx(O+) tzlog_dump(O) mmi_info(O) mmi_annotate(O) sensors_class(O) watchdogtest(O) utags(O) exfat(O) machine_ext_dlkm(O) machine_dlkm(O) wcd9335_dlkm(O) cpe_lsm_dlkm(O) wcd_cpe_dlkm(O) analog_cdc_dlkm(O) digital_cdc_dlkm(O) stub_dlkm(O) mbhc_dlkm(O) wsa881x_analog_dlkm(O) wsa881x_dlkm(O) wcd9xxx_dlkm(O) wcd_core_dlkm(O) hdmi_dlkm(O) swr_ctrl_dlkm(O) swr_dlkm(O) pinctrl_wcd_dlkm(O) native_dlkm(O) platform_dlkm(O) usf_dlkm(O) q6_dlkm(O) adsp_loader_dlkm(O) apr_dlkm(O) q6_notifier_dlkm(O)
[ 5.022044,4] CPU: 4 PID: 454 Comm: modprobe Tainted: G O 4.9.112+ #16
[ 5.022054,4] Hardware name: ocean (DT)
[ 5.022064,4] task: ffffffc0e78aae80 task.stack: ffffffc0e8fd0000
[ 5.022082,4] PC is at msm_wdt_show_raw_mem+0x158/0xcc8 [watchdog_cpu_ctx]
[ 5.022096,4] LR is at msm_wdt_show_raw_mem+0x150/0xcc8 [watchdog_cpu_ctx]
[ 5.022105,4] pc : [<ffffff804c405490>] lr : [<ffffff804c405488>] pstate: 60400145
[ 5.022115,4] sp : ffffffc0e8fd3830
[ 5.022124,4] x29: ffffffc0e8fd3830 x28: ffffff804c406460
[ 5.022146,4] x27: ffffff804c406478 x26: ffffff804c4063f0
[ 5.022167,4] x25: ffffff804c4063f8 x24: ffffffc0e8ffbfa0
[ 5.022188,4] x23: ffffff7fffffffff x22: 0000000000000000
[ 5.022209,4] x21: 0000000000000204 x20: 0000000008ae4000
[ 5.022229,4] x19: ffffffc0e8ffbf80 x18: a522d3ce044520af
[ 5.022250,4] x17: 0000000000000004 x16: ffffffc0f1ae8858
[ 5.022271,4] x15: ffffffc0e78aaf80 x14: 3d455a49535f4441
[ 5.022292,4] x13: 45524854202c3631 x12: 0000000000040900
[ 5.022312,4] x11: ffffffc0e8fd3580 x10: ffffffc0e8fd3580
[ 5.022333,4] x9 : 0000000000000004 x8 : ffffff804f392090
[ 5.022354,4] x7 : 0000000000000000 x6 : 0000000004467999
[ 5.022374,4] x5 : 0000000000000015 x4 : 000000000013c571
[ 5.022395,4] x3 : 0000000000000000 x2 : 0000000000040900
[ 5.022416,4] x1 : 0000000000040900 x0 : 0000000000008000

Change-Id: Id980828162f807e437ff67f3bb1fa2b17de4a425
Reviewed-on: https://gerrit.mot.com/1276251
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2018-12-03 19:16:08 -06:00
jixj 16024815e4 watchdog_cpu_ctx: Add 32bit support
Change-Id: I9d1c9f561bd64ac9ec120b747b50993b6cc90804
Reviewed-on: https://gerrit.mot.com/1216713
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Submit-Approved: Jira Key
2018-08-15 20:33:31 -05:00
jixj 664d87ba88 watchdog_cpu_ctx: Get kaslr address from dts
Not all platforms are same imem address.

Change-Id: I570ea34c96d928de6f0cf83b13a5d02757693d30
Reviewed-on: https://gerrit.mot.com/1207825
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2018-07-11 21:06:33 -05:00