mbox series

[0/4] cache: sifive_ccache: Auxiliary device support

Message ID 20240410232211.438277-1-samuel.holland@sifive.com (mailing list archive)
Headers show
Series cache: sifive_ccache: Auxiliary device support | expand

Message

Samuel Holland April 10, 2024, 11:22 p.m. UTC
As of commit c90847bcbfb6 ("cache: sifive_ccache: Partially convert to a
platform driver"), the cache subsystem binds a platform driver to the
Composable Cache's DT node. This prevents the perf subsystem from doing
the same for the new PMU driver[1]. To allow using both drivers at the
same time without conflicts or module linkage dependencies, attach the
PMU driver to the auxiliary device bus. While at it, prepare to use the
auxiliary device bus for the EDAC driver as well, which significantly
simplifies that driver. The actual EDAC driver conversion has to wait
another development cycle to avoid dependencies between git trees.

[1]: https://lore.kernel.org/linux-riscv/20240216000837.1868917-3-samuel.holland@sifive.com/


Samuel Holland (4):
  cache: sifive_ccache: Silence unused variable warning
  cache: sifive_ccache: Use of_iomap() helper
  cache: sifive_ccache: Export base address for child drivers
  cache: sifive_ccache: Add EDAC and PMU as auxiliary devices

 drivers/cache/Kconfig              |  1 +
 drivers/cache/sifive_ccache.c      | 94 +++++++++++++++++++++---------
 include/soc/sifive/sifive_ccache.h |  8 +++
 3 files changed, 74 insertions(+), 29 deletions(-)

Comments

Conor Dooley April 12, 2024, 12:51 p.m. UTC | #1
On Wed, Apr 10, 2024 at 04:22:02PM -0700, Samuel Holland wrote:
> As of commit c90847bcbfb6 ("cache: sifive_ccache: Partially convert to a
> platform driver"), the cache subsystem binds a platform driver to the
> Composable Cache's DT node. This prevents the perf subsystem from doing
> the same for the new PMU driver[1]. To allow using both drivers at the
> same time without conflicts or module linkage dependencies, attach the
> PMU driver to the auxiliary device bus. While at it, prepare to use the
> auxiliary device bus for the EDAC driver as well, which significantly
> simplifies that driver. The actual EDAC driver conversion has to wait
> another development cycle to avoid dependencies between git trees.


I'm not really keen on the partial conversion, I'd like to see a
complete conversion where the ccache driver calls
"sifive_register_ccache_pmu()" and "sifive_register_ccache_edac()"
and has no part in creating the aux device itself, like Philipp and
Stephen asked me to do here for the clock/reset drivers on PolarFire SoC:
https://lore.kernel.org/all/20240409-shallow-voice-c84ed791bc7d@spud/

Thanks,
Conor.
Alexandre Ghiti April 24, 2024, 8:19 p.m. UTC | #2
Hi Samuel,

On 11/04/2024 01:22, Samuel Holland wrote:
> As of commit c90847bcbfb6 ("cache: sifive_ccache: Partially convert to a
> platform driver"), the cache subsystem binds a platform driver to the
> Composable Cache's DT node. This prevents the perf subsystem from doing
> the same for the new PMU driver[1]. To allow using both drivers at the
> same time without conflicts or module linkage dependencies, attach the
> PMU driver to the auxiliary device bus. While at it, prepare to use the
> auxiliary device bus for the EDAC driver as well, which significantly
> simplifies that driver. The actual EDAC driver conversion has to wait
> another development cycle to avoid dependencies between git trees.
>
> [1]: https://lore.kernel.org/linux-riscv/20240216000837.1868917-3-samuel.holland@sifive.com/
>
>
> Samuel Holland (4):
>    cache: sifive_ccache: Silence unused variable warning
>    cache: sifive_ccache: Use of_iomap() helper
>    cache: sifive_ccache: Export base address for child drivers
>    cache: sifive_ccache: Add EDAC and PMU as auxiliary devices
>
>   drivers/cache/Kconfig              |  1 +
>   drivers/cache/sifive_ccache.c      | 94 +++++++++++++++++++++---------
>   include/soc/sifive/sifive_ccache.h |  8 +++
>   3 files changed, 74 insertions(+), 29 deletions(-)
>

I took a quick look and I'm not sure if the whole patchset is a fix for 
6.9 or if only patch 1 is?

Alex
Conor Dooley April 24, 2024, 9:20 p.m. UTC | #3
On Wed, Apr 24, 2024 at 10:19:18PM +0200, Alexandre Ghiti wrote:
> Hi Samuel,
> 
> On 11/04/2024 01:22, Samuel Holland wrote:
> > As of commit c90847bcbfb6 ("cache: sifive_ccache: Partially convert to a
> > platform driver"), the cache subsystem binds a platform driver to the
> > Composable Cache's DT node. This prevents the perf subsystem from doing
> > the same for the new PMU driver[1]. To allow using both drivers at the
> > same time without conflicts or module linkage dependencies, attach the
> > PMU driver to the auxiliary device bus. While at it, prepare to use the
> > auxiliary device bus for the EDAC driver as well, which significantly
> > simplifies that driver. The actual EDAC driver conversion has to wait
> > another development cycle to avoid dependencies between git trees.
> > 
> > [1]: https://lore.kernel.org/linux-riscv/20240216000837.1868917-3-samuel.holland@sifive.com/
> > 
> > 
> > Samuel Holland (4):
> >    cache: sifive_ccache: Silence unused variable warning
> >    cache: sifive_ccache: Use of_iomap() helper
> >    cache: sifive_ccache: Export base address for child drivers
> >    cache: sifive_ccache: Add EDAC and PMU as auxiliary devices
> > 
> >   drivers/cache/Kconfig              |  1 +
> >   drivers/cache/sifive_ccache.c      | 94 +++++++++++++++++++++---------
> >   include/soc/sifive/sifive_ccache.h |  8 +++
> >   3 files changed, 74 insertions(+), 29 deletions(-)
> > 
> 
> I took a quick look and I'm not sure if the whole patchset is a fix for 6.9
> or if only patch 1 is?

Only the first patch is IMO, but it is a fix for a patch I applied so
it'll go this week via the soc tree with those auto-update fixes.