Page MenuHomeFreeBSD

powerpc64: Add DSCR support
ClosedPublic

Authored by breno.leitao_gmail.com on Apr 16 2018, 1:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 9:05 PM
Unknown Object (File)
Mon, Nov 18, 9:00 PM
Unknown Object (File)
Oct 26 2024, 9:52 AM
Unknown Object (File)
Oct 23 2024, 6:49 PM
Unknown Object (File)
Oct 23 2024, 3:31 PM
Unknown Object (File)
Oct 22 2024, 4:41 AM
Unknown Object (File)
Oct 4 2024, 2:01 PM
Unknown Object (File)
Oct 3 2024, 6:01 PM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
132 ↗(On Diff #41569)

Use SPR_DSCR here.

210 ↗(On Diff #41569)

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.