require '_h2ph_pre.ph';

unless(defined(&_VM_PAGE_)) {
    eval 'sub _VM_PAGE_ () {1;}' unless defined(&_VM_PAGE_);
    require 'uvm/uvm_extern.ph';
    require 'uvm/uvm_pglist.ph';
    if(defined( &UVM_PAGE_TRKOWN)) {
    }
    eval 'sub PG_CLEAN () {0x0008;}' unless defined(&PG_CLEAN);
    eval 'sub PG_BUSY () {0x0010;}' unless defined(&PG_BUSY);
    eval 'sub PG_WANTED () {0x0020;}' unless defined(&PG_WANTED);
    eval 'sub PG_TABLED () {0x0040;}' unless defined(&PG_TABLED);
    eval 'sub PG_ZERO () {0x0100;}' unless defined(&PG_ZERO);
    eval 'sub PG_FAKE () {0x0200;}' unless defined(&PG_FAKE);
    eval 'sub PG_FILLED () {0x0400;}' unless defined(&PG_FILLED);
    eval 'sub PG_DIRTY () {0x0800;}' unless defined(&PG_DIRTY);
    eval 'sub PG_RELEASED () {0x1000;}' unless defined(&PG_RELEASED);
    eval 'sub PG_FAULTING () {0x2000;}' unless defined(&PG_FAULTING);
    eval 'sub PG_CLEANCHK () {0x4000;}' unless defined(&PG_CLEANCHK);
    eval 'sub PQ_FREE () {0x0001;}' unless defined(&PQ_FREE);
    eval 'sub PQ_INACTIVE () {0x0002;}' unless defined(&PQ_INACTIVE);
    eval 'sub PQ_ACTIVE () {0x0004;}' unless defined(&PQ_ACTIVE);
    eval 'sub PQ_LAUNDRY () {0x0008;}' unless defined(&PQ_LAUNDRY);
    eval 'sub PQ_ANON () {0x0010;}' unless defined(&PQ_ANON);
    eval 'sub PQ_AOBJ () {0x0020;}' unless defined(&PQ_AOBJ);
    eval 'sub PQ_SWAPBACKED () {( &PQ_ANON| &PQ_AOBJ);}' unless defined(&PQ_SWAPBACKED);
    eval 'sub PQ_ENCRYPT () {0x0040;}' unless defined(&PQ_ENCRYPT);
    eval 'sub VM_PSTRAT_RANDOM () {1;}' unless defined(&VM_PSTRAT_RANDOM);
    eval 'sub VM_PSTRAT_BSEARCH () {2;}' unless defined(&VM_PSTRAT_BSEARCH);
    eval 'sub VM_PSTRAT_BIGFIRST () {3;}' unless defined(&VM_PSTRAT_BIGFIRST);
    if(defined( &_KERNEL)) {
	eval 'sub VM_PAGE_TO_PHYS {
	    local($entry) = @_;
    	    eval q((($entry)-> &phys_addr));
	}' unless defined(&VM_PAGE_TO_PHYS);
	if((defined(&VM_PHYSSEG_MAX) ? &VM_PHYSSEG_MAX : 0) == 1) {
	}
 elsif(((defined(&VM_PHYSSEG_STRAT) ? &VM_PHYSSEG_STRAT : 0) == (defined(&VM_PSTRAT_BSEARCH) ? &VM_PSTRAT_BSEARCH : 0))) {
	} else {
	}
	eval 'sub VM_PAGE_IS_FREE {
	    local($entry) = @_;
    	    eval q((($entry)-> &pqflags &  &PQ_FREE));
	}' unless defined(&VM_PAGE_IS_FREE);
    }
}
1;
