Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to Remove Kernel Verification #6

Open
wzyoct opened this issue Oct 9, 2023 · 0 comments
Open

Request to Remove Kernel Verification #6

wzyoct opened this issue Oct 9, 2023 · 0 comments

Comments

@wzyoct
Copy link

wzyoct commented Oct 9, 2023

I'm a user of the third-party kernel for the OnePlus 8T, and I'd like to request a feature for the upcoming new version. I'd like to propose the removal of kernel verification. Currently, the kernel verification process adds an extra layer of security, but it limits the ability to customize the kernel for advanced users like myself.I believe that removing this verification step would greatly benefit the community by allowing us to explore more advanced customization options while understanding the potential security implications. Please consider this request for the next version of the kernel.Thank you for your hard work on this project, and I appreciate your consideration of this feature request.

HELLBOY017 pushed a commit that referenced this issue Jan 20, 2024
[ Upstream commit a154f5f643c6ecddd44847217a7a3845b4350003 ]

The following call trace shows a deadlock issue due to recursive locking of
mutex "device_mutex". First lock acquire is in target_for_each_device() and
second in target_free_device().

 PID: 148266   TASK: ffff8be21ffb5d00  CPU: 10   COMMAND: "iscsi_ttx"
  #0 [ffffa2bfc9ec3b18] __schedule at ffffffffa8060e7f
  #1 [ffffa2bfc9ec3ba0] schedule at ffffffffa8061224
  #2 [ffffa2bfc9ec3bb8] schedule_preempt_disabled at ffffffffa80615ee
  #3 [ffffa2bfc9ec3bc8] __mutex_lock at ffffffffa8062fd7
  #4 [ffffa2bfc9ec3c40] __mutex_lock_slowpath at ffffffffa80631d3
  #5 [ffffa2bfc9ec3c50] mutex_lock at ffffffffa806320c
  #6 [ffffa2bfc9ec3c68] target_free_device at ffffffffc0935998 [target_core_mod]
  #7 [ffffa2bfc9ec3c90] target_core_dev_release at ffffffffc092f975 [target_core_mod]
  #8 [ffffa2bfc9ec3ca0] config_item_put at ffffffffa79d250f
  #9 [ffffa2bfc9ec3cd0] config_item_put at ffffffffa79d2583
 #10 [ffffa2bfc9ec3ce0] target_devices_idr_iter at ffffffffc0933f3a [target_core_mod]
 #11 [ffffa2bfc9ec3d00] idr_for_each at ffffffffa803f6fc
 #12 [ffffa2bfc9ec3d60] target_for_each_device at ffffffffc0935670 [target_core_mod]
 #13 [ffffa2bfc9ec3d98] transport_deregister_session at ffffffffc0946408 [target_core_mod]
 #14 [ffffa2bfc9ec3dc8] iscsit_close_session at ffffffffc09a44a6 [iscsi_target_mod]
 #15 [ffffa2bfc9ec3df0] iscsit_close_connection at ffffffffc09a4a88 [iscsi_target_mod]
 #16 [ffffa2bfc9ec3df8] finish_task_switch at ffffffffa76e5d07
 #17 [ffffa2bfc9ec3e78] iscsit_take_action_for_connection_exit at ffffffffc0991c23 [iscsi_target_mod]
 #18 [ffffa2bfc9ec3ea0] iscsi_target_tx_thread at ffffffffc09a403b [iscsi_target_mod]
 #19 [ffffa2bfc9ec3f08] kthread at ffffffffa76d8080
 #20 [ffffa2bfc9ec3f50] ret_from_fork at ffffffffa8200364

Fixes: 36d4cb4 ("scsi: target: Avoid that EXTENDED COPY commands trigger lock inversion")
Signed-off-by: Junxiao Bi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Mike Christie <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 26, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 26, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 26, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 26, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 26, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 26, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 27, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 27, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 27, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 27, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 28, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 29, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 29, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 29, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 29, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 29, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Jan 29, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 #6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
Kdjjjjn123 pushed a commit to Kdjjjjn123/kernel_oneplus that referenced this issue Jan 31, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 HELLBOY017#6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
Kdjjjjn123 pushed a commit to Kdjjjjn123/kernel_oneplus that referenced this issue Jan 31, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 HELLBOY017#6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
Kdjjjjn123 pushed a commit to Kdjjjjn123/kernel_oneplus that referenced this issue Feb 24, 2024
Multiple PMICs does exist on one device, which means qpnp-power-on may
get probed multiple times. It doesn't make sense to register the
directory each time when any of the PMICs get probed. Make it only run
once to fix the kernel warning.

[    0.347206] proc_dir_entry '/proc/oplus_ke' already registered
[    0.347232] WARNING: CPU: 6 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    0.347239] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S                4.19.157-Horizon-04171222 HELLBOY017#6
[    0.347243] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    0.347249] pstate: 60800005 (nZCv daif -PAN +UAO)
[    0.347255] pc : proc_register+0x10c/0x180
[    0.347261] lr : proc_register+0x104/0x180
[    0.347264] pc : ffffff968ed47da4
[    0.347268] lr : ffffff968ed47d9c
[    0.347272] sp : ffffff800805ba90
[    0.347275] x29: ffffff800805ba90 x28: ffffff96911ad465
[    0.347281] x27: ffffff96915a9263 x26: ffffff969142e6e0
[    0.347286] x25: 0000000000000000 x24: ffffffed7fe37010
[    0.347291] x23: 0000000000000000 x22: ffffffed7fcd9d50
[    0.347296] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    0.347300] x19: ffffffebfa1d9b40 x18: ffffff969265b000
[    0.347305] x17: 00000000007f5618 x16: 00000000000000c4
[    0.347310] x15: ffffff9690643c7c x14: 0000000000003036
[    0.347314] x13: 00000000000000ae x12: 0000000000000000
[    0.347319] x11: 0000000000000000 x10: ffffffffffffffff
[    0.347323] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    0.347328] x7 : 65726c612027656b x6 : ffffff969265d7fe
[    0.347332] x5 : 0000000000000000 x4 : 000000000000000c
[    0.347337] x3 : 0000000000000042 x2 : 0000000000000001
[    0.347341] x1 : 0000000000000000 x0 : ffffff9692682710
[    0.347347] Call trace:
[    0.347353] proc_register+0x10c/0x180
[    0.347359] proc_mkdir+0x70/0xa8
[    0.347367] pmicwd_init+0x40/0x254
[    0.347373] qpnp_pon_probe+0x9b8/0x9d8
[    0.347381] platform_drv_probe+0x7c/0xb4
[    0.347386] really_probe+0x270/0x2f4
[    0.347391] driver_probe_device+0x60/0xf8
[    0.347396] __driver_attach+0xe8/0x124
[    0.347401] bus_for_each_dev+0x78/0xc0
[    0.347406] driver_attach+0x20/0x28
[    0.347410] bus_add_driver+0x128/0x20c
[    0.347415] driver_register+0x74/0x108
[    0.347421] __platform_driver_register+0x40/0x48
[    0.347429] qpnp_pon_init+0x18/0x20
[    0.347434] do_one_initcall+0xd0/0x210
[    0.347439] do_initcall_level+0x13c/0x164
[    0.347443] do_basic_setup+0x48/0x94
[    0.347447] kernel_init_freeable+0xac/0x144
[    0.347455] kernel_init+0x14/0x2b0
[    0.347462] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
Kdjjjjn123 pushed a commit to Kdjjjjn123/kernel_oneplus that referenced this issue Feb 24, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 HELLBOY017#6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Aug 15, 2024
[ Upstream commit f8bbc07ac535593139c875ffa19af924b1084540 ]

vhost_worker will call tun call backs to receive packets. If too many
illegal packets arrives, tun_do_read will keep dumping packet contents.
When console is enabled, it will costs much more cpu time to dump
packet and soft lockup will be detected.

net_ratelimit mechanism can be used to limit the dumping rate.

PID: 33036    TASK: ffff949da6f20000  CPU: 23   COMMAND: "vhost-32980"
 #0 [fffffe00003fce50] crash_nmi_callback at ffffffff89249253
 #1 [fffffe00003fce58] nmi_handle at ffffffff89225fa3
 #2 [fffffe00003fceb0] default_do_nmi at ffffffff8922642e
 #3 [fffffe00003fced0] do_nmi at ffffffff8922660d
 #4 [fffffe00003fcef0] end_repeat_nmi at ffffffff89c01663
    [exception RIP: io_serial_in+20]
    RIP: ffffffff89792594  RSP: ffffa655314979e8  RFLAGS: 00000002
    RAX: ffffffff89792500  RBX: ffffffff8af428a0  RCX: 0000000000000000
    RDX: 00000000000003fd  RSI: 0000000000000005  RDI: ffffffff8af428a0
    RBP: 0000000000002710   R8: 0000000000000004   R9: 000000000000000f
    R10: 0000000000000000  R11: ffffffff8acbf64f  R12: 0000000000000020
    R13: ffffffff8acbf698  R14: 0000000000000058  R15: 0000000000000000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 #5 [ffffa655314979e8] io_serial_in at ffffffff89792594
 #6 [ffffa655314979e8] wait_for_xmitr at ffffffff89793470
 #7 [ffffa65531497a08] serial8250_console_putchar at ffffffff897934f6
 #8 [ffffa65531497a20] uart_console_write at ffffffff8978b605
 #9 [ffffa65531497a48] serial8250_console_write at ffffffff89796558
 #10 [ffffa65531497ac8] console_unlock at ffffffff89316124
 #11 [ffffa65531497b10] vprintk_emit at ffffffff89317c07
 #12 [ffffa65531497b68] printk at ffffffff89318306
 #13 [ffffa65531497bc8] print_hex_dump at ffffffff89650765
 #14 [ffffa65531497ca8] tun_do_read at ffffffffc0b06c27 [tun]
 #15 [ffffa65531497d38] tun_recvmsg at ffffffffc0b06e34 [tun]
 #16 [ffffa65531497d68] handle_rx at ffffffffc0c5d682 [vhost_net]
 #17 [ffffa65531497ed0] vhost_worker at ffffffffc0c644dc [vhost]
 #18 [ffffa65531497f10] kthread at ffffffff892d2e72
 #19 [ffffa65531497f50] ret_from_fork at ffffffff89c0022f

Fixes: ef3db4a ("tun: avoid BUG, dump packet on GSO errors")
Signed-off-by: Lei Chen <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Acked-by: Jason Wang <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Aug 15, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Aug 15, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Aug 15, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Aug 15, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Aug 15, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
HELLBOY017 pushed a commit that referenced this issue Aug 15, 2024
Multiple tfa chips does exist on one device, we shouldn't create it
every time on drivers probe. Make it only run once to fix the kernel
warning.

[    1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered
[    1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180
[    1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S      W         4.19.157-Horizon-04171222 #6
[    1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT)
[    1.457951] pstate: 60800005 (nZCv daif -PAN +UAO)
[    1.457956] pc : proc_register+0x10c/0x180
[    1.457961] lr : proc_register+0x104/0x180
[    1.457964] pc : ffffff968ed47da4
[    1.457968] lr : ffffff968ed47d9c
[    1.457972] sp : ffffff800805bae0
[    1.457975] x29: ffffff800805bae0 x28: 0000000000000000
[    1.457981] x27: 0000000000000000 x26: 0000000000000000
[    1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000
[    1.457990] x23: 0000000000000000 x22: ffffffebf669ab18
[    1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60
[    1.458001] x19: ffffffed58a84180 x18: ffffff969265b000
[    1.458005] x17: 00000000007d6990 x16: 00000000000000c4
[    1.458010] x15: ffffff9690643c7c x14: 6572657473696765
[    1.458015] x13: 0000000000000212 x12: 0000000000000000
[    1.458020] x11: 0000000000000000 x10: ffffffffffffffff
[    1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400
[    1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50
[    1.458034] x5 : 0000000000000000 x4 : 0000000000000003
[    1.458039] x3 : 0000000000000045 x2 : 0000000000000001
[    1.458043] x1 : 0000000000000000 x0 : ffffff9692682710
[    1.458050] Call trace:
[    1.458055] proc_register+0x10c/0x180
[    1.458060] proc_create_data+0x88/0xc0
[    1.458067] tfa98xx_i2c_probe+0x6a8/0xa08
[    1.458075] i2c_device_probe+0x230/0x278
[    1.458081] really_probe+0x270/0x2f4
[    1.458085] driver_probe_device+0x60/0xf8
[    1.458090] __driver_attach+0xe8/0x124
[    1.458095] bus_for_each_dev+0x78/0xc0
[    1.458100] driver_attach+0x20/0x28
[    1.458104] bus_add_driver+0x128/0x20c
[    1.458108] driver_register+0x74/0x108
[    1.458114] i2c_register_driver+0x3c/0x9c
[    1.458120] tfa98xx_i2c_init+0x60/0x80
[    1.458125] do_one_initcall+0xd0/0x210
[    1.458130] do_initcall_level+0x13c/0x164
[    1.458134] do_basic_setup+0x48/0x94
[    1.458138] kernel_init_freeable+0xac/0x144
[    1.458147] kernel_init+0x14/0x2b0
[    1.458153] ret_from_fork+0x10/0x18

Signed-off-by: LibXZR <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant