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)
Dec 31 2023, 4:16 AM
Unknown Object (File)
Dec 12 2023, 5:52 AM
Unknown Object (File)
Nov 14 2023, 1:40 AM
Unknown Object (File)
Oct 13 2023, 12:42 AM
Unknown Object (File)
Sep 6 2023, 5:21 AM
Unknown Object (File)
Sep 1 2023, 8:03 PM
Unknown Object (File)
Jul 10 2023, 9:11 PM
Unknown Object (File)
Jun 23 2023, 4:16 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.