if (pmd_none(*pmd)) return; if (pmd_bad(*pmd)) { pmd_ERROR(*pmd); pmd_clear(pmd); return; }  pte = pte_offset_kernel(pmd, address); base = address & PMD_MASK; address &= ~PMD_MASK; end = address + size; if (end > PMD_SIZE) end = PMD_SIZE;
pte = pte_offset_kernel(pmd, addr);
static void unmap_im_area_pte(pmd_t *pmd, unsigned long address,				  unsigned long size){	unsigned long base, end;	pte_t *pte;	if (pmd_none(*pmd))		return;	if (pmd_bad(*pmd)) {		pmd_ERROR(*pmd);		pmd_clear(pmd);		return;	}	pte = pte_offset_kernel(pmd, address);	base = address & PMD_MASK;	address &= ~PMD_MASK;	end = address + size;	if (end > PMD_SIZE)		end = PMD_SIZE;	do {		pte_t page;		page = ptep_get_and_clear(&ioremap_mm, base + address, pte);		address += PAGE_SIZE;		pte++;		if (pte_none(page))			continue;		if (pte_present(page))			continue;		printk(KERN_CRIT "Whee.. Swapped out page in kernel page"		       " table\n");	} while (address < end);}