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
F82588719: D32670.diff
Tue, Apr 30, 4:48 PM
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

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 42427
Build 39315: 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
163

c == DMC620_TYPE_CLKDIV2 ?

228
332–333

These capability checks are no longer needed.

554–555
689

Cast not required.

sys/dev/hwpmc/pmu_dmc620.c
232
240
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