void spapr_setup_hpt_and_vrma(sPAPRMachineState *spapr)

{

    int hpt_shift;



    if ((spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)

        || (spapr->cas_reboot

            && !spapr_ovec_test(spapr->ov5_cas, OV5_HPT_RESIZE))) {

        hpt_shift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->maxram_size);

    } else {

        hpt_shift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->ram_size);

    }

    spapr_reallocate_hpt(spapr, hpt_shift, &error_fatal);



    if (spapr->vrma_adjust) {

        spapr->rma_size = kvmppc_rma_size(spapr_node0_size(MACHINE(spapr)),

                                          spapr->htab_shift);

    }

    /* We're setting up a hash table, so that means we're not radix */

    spapr->patb_entry = 0;

}

void spapr_setup_hpt_and_vrma(sPAPRMachineState *spapr)

{

    int hpt_shift;



    if ((spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)

        || (spapr->cas_reboot

            && !spapr_ovec_test(spapr->ov5_cas, OV5_HPT_RESIZE))) {

        hpt_shift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->maxram_size);

    } else {

        hpt_shift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->ram_size);

    }

    spapr_reallocate_hpt(spapr, hpt_shift, &error_fatal);



    if (spapr->vrma_adjust) {

        spapr->rma_size = kvmppc_rma_size(spapr_node0_size(MACHINE(spapr)),

                                          spapr->htab_shift);

    }

    

    spapr->patb_entry = 0;

}

void FUNC_0(sPAPRMachineState *VAR_0)

{

    int VAR_1;



    if ((VAR_0->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)

        || (VAR_0->cas_reboot

            && !spapr_ovec_test(VAR_0->ov5_cas, OV5_HPT_RESIZE))) {

        VAR_1 = spapr_hpt_shift_for_ramsize(MACHINE(VAR_0)->maxram_size);

    } else {

        VAR_1 = spapr_hpt_shift_for_ramsize(MACHINE(VAR_0)->ram_size);

    }

    spapr_reallocate_hpt(VAR_0, VAR_1, &error_fatal);



    if (VAR_0->vrma_adjust) {

        VAR_0->rma_size = kvmppc_rma_size(spapr_node0_size(MACHINE(VAR_0)),

                                          VAR_0->htab_shift);

    }

    

    VAR_0->patb_entry = 0;

}

void FUNC_0(sPAPRMachineState *VAR_0)
{ int VAR_1; if ((VAR_0->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)
|| (VAR_0->cas_reboot
&& !spapr_ovec_test(VAR_0->ov5_cas, OV5_HPT_RESIZE))) { VAR_1 = spapr_hpt_shift_for_ramsize(MACHINE(VAR_0)->maxram_size); } else { VAR_1 = spapr_hpt_shift_for_ramsize(MACHINE(VAR_0)->ram_size); } spapr_reallocate_hpt(VAR_0, VAR_1, &error_fatal); if (VAR_0->vrma_adjust) { VAR_0->rma_size = kvmppc_rma_size(spapr_node0_size(MACHINE(VAR_0)),
VAR_0->htab_shift); } VAR_0->patb_entry = 0; }