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)
Fri, Dec 27, 11:13 AM
Unknown Object (File)
Sun, Dec 22, 2:36 PM
Unknown Object (File)
Sat, Dec 21, 6:09 AM
Unknown Object (File)
Sat, Dec 21, 5:08 AM
Unknown Object (File)
Sat, Dec 21, 2:44 AM
Unknown Object (File)
Fri, Dec 20, 5:45 PM
Unknown Object (File)
Thu, Dec 5, 1:47 PM
Unknown Object (File)
Wed, Dec 4, 6:23 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42426
Build 39314: arc lint + arc unit

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