Page MenuHomeFreeBSD

powerpc: Use IFUNCs for copyin/copyout/etc
ClosedPublic

Authored by jhibbits on Jun 4 2020, 4:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 1:21 AM
Unknown Object (File)
Oct 3 2024, 6:27 AM
Unknown Object (File)
Oct 2 2024, 7:31 PM
Unknown Object (File)
Oct 2 2024, 5:08 PM
Unknown Object (File)
Oct 1 2024, 11:35 PM
Unknown Object (File)
Oct 1 2024, 4:15 AM
Unknown Object (File)
Sep 27 2024, 5:34 PM
Unknown Object (File)
Sep 24 2024, 4:29 AM
Subscribers

Details

Summary

Radix on AIM, and all of Book-E (currently), can do direct addressing of
user space, instead of needing to map user addresses into kernel space.
Take advantage of this to optimize the copy(9) functions for this
behavior, and avoid effectively NOP translations.

Test Plan

Tested on powerpcspe, powerpc64/booke, powerpc64/AIM

Diff Detail

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

Event Timeline

jhibbits created this revision.

Fix booke, which doesn't use ifuncs for copyin/copyout. Use a "naked function"
definition instead, since it's really treated as a secondary return path.

boot tests:

powerpcspe/RB800 ok
powerpc64/X5000 ok
powerpc/G4 ok
powerpc64/POWER9 Radix ok (old elfv1 userland)
powerpc64/POWER9 HPT ok (old elfv1 userland)

Only found comment related issues in readthrough.

sys/powerpc/powerpc/copyinout.c
78 ↗(On Diff #72752)

minor nit: s/IFUNcs/IFUNCs/

81 ↗(On Diff #72752)

s/powerpc64/AIM powerpc64/ as Book-E is described in the next paragraph

91 ↗(On Diff #72752)

The last two paragraphs are overloading the term "direct" -- the rest of the code treat "direct" as in "doesn't map user pointers" instead of "direct" as in "bypasses ifunc"

128 ↗(On Diff #72752)

english nit: s/if/whether/ might be easier to read

This revision is now accepted and ready to land.Jun 5 2020, 11:08 PM
This revision was automatically updated to reflect the committed changes.