Page MenuHomeFreeBSD

powerpc64: Add DSCR support
ClosedPublic

Authored by breno.leitao_gmail.com on Apr 16 2018, 1:01 AM.
Tags
None
Referenced Files
F154363101: D15081.id41595.diff
Tue, Apr 28, 3:00 AM
F154254249: D15081.id.diff
Mon, Apr 27, 10:32 AM
Unknown Object (File)
Sun, Apr 26, 1:18 AM
Unknown Object (File)
Sat, Apr 25, 12:09 PM
Unknown Object (File)
Tue, Apr 21, 3:34 PM
Unknown Object (File)
Sun, Apr 19, 7:06 PM
Unknown Object (File)
Sun, Apr 19, 8:45 AM
Unknown Object (File)
Wed, Apr 15, 7:52 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 16154
Build 16107: arc lint + arc unit

Event Timeline

sys/powerpc/include/cpufunc.h
140

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

144

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
132

Use SPR_DSCR here.

210

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.