long off; 
unsigned long off = (u32)__pfn_to_phys(md->pfn); 
void __init create_mapping(struct map_desc *md){	unsigned long virt, length;	int prot_sect, prot_l1, domain;	pgprot_t prot_pte;	long off;	if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) {		printk(KERN_WARNING "BUG: not creating mapping for "		       "0x%08lx at 0x%08lx in user region\n",		       __pfn_to_phys(md->pfn), md->virtual);		return;	}	if ((md->type == MT_DEVICE || md->type == MT_ROM) &&	    md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) {		printk(KERN_WARNING "BUG: mapping for 0x%08lx at 0x%08lx "		       "overlaps vmalloc space\n",		       __pfn_to_phys(md->pfn), md->virtual);	}	domain	  = mem_types[md->type].domain;	prot_pte  = __pgprot(mem_types[md->type].prot_pte);	prot_l1   = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain);	prot_sect = mem_types[md->type].prot_sect | PMD_DOMAIN(domain);	virt   = md->virtual;	off    = __pfn_to_phys(md->pfn) - virt;	length = md->length;	if (mem_types[md->type].prot_l1 == 0 &&	    (virt & 0xfffff || (virt + off) & 0xfffff || (virt + length) & 0xfffff)) {		printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not "		       "be mapped using pages, ignoring.\n",		       __pfn_to_phys(md->pfn), md->virtual);		return;	}	while ((virt & 0xfffff || (virt + off) & 0xfffff) && length >= PAGE_SIZE) {		alloc_init_page(virt, virt + off, prot_l1, prot_pte);		virt   += PAGE_SIZE;		length -= PAGE_SIZE;	}	/* N.B.	ARMv6 supersections are only defined to work with domain 0.	 *	Since domain assignments can in fact be arbitrary, the	 *	'domain == 0' check below is required to insure that ARMv6	 *	supersections are only allocated for domain 0 regardless	 *	of the actual domain assignments in use.	 */	if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) {		/* Align to supersection boundary */		while ((virt & ~SUPERSECTION_MASK || (virt + off) &			~SUPERSECTION_MASK) && length >= (PGDIR_SIZE / 2)) {			alloc_init_section(virt, virt + off, prot_sect);			virt   += (PGDIR_SIZE / 2);			length -= (PGDIR_SIZE / 2);		}		while (length >= SUPERSECTION_SIZE) {			alloc_init_supersection(virt, virt + off, prot_sect);			virt   += SUPERSECTION_SIZE;			length -= SUPERSECTION_SIZE;		}	}	/*	 * A section mapping covers half a "pgdir" entry.	 */	while (length >= (PGDIR_SIZE / 2)) {		alloc_init_section(virt, virt + off, prot_sect);		virt   += (PGDIR_SIZE / 2);		length -= (PGDIR_SIZE / 2);	}	while (length >= PAGE_SIZE) {		alloc_init_page(virt, virt + off, prot_l1, prot_pte);		virt   += PAGE_SIZE;		length -= PAGE_SIZE;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/0b7cd62ecdc1f09b7df4608a3fee644b1c27985b/mm-armv.c/buggy/arch/arm/mm/mm-armv.c