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)
Mon, Apr 22, 10:45 AM
Unknown Object (File)
Mon, Apr 22, 8:01 AM
Unknown Object (File)
Sun, Apr 21, 11:36 PM
Unknown Object (File)
Sun, Apr 21, 1:33 AM
Unknown Object (File)
Sat, Apr 6, 12:59 AM
Unknown Object (File)
Fri, Apr 5, 7:02 AM
Unknown Object (File)
Fri, Apr 5, 4:05 AM
Unknown Object (File)
Mar 19 2024, 6:45 PM

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