Page MenuHomeFreeBSD

The Arm CoreLink DMC-620 Dynamic Memory Controller PMU driver
ClosedPublic

Authored by ray on Oct 26 2021, 12:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 11, 7:50 AM
Unknown Object (File)
Sun, Jun 9, 7:30 PM
Unknown Object (File)
Sun, Jun 9, 4:09 PM
Unknown Object (File)
May 21 2024, 11:47 AM
Unknown Object (File)
May 21 2024, 7:54 AM
Unknown Object (File)
May 21 2024, 12:47 AM
Unknown Object (File)
May 21 2024, 12:47 AM
Unknown Object (File)
May 21 2024, 12:47 AM

Details

Summary
  • Add the Arm CoreLink DMC-620 Dynamic Memory Controller PMU driver
  • Add DMC-620 support to hwpmc(4)

Sponsored By: Ampere Computing

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ray requested review of this revision.Oct 26 2021, 12:55 PM
ray retitled this revision from the Arm CoreLink DMC-620 Dynamic Memory Controller PMU driver to The Arm CoreLink DMC-620 Dynamic Memory Controller PMU driver.Oct 26 2021, 12:57 PM
ray added subscribers: allanjude, mhorne, emaste, andrew.

Looks good, with some very minor comments.

sys/dev/hwpmc/hwpmc_dmc620.c
164

c == DMC620_TYPE_CLKDIV2 ?

229
333–334

These capability checks are no longer needed.

555–556
690

Cast not required.

sys/dev/hwpmc/pmu_dmc620.c
233
241
This revision is now accepted and ready to land.Nov 23 2021, 4:42 PM

Oh yes, and one question. Should sys/dev/hwpmc/pmu_dmc620.c be located elsewhere, similar to sys/arm64/arm64/cmn600.c? To me, it does not seem to belong in the hwpmc sub-directory.

Oh yes, and one question. Should sys/dev/hwpmc/pmu_dmc620.c be located elsewhere, similar to sys/arm64/arm64/cmn600.c? To me, it does not seem to belong in the hwpmc sub-directory.

My idea was:
cmn600.c - is a device that provide PMU and trace support. Maybe even some topology information can be read from it.
pmu_dmc620.c - is the part of the DMC-620 device, which is memory controller, but ACPI deliver only its PMU memory and irq config, so ACPI hinted device is exactly PMU. And from another side, everything we have in dev/hwpmc is a drivers of the in-CPU PMUs. So IMO pmu_dmc620.c in correct place :)

Thanks for review!

This revision now requires review to proceed.Dec 19 2021, 11:57 AM
ray marked 7 inline comments as done.Dec 19 2021, 12:01 PM

All fixed. Thanks for review, Mitchell!

In D32670#747730, @ray wrote:

Oh yes, and one question. Should sys/dev/hwpmc/pmu_dmc620.c be located elsewhere, similar to sys/arm64/arm64/cmn600.c? To me, it does not seem to belong in the hwpmc sub-directory.

My idea was:
cmn600.c - is a device that provide PMU and trace support. Maybe even some topology information can be read from it.
pmu_dmc620.c - is the part of the DMC-620 device, which is memory controller, but ACPI deliver only its PMU memory and irq config, so ACPI hinted device is exactly PMU. And from another side, everything we have in dev/hwpmc is a drivers of the in-CPU PMUs. So IMO pmu_dmc620.c in correct place :)

Thanks for review!

Okay, thanks for the rationale. I don't oppose where you've placed it, but as another datapoint, we have sys/arm/arm/pmu.c which is an equivalent in-CPU PMU driver.

This revision is now accepted and ready to land.Jan 5 2022, 4:50 PM