• D
    target-ppc: Use QOM method dispatch for MMU fault handling · b632a148
    David Gibson 提交于
    After previous cleanups, the many scattered checks of env->mmu_model in
    the ppc MMU implementation have, at least for "classic" hash MMUs been
    reduced (almost) to a single switch at the top of
    cpu_ppc_handle_mmu_fault().
    
    An explicit switch is still a pretty ugly way of handling this though.  Now
    that Andreas Färber's CPU QOM cleanups for ppc have gone in, it's quite
    straightforward to instead make the handle_mmu_fault function a QOM method
    on the CPU object.
    
    This patch implements such a scheme, initializing the method pointer at
    the same time as the mmu_model variable.  We need to keep the latter around
    for now, because of the MMU types (BookE, 4xx, et al) which haven't been
    converted to the new scheme yet, and also for a few other uses.  It would
    be good to clean those up eventually.
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: NAlexander Graf <agraf@suse.de>
    b632a148
cpu-qom.h 2.7 KB