[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|VERIFIED|CLOSED -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|RESOLVED|VERIFIED --- Comment #26 from Michael Ellerman (mich...@ellerman.id.au) --- OK thanks all. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #25 from Erhard F. (erhar...@mailbox.org) --- (In reply to Michael Ellerman from comment #23) > The memory leak is a separate issue, see bug #206695. > > Can anyone verify that bcf3588d8ed fixes the original issue? Yes, thanks to Wolframs patch the WINDFARM_PM112 is automatically loaded again when built as a module. So my original issue is fixed with that commit. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #24 from Wolfram Sang (w...@the-dreams.de) --- @Michael: commit bcf3588d8ed has the following tags: Reported-by: Erhard Furtner Tested-by: Erhard Furtner And Erhard is also the one who created this bug entry. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #23 from Michael Ellerman (mich...@ellerman.id.au) --- The memory leak is a separate issue, see bug #206695. Can anyone verify that bcf3588d8ed fixes the original issue? -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 Wolfram Sang (w...@the-dreams.de) changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |CODE_FIX --- Comment #22 from Wolfram Sang (w...@the-dreams.de) --- Fixed upstream with commit bcf3588d8ed3517e6ffaf083f034812aee9dc8e2. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #21 from Erhard F. (erhar...@mailbox.org) --- (In reply to Dennis Clarke from comment #20) > > Possibly unrelated but there appears to be a small memory leak within > windfarm_* somewhere given that I see traffic in kmemleak : > > [...] > > I will take a look into it and see what I can see. Thanks, but probably there's no need to. ;) There is already a patch floating around in the bug where I reported the memleak originally: https://bugzilla.kernel.org/show_bug.cgi?id=206695 The patch just didn't went upstream yet. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #20 from Dennis Clarke (dcla...@blastwave.org) --- Possibly unrelated but there appears to be a small memory leak within windfarm_* somewhere given that I see traffic in kmemleak : enceladus# enceladus# uname -a Linux enceladus 5.7.0-rc2 #1 SMP Tue Apr 21 23:32:43 UTC 2020 ppc64 GNU/Linux enceladus# lsmod | grep 'farm' windfarm_cpufreq_clamp 4640 1 windfarm_smu_sensors 9548 1 windfarm_smu_controls 9078 8 windfarm_pm112 15935 0 windfarm_pid4378 1 windfarm_pm112 windfarm_smu_sat9802 9 windfarm_pm112 windfarm_max6690_sensor 5434 1 windfarm_lm75_sensor 6148 1 windfarm_core 16619 7 windfarm_cpufreq_clamp,windfarm_smu_controls,windfarm_max6690_sensor,windfarm_smu_sat,windfarm_smu_sensors,windfarm_lm75_sensor,windfarm_pm112 enceladus# enceladus# cat /sys/kernel/debug/kmemleak unreferenced object 0xc867a6a0 (size 32): comm "kwindfarm", pid 175, jiffies 4294894706 (age 1843.540s) hex dump (first 32 bytes): c8 06 02 7f ff 02 ff 01 fb bf 00 59 00 20 00 00 ...Y. .. 00 07 89 37 00 a0 00 00 6b 6b 6b 6b 6b 6b 6b a5 ...7kkk. backtrace: [] .smu_sat_get_sdb_partition+0x150/0x2f0 [windfarm_smu_sat] [ ] .pm112_wf_notify+0x624/0x1460 [windfarm_pm112] [<8cdab940>] .notifier_call_chain+0x88/0xf0 [<8f026422>] .__blocking_notifier_call_chain+0x6c/0xc0 [<45480c67>] .wf_thread_func+0xe4/0x1e0 [windfarm_core] [<79c8bd6f>] .kthread+0x1b8/0x1d0 [<73e2b812>] .ret_from_kernel_thread+0x58/0x74 unreferenced object 0xc002612a15a0 (size 16): comm "kwindfarm", pid 175, jiffies 4294894926 (age 1842.660s) hex dump (first 16 bytes): c4 04 01 7f a0 12 20 5f ff 55 b8 14 7b 12 00 00 .. _.U..{... backtrace: [ ] .smu_sat_get_sdb_partition+0x150/0x2f0 [windfarm_smu_sat] [<50e586af>] .pm112_wf_notify+0x66c/0x1460 [windfarm_pm112] [<8cdab940>] .notifier_call_chain+0x88/0xf0 [<8f026422>] .__blocking_notifier_call_chain+0x6c/0xc0 [<45480c67>] .wf_thread_func+0xe4/0x1e0 [windfarm_core] [<79c8bd6f>] .kthread+0x1b8/0x1d0 [<73e2b812>] .ret_from_kernel_thread+0x58/0x74 unreferenced object 0xc867ba20 (size 32): comm "kwindfarm", pid 175, jiffies 4294895089 (age 1842.008s) hex dump (first 32 bytes): c9 06 02 7f ff 02 ff 01 fb bf 00 59 00 20 00 00 ...Y. .. 00 07 89 37 00 a0 00 00 6b 6b 6b 6b 6b 6b 6b a5 ...7kkk. backtrace: [ ] .smu_sat_get_sdb_partition+0x150/0x2f0 [windfarm_smu_sat] [ ] .pm112_wf_notify+0x624/0x1460 [windfarm_pm112] [<8cdab940>] .notifier_call_chain+0x88/0xf0 [<8f026422>] .__blocking_notifier_call_chain+0x6c/0xc0 [<45480c67>] .wf_thread_func+0xe4/0x1e0 [windfarm_core] [<79c8bd6f>] .kthread+0x1b8/0x1d0 [<73e2b812>] .ret_from_kernel_thread+0x58/0x74 unreferenced object 0xc61a8740 (size 16): comm "kwindfarm", pid 175, jiffies 4294895309 (age 1841.128s) hex dump (first 16 bytes): c5 04 01 7f a0 12 20 5f ff 55 29 14 7b 12 00 00 .. _.U).{... backtrace: [ ] .smu_sat_get_sdb_partition+0x150/0x2f0 [windfarm_smu_sat] [<50e586af>] .pm112_wf_notify+0x66c/0x1460 [windfarm_pm112] [<8cdab940>] .notifier_call_chain+0x88/0xf0 [<8f026422>] .__blocking_notifier_call_chain+0x6c/0xc0 [<45480c67>] .wf_thread_func+0xe4/0x1e0 [windfarm_core] [<79c8bd6f>] .kthread+0x1b8/0x1d0 [<73e2b812>] .ret_from_kernel_thread+0x58/0x74 unreferenced object 0xc61ab6e0 (size 32): comm "kwindfarm", pid 175, jiffies 4294895473 (age 1840.472s) hex dump (first 32 bytes): c8 06 02 7f ff 02 ff 01 fb bf 00 59 00 20 00 00 ...Y. .. 00 07 89 37 00 a0 00 00 6b 6b 6b 6b 6b 6b 6b a5 ...7kkk. backtrace: [ ] .smu_sat_get_sdb_partition+0x150/0x2f0 [windfarm_smu_sat] [ ] .pm112_wf_notify+0x624/0x1460 [windfarm_pm112] [<8cdab940>] .notifier_call_chain+0x88/0xf0 [<8f026422>] .__blocking_notifier_call_chain+0x6c/0xc0 [<45480c67>] .wf_thread_func+0xe4/0x1e0 [windfarm_core] [<79c8bd6f>] .kthread+0x1b8/0x1d0 [<73e2b812>] .ret_from_kernel_thread+0x58/0x74 unreferenced object 0xc61a8b90 (size 16): comm "kwindfarm", pid 175, jiffies 4294895693 (age 1839.600s) hex dump (first 16 bytes): c4 04 01 7f a0 12 20 5f ff 55 b8 14 7b 12 00 00 .. _.U..{... backtrace: [ ] .smu_sat_get_sdb_partition+0x150/0x2f0 [windfarm_smu_sat] [<50e586af>] .pm112_wf_notify+0x66c/0x1460 [windfarm_pm112] [<8cdab940>] .notifier_call_chain+0x88/0xf0 [<8f026422>] .__blocking_notifier_c
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #19 from Wolfram Sang (w...@the-dreams.de) --- Well, yes, the lm75 code gets loaded yet it is not clear to me if the device is now created by DT or not. Well, we will see... Patch sent out: http://patchwork.ozlabs.org/patch/1248349/ Let's discuss this one. The proof-of-concept here had a missing line but worked enough. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #18 from Erhard F. (erhar...@mailbox.org) --- Created attachment 287757 --> https://bugzilla.kernel.org/attachment.cgi?id=287757&action=edit dmesg (kernel 5.6-rc4 + patch, PowerMac G5 11,2) -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #17 from Erhard F. (erhar...@mailbox.org) --- (In reply to Wolfram Sang from comment #16) > Created attachment 287755 [details] > proof-of-concept patch for testing > > Here is the promised patch. I converted all I2C MODULE tables. pm72 didn't > have one, so we will see what pulls it in. > > A test with a machine needing the lm75 driver would be great. Because some > code change was needed there. Excellent! Applied your patch on 5.6-rc4 and it just works fine on my G5 11,2! I can leave CONFIG_WINDFARM=m and the correct modules get pulled in just as it was before kernel 4.17. I can't test on the G5 7,3 from my original bug report 'cause I sold this one. But from my understanding this "lm75" sensor is used in pretty any windfarm_pm* module? # grep -i lm75 drivers/macintosh/windfarm_pm*.c drivers/macintosh/windfarm_pm112.c: request_module("windfarm_lm75_sensor"); drivers/macintosh/windfarm_pm121.c: request_module("windfarm_lm75_sensor"); drivers/macintosh/windfarm_pm72.c: request_module("windfarm_lm75_sensor"); drivers/macintosh/windfarm_pm81.c: request_module("windfarm_lm75_sensor"); drivers/macintosh/windfarm_pm91.c: request_module("windfarm_lm75_sensor"); -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #16 from Wolfram Sang (w...@the-dreams.de) --- Created attachment 287755 --> https://bugzilla.kernel.org/attachment.cgi?id=287755&action=edit proof-of-concept patch for testing Here is the promised patch. I converted all I2C MODULE tables. pm72 didn't have one, so we will see what pulls it in. A test with a machine needing the lm75 driver would be great. Because some code change was needed there. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 Wolfram Sang (w...@the-dreams.de) changed: What|Removed |Added Status|NEEDINFO|ASSIGNED Regression|No |Yes --- Comment #15 from Wolfram Sang (w...@the-dreams.de) --- "I guess so 'cause if I build i2c_powermac as a module and manually modprobe it, all the relevant windfarm modules get pulled in. But not before." Maybe there is a module dependency I overlooked so far, but at least there is no code loading the pm72 module from i2c-powermac. However, the bisect is very valuable and very likely the commit is the culprit. I was suspecting something changed the MODINFO, so loading fails, but I missed this commit, so far. Also, it took me two approaches until I understood all the behaviour involved. Macintosh drivers are still confusing. I will cook up a patch to test later today to see if I was right. -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #275509|0 |1 is obsolete|| --- Comment #14 from Erhard F. (erhar...@mailbox.org) --- Created attachment 287749 --> https://bugzilla.kernel.org/attachment.cgi?id=287749&action=edit dmesg (kernel 4.17, PowerMac G5 11,2) -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #13 from Erhard F. (erhar...@mailbox.org) --- Created attachment 287747 --> https://bugzilla.kernel.org/attachment.cgi?id=287747&action=edit kernel .config (kernel 4.17, PowerMac G5 11,2) -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #275507|0 |1 is obsolete|| --- Comment #12 from Erhard F. (erhar...@mailbox.org) --- Created attachment 287745 --> https://bugzilla.kernel.org/attachment.cgi?id=287745&action=edit dmesg (kernel 4.16.18, PowerMac G5 11,2) -- You are receiving this mail because: You are watching the assignee of the bug.
[Bug 199471] [Bisected][Regression] windfarm_pm* no longer gets automatically loaded when CONFIG_I2C_POWERMAC=y is set
https://bugzilla.kernel.org/show_bug.cgi?id=199471 --- Comment #11 from Erhard F. (erhar...@mailbox.org) --- (In reply to Wolfram Sang from comment #8) > "This has been quite nice since 4.?.x up to 4.16.x as you only need > CONFIG_I2C_POWERMAC=y which selects the proper windfarm_pmXX at boot time." > > I can't find that in the code. Are you sure i2c-powermac requested that > module? I guess so 'cause if I build i2c_powermac as a module and manually modprobe it, all the relevant windfarm modules get pulled in. But not before. # modprobe -v i2c_powermac insmod /lib/modules/4.16.18-PowerMacG5+/kernel/drivers/i2c/busses/i2c-powermac.ko # dmesg | tail [ 150.181478] 11 [ 150.182851] 0 [ 150.184220] 0 [ 150.626685] windfarm: Backside control loop started. [ 150.690132] windfarm: Slots control loop started. [ 150.794843] i2c i2c-0: master_xfer[0] W, addr=0x50, len=1 [ 150.796467] i2c i2c-0: master_xfer[1] R, addr=0x50, len=8 [ 150.801851] i2c i2c-0: NAK from device addr 0x50 msg #0 [ 150.807758] windfarm: Drive bay control loop started. -- You are receiving this mail because: You are watching the assignee of the bug.