require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_M88K_CMMU_H_)) {
    eval 'sub _M88K_CMMU_H_ () {1;}' unless defined(&_M88K_CMMU_H_);
    if(defined( &_KERNEL)  && !defined( &_LOCORE)) {
	if(defined(&MULTIPROCESSOR)) {
	    eval 'sub CMMU_LOCK () { &__cpu_simple_lock( &cmmu_cpu_lock);}' unless defined(&CMMU_LOCK);
	    eval 'sub CMMU_UNLOCK () { &__cpu_simple_unlock( &cmmu_cpu_lock);}' unless defined(&CMMU_UNLOCK);
	} else {
	    eval 'sub CMMU_LOCK () { &do { }  &while (0);}' unless defined(&CMMU_LOCK);
	    eval 'sub CMMU_UNLOCK () { &do { }  &while (0);}' unless defined(&CMMU_UNLOCK);
	}
	if(defined(&MULTIPROCESSOR)) {
	}
	eval 'sub cmmu_init () {( ($cmmu->{init}));}' unless defined(&cmmu_init);
	eval 'sub setup_board_config () {( ($cmmu->{setup_board_config}));}' unless defined(&setup_board_config);
	eval 'sub cpu_configuration_print {
	    my($a) = @_;
    	    eval q(( ($cmmu->{cpu_configuration_print}))($a));
	}' unless defined(&cpu_configuration_print);
	eval 'sub cmmu_shutdown () {( ($cmmu->{shutdown}));}' unless defined(&cmmu_shutdown);
	eval 'sub cmmu_cpu_number () {( ($cmmu->{cpu_number}));}' unless defined(&cmmu_cpu_number);
	eval 'sub cmmu_set_sapr {
	    my($a, $b) = @_;
    	    eval q(( ($cmmu->{set_sapr}))($a, $b));
	}' unless defined(&cmmu_set_sapr);
	eval 'sub cmmu_set_uapr {
	    my($a) = @_;
    	    eval q(( ($cmmu->{set_uapr}))($a));
	}' unless defined(&cmmu_set_uapr);
	eval 'sub cmmu_flush_tlb {
	    my($a, $b, $c, $d) = @_;
    	    eval q(( ($cmmu->{flush_tlb}))($a, $b, $c, $d));
	}' unless defined(&cmmu_flush_tlb);
	eval 'sub cmmu_flush_cache {
	    my($a, $b, $c) = @_;
    	    eval q(( ($cmmu->{flush_cache}))($a, $b, $c));
	}' unless defined(&cmmu_flush_cache);
	eval 'sub cmmu_flush_inst_cache {
	    my($a, $b, $c) = @_;
    	    eval q(( ($cmmu->{flush_inst_cache}))($a, $b, $c));
	}' unless defined(&cmmu_flush_inst_cache);
	eval 'sub cmmu_flush_data_page {
	    my($a, $b) = @_;
    	    eval q(( ($cmmu->{flush_data_page}))($a, $b));
	}' unless defined(&cmmu_flush_data_page);
	eval 'sub dma_cachectl {
	    my($a, $b, $c, $d) = @_;
    	    eval q(( ($cmmu->{dma_cachectl}))($a, $b, $c, $d));
	}' unless defined(&dma_cachectl);
	eval 'sub dma_cachectl_pa {
	    my($a, $b, $c) = @_;
    	    eval q(( ($cmmu->{dma_cachectl_pa}))($a, $b, $c));
	}' unless defined(&dma_cachectl_pa);
	eval 'sub cmmu_initialize_cpu {
	    my($a) = @_;
    	    eval q(( ($cmmu->{initialize_cpu}))($a));
	}' unless defined(&cmmu_initialize_cpu);
	eval 'sub DMA_CACHE_SYNC () {0;}' unless defined(&DMA_CACHE_SYNC);
	eval 'sub DMA_CACHE_SYNC_INVAL () {1;}' unless defined(&DMA_CACHE_SYNC_INVAL);
	eval 'sub DMA_CACHE_INV () {2;}' unless defined(&DMA_CACHE_INV);
    }
}
1;
