2019-10-31 14:30:52

by David Hildenbrand

[permalink] [raw]
Subject: [PATCH v1 01/12] powerpc/pseries: CMM: Implement release() function for sysfs device

When unloading the module, one gets
[ 548.188594] ------------[ cut here ]------------
[ 548.188596] Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt.
[ 548.188622] WARNING: CPU: 0 PID: 19308 at drivers/base/core.c:1244 .device_release+0xcc/0xf0
...

We only have on static fake device. There is nothing to do when
releasing the device (via cmm_exit).

Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: Allison Randal <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Arun KS <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
---
arch/powerpc/platforms/pseries/cmm.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c
index b33251d75927..572651a5c87b 100644
--- a/arch/powerpc/platforms/pseries/cmm.c
+++ b/arch/powerpc/platforms/pseries/cmm.c
@@ -411,6 +411,10 @@ static struct bus_type cmm_subsys = {
.dev_name = "cmm",
};

+static void cmm_release_device(struct device *dev)
+{
+}
+
/**
* cmm_sysfs_register - Register with sysfs
*
@@ -426,6 +430,7 @@ static int cmm_sysfs_register(struct device *dev)

dev->id = 0;
dev->bus = &cmm_subsys;
+ dev->release = cmm_release_device;

if ((rc = device_register(dev)))
goto subsys_unregister;
--
2.21.0


2019-11-14 09:10:58

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 01/12] powerpc/pseries: CMM: Implement release() function for sysfs device

On Thu, 2019-10-31 at 14:29:22 UTC, David Hildenbrand wrote:
> When unloading the module, one gets
> [ 548.188594] ------------[ cut here ]------------
> [ 548.188596] Device 'cmm0' does not have a release() function, it is brok=
> en and must be fixed. See Documentation/kobject.txt.
> [ 548.188622] WARNING: CPU: 0 PID: 19308 at drivers/base/core.c:1244 .devi=
> ce_release+0xcc/0xf0
> ...
>
> We only have on static fake device. There is nothing to do when
> releasing the device (via cmm_exit).
>
> Cc: Benjamin Herrenschmidt <[email protected]>
> Cc: Paul Mackerras <[email protected]>
> Cc: Michael Ellerman <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: Vlastimil Babka <[email protected]>
> Cc: Konstantin Khlebnikov <[email protected]>
> Cc: Allison Randal <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Arun KS <[email protected]>
> Signed-off-by: David Hildenbrand <[email protected]>

Patches 1-10 applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7d8212747435c534c8d564fbef4541a463c976ff

cheers

2019-11-14 12:24:52

by David Hildenbrand

[permalink] [raw]
Subject: Re: [PATCH v1 01/12] powerpc/pseries: CMM: Implement release() function for sysfs device

On 14.11.19 10:08, Michael Ellerman wrote:
> On Thu, 2019-10-31 at 14:29:22 UTC, David Hildenbrand wrote:
>> When unloading the module, one gets
>> [ 548.188594] ------------[ cut here ]------------
>> [ 548.188596] Device 'cmm0' does not have a release() function, it is brok=
>> en and must be fixed. See Documentation/kobject.txt.
>> [ 548.188622] WARNING: CPU: 0 PID: 19308 at drivers/base/core.c:1244 .devi=
>> ce_release+0xcc/0xf0
>> ...
>>
>> We only have on static fake device. There is nothing to do when
>> releasing the device (via cmm_exit).
>>
>> Cc: Benjamin Herrenschmidt <[email protected]>
>> Cc: Paul Mackerras <[email protected]>
>> Cc: Michael Ellerman <[email protected]>
>> Cc: Andrew Morton <[email protected]>
>> Cc: Vlastimil Babka <[email protected]>
>> Cc: Konstantin Khlebnikov <[email protected]>
>> Cc: Allison Randal <[email protected]>
>> Cc: Greg Kroah-Hartman <[email protected]>
>> Cc: Thomas Gleixner <[email protected]>
>> Cc: Arun KS <[email protected]>
>> Signed-off-by: David Hildenbrand <[email protected]>
>
> Patches 1-10 applied to powerpc next, thanks.
>
> https://git.kernel.org/powerpc/c/7d8212747435c534c8d564fbef4541a463c976ff
>
> cheers
>

Thanks! I'll probably resend patch 11/12 to give it more attention and
to fixup one comment leftover in patch 11. I guess if we get ACKs these
two patch should also go via your tree to avoid collisions.

--

Thanks,

David / dhildenb

2019-11-20 11:44:43

by David Hildenbrand

[permalink] [raw]
Subject: Re: [PATCH v1 01/12] powerpc/pseries: CMM: Implement release() function for sysfs device

On 14.11.19 10:08, Michael Ellerman wrote:
> On Thu, 2019-10-31 at 14:29:22 UTC, David Hildenbrand wrote:
>> When unloading the module, one gets
>> [ 548.188594] ------------[ cut here ]------------
>> [ 548.188596] Device 'cmm0' does not have a release() function, it is brok=
>> en and must be fixed. See Documentation/kobject.txt.
>> [ 548.188622] WARNING: CPU: 0 PID: 19308 at drivers/base/core.c:1244 .devi=
>> ce_release+0xcc/0xf0
>> ...
>>
>> We only have on static fake device. There is nothing to do when
>> releasing the device (via cmm_exit).
>>
>> Cc: Benjamin Herrenschmidt <[email protected]>
>> Cc: Paul Mackerras <[email protected]>
>> Cc: Michael Ellerman <[email protected]>
>> Cc: Andrew Morton <[email protected]>
>> Cc: Vlastimil Babka <[email protected]>
>> Cc: Konstantin Khlebnikov <[email protected]>
>> Cc: Allison Randal <[email protected]>
>> Cc: Greg Kroah-Hartman <[email protected]>
>> Cc: Thomas Gleixner <[email protected]>
>> Cc: Arun KS <[email protected]>
>> Signed-off-by: David Hildenbrand <[email protected]>
>
> Patches 1-10 applied to powerpc next, thanks.
>
> https://git.kernel.org/powerpc/c/7d8212747435c534c8d564fbef4541a463c976ff
>
> cheers
>

Hi Michael,

just to make sure you saw the two MM patches (and the ACKs from Michal)

https://lkml.org/lkml/2019/11/14/410

if you prefer that Andrew picks these up, please let me know.

Cheers!

--

Thanks,

David / dhildenb