require '_h2ph_pre.ph';

unless(defined(&_LINUX_HIGHMEM_H)) {
    eval 'sub _LINUX_HIGHMEM_H () {1;}' unless defined(&_LINUX_HIGHMEM_H);
    require 'linux/config.ph';
    require 'asm/pgalloc.ph';
    if(defined(&CONFIG_HIGHMEM)) {
	require 'asm/highmem.ph';
    } else {
	eval 'sub kunmap {
	    local($page) = @_;
    	    eval q( &do { }  &while (0));
	}' unless defined(&kunmap);
	eval 'sub kmap_atomic {
	    local($page,$idx) = @_;
    	    eval q( &kmap($page));
	}' unless defined(&kmap_atomic);
	eval 'sub kunmap_atomic {
	    local($page,$idx) = @_;
    	    eval q( &kunmap($page));
	}' unless defined(&kunmap_atomic);
	eval 'sub bh_kmap {
	    local($bh) = @_;
    	    eval q((($bh)-> &b_data));
	}' unless defined(&bh_kmap);
	eval 'sub bh_kunmap {
	    local($bh) = @_;
    	    eval q( &do { }  &while (0));
	}' unless defined(&bh_kunmap);
	eval 'sub bh_kmap_irq {
	    local($bh, $flags) = @_;
    	    eval q((($bh)-> &b_data));
	}' unless defined(&bh_kmap_irq);
	eval 'sub bh_kunmap_irq {
	    local($bh, $flags) = @_;
    	    eval q( &do { }  &while (0));
	}' unless defined(&bh_kunmap_irq);
    }
}
1;
