Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHROMIUM: thermal: mediatek: Move pm_qos_request into mtk_thermal struct
Since pm_qos_add_request() creates a work queue, the pm_qos_request argument should be heap allocated. Otherwise, the following warning will be logged when the CONFIG_DEBUG_OBJECTS config option is enabled: [ 3.456876] ODEBUG: object 0000000004de3844 is on stack 000000004553414d, but NOT annotated. [ 3.457101] ------------[ cut here ]------------ [ 3.457142] WARNING: CPU: 2 PID: 1 at lib/debugobjects.c:368 __debug_object_init+0x374/0x4c8 [ 3.457150] Modules linked in: [ 3.457162] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.139 torvalds#146 [ 3.457169] Hardware name: Google Elm (DT) [ 3.457178] pstate: 60000085 (nZCv daIf -PAN -UAO) [ 3.457187] pc : __debug_object_init+0x374/0x4c8 [ 3.457195] lr : __debug_object_init+0x374/0x4c8 [ 3.457202] sp : ffffffc0daf2f770 [ 3.457210] x29: ffffffc0daf2f780 x28: ffffff900a4b0000 [ 3.457219] x27: ffffff900a4ae0c8 x26: dead000000000100 [ 3.457228] x25: ffffff9009691000 x24: ffffffc0d1b4e7b0 [ 3.457237] x23: 0000000000000000 x22: ffffff900a4ae0d0 [ 3.457246] x21: 0000000000000000 x20: ffffffc0daf2f8b0 [ 3.457254] x19: ffffff9009642d68 x18: 0000000000000000 [ 3.457262] x17: ffffff9009649000 x16: 0000000000000000 [ 3.457271] x15: ffffff90085412b8 x14: 0000000000000001 [ 3.457279] x13: 0000000000000000 x12: 00000000000c0001 [ 3.457287] x11: 0000000000000000 x10: 0000000000000000 [ 3.457296] x9 : 0f00a3cfd965a500 x8 : 0f00a3cfd965a500 [ 3.457304] x7 : ffffff900817190c x6 : 0000000000000000 [ 3.457313] x5 : 0000000000000080 x4 : 0000000000000001 [ 3.457321] x3 : ffffffc0daf2f474 x2 : 0000000000000002 [ 3.457329] x1 : 0000000000000002 x0 : 0000000000000024 [ 3.457338] Call trace: [ 3.457347] __debug_object_init+0x374/0x4c8 [ 3.457355] debug_object_init+0x1c/0x24 [ 3.457365] __init_work+0x34/0x40 [ 3.457373] pm_qos_add_request+0x58/0x23c [ 3.457383] mtk_svs_late_init+0x220/0x664 [ 3.457391] do_one_initcall+0x1d8/0x40c [ 3.457401] do_initcall_level+0x1f0/0x244 [ 3.457408] do_basic_setup+0x64/0x7c [ 3.457416] kernel_init_freeable+0x110/0x198 [ 3.457425] kernel_init+0x14/0x100 [ 3.457433] ret_from_fork+0x10/0x18 BUG=b:160960149 TEST=Boot elm with USE=debug, warning not seen in dmesg Change-Id: Ice6cd351ead586ad3393d6be83b52be3a8b190da Signed-off-by: Anand K Mistry <[email protected]> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2366252 Reviewed-by: Hsin-Yi Wang <[email protected]> Commit-Queue: Anand K Mistry <[email protected]> Tested-by: Anand K Mistry <[email protected]>
- Loading branch information