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)
Wed, Mar 27, 4:31 PM
Unknown Object (File)
Mon, Mar 4, 11:59 PM
Unknown Object (File)
Nov 11 2023, 3:28 PM
Unknown Object (File)
Nov 10 2023, 4:22 PM
Unknown Object (File)
Nov 9 2023, 1:40 AM
Unknown Object (File)
Nov 6 2023, 4:11 PM
Unknown Object (File)
Nov 6 2023, 7:20 AM
Unknown Object (File)
Nov 5 2023, 3:57 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

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 31531
Build 29135: arc lint + arc unit

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

minor nit: s/IFUNcs/IFUNCs/

81

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

91

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

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.