On 5/17/21 11:59 AM, Lucas Mateus Martins Araujo e Castro wrote:
I'm not completely sure how this should be handled, there's a get_physical_address in mmu_helper.c but it's a static function and divided by processor families instead of MMU types, so get_physical_address_* should be a new function?

The new get_physical_address_* function would be a mmu-hash(32|64) that do something like ppc_radix64_xlate and add a function to mmu-book3s-v3 that call either the radix64 or the hash64 function and also handle real mode access.

The entry points that we are concerned about are:
  ppc_cpu_get_phys_page_debug
  ppc_cpu_tlb_fill

Currently there is a hook, pcc->handle_mmu_fault, which is used by ppc_cpu_tlb_fill, but is insufficiently general. We're going to remove that hook.

We're going to add a new hook with the same interface as ppc_radix64_xlate that will be used by both ppc_cpu_get_phys_page_debug and ppc_cpu_tlb_fill.

Also should the tlb_set_page calls in *_handle_mmu_fault be changed to ppc_cpu_tlb_fill or the function should themselves fill it?

Only ppc_cpu_tlb_fill should call tlb_set_page.


r~

Reply via email to