HomeFreeBSD

powerpc/booke: Rewrite pmap_sync_icache() a bit

Description

powerpc/booke: Rewrite pmap_sync_icache() a bit

  • Make mmu_booke_sync_icache() use the DMAP on 64-bit prcoesses, no need to map the page into the user's address space. This removes the pvh_global_lock from the equation on 64-bit.
  • Don't map the page with user-readability on 32-bit. I don't know what the chance of a given user process being able to access the NULL page when another process's page is added there, but it doesn't seem like a good idea to map it to NULL with user read permissions.
  • Only sync as much as we need to. There are only two significant places where pmap_sync_icache is used: proc_rwmem(), and the SIGILL second-chance for powerpc. The SIGILL second chance is likely the most common, and only syncs 4 bytes, so avoid the other 127 loop iterations (4096 / 32 byte cacheline) in __syncicache().

Details

Provenance
jhibbitsAuthored on
Parents
rS347353: MFC r346960:
Branches
Unknown
Tags
Unknown