[PATCH v4 1/8] drivers: base: Add hardware prefetch control core driver
tarumizu.kohei at fujitsu.com
tarumizu.kohei at fujitsu.com
Wed May 18 05:38:02 PDT 2022
Thanks for the comment.
> This feels wrong, attributes should be groups and be automatically added and
> removed by the driver core that way. Not as lists of attributes like this, as that
> will race and be wrong.
>
> Use a list of attribute groups please.
> You just raced with userspace and lost :(
>
> Please use attribute groups instead of manually adding files after the device is
> created and userspace is notified that it was present.
>
> That also makes your clean up logic much simpler (i.e. none as the drive core did it
> for you already.)
> Attribute groups please.
I modify to use attribute groups in the next version.
> Why do you think this needs to be in the driver core? Why isn't this just a normal
> cpu driver?
>
> thanks,
Does this mean that creating only dedicated driver for a CPU (e.g.
arch/x86/kernel/cpu/x86-pfctl.c) without creating core driver?
If so, there is no problem. I remove the core driver and create only
the dedicated drivers for each CPU in the next version.
As a reference, I previously wanted to define it as a common sysfs I/F
for A64FX and x86, so I create a core driver to provide it. However,
as I proceed with the consideration, it became clear that these were
independent I/F specifications. Therefore, the core driver is not
currently needed.
More information about the linux-arm-kernel
mailing list