Page MenuHomeFreeBSD

powerpc64: Add DSCR support
ClosedPublic

Authored by breno.leitao_gmail.com on Apr 16 2018, 1:01 AM.
Tags
None
Referenced Files
F110457732: D15081.diff
Tue, Feb 18, 5:37 PM
Unknown Object (File)
Mon, Feb 17, 6:04 PM
Unknown Object (File)
Wed, Jan 22, 12:58 AM
Unknown Object (File)
Jan 19 2025, 9:02 AM
Unknown Object (File)
Jan 16 2025, 8:25 PM
Unknown Object (File)
Jan 6 2025, 3:26 PM
Unknown Object (File)
Jan 6 2025, 3:20 PM
Unknown Object (File)
Dec 1 2024, 8:00 AM
Subscribers

Details

Summary

Powerpc64 has support for a register called Data Stream Control Register
(DSCR), which basically controls how the hardware controls the caching and
prefetch for stream operations.

Since mfdscr and mtdscr are privileged instructions, we need to emulate them, and
keep the custom DSCR configuration per thread.

The purpose of this feature is to change DSCR depending on the operation, set
to DSCR Default Prefetch Depth to deepest on string operations, as memcpy.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16199
Build 16151: arc lint + arc unit

Event Timeline

sys/powerpc/include/cpufunc.h
140 ↗(On Diff #41497)

Is there a benefit to this over mfspr(SPR_DSCR)?

144 ↗(On Diff #41497)

If you keep this, you should use the named constant SPR_DSCR (I think "K" is the right constraint for integer constants).

Removing mfdscr() inline function and replacing by mfspr(SPR_DSCR).

Fix the minor nits, and otherwise looks good.

sys/powerpc/powerpc/swtch64.S
133

Use SPR_DSCR here.

211

And here

This revision now requires changes to proceed.Apr 17 2018, 4:57 PM

Use SPR_DSCR macro instead of SPR number (0x11)

This revision is now accepted and ready to land.Apr 18 2018, 3:32 PM
This revision was automatically updated to reflect the committed changes.