/* 
/* 
do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *regs){	unsigned int rd, rn, correction, nr_regs, regbits;	unsigned long eaddr, newaddr;	if (LDM_S_BIT(instr))		goto bad;	correction = 4; /* processor implementation defined */	regs->ARM_pc += correction;	ai_multi += 1;	/* count the number of registers in the mask to be transferred */	nr_regs = hweight16(REGMASK_BITS(instr)) * 4;	rn = RN_BITS(instr);	newaddr = eaddr = regs->uregs[rn];	if (!LDST_U_BIT(instr))		nr_regs = -nr_regs;	newaddr += nr_regs;	if (!LDST_U_BIT(instr))		eaddr = newaddr;	if (LDST_P_EQ_U(instr))	/* U = P */		eaddr += 4;	/* 	 * For alignment faults on the ARM922T/ARM920T the MMU  makes	 * the FSR (and hence addr) equal to the updated base address	 * of the multiple access rather than the restored value.	 * Switch this message off if we've got a ARM92[02], otherwise	 * [ls]dm alignment faults are noisy!	 */#if !(defined CONFIG_CPU_ARM922T)  && !(defined CONFIG_CPU_ARM920T)	/*	 * This is a "hint" - we already have eaddr worked out by the	 * processor for us.	 */	if (addr != eaddr) {		printk(KERN_ERR "LDMSTM: PC = %08lx, instr = %08lx, "			"addr = %08lx, eaddr = %08lx\n",			 instruction_pointer(regs), instr, addr, eaddr);		show_regs(regs);	}#endif	if (user_mode(regs)) {		for (regbits = REGMASK_BITS(instr), rd = 0; regbits;		     regbits >>= 1, rd += 1)			if (regbits & 1) {				if (LDST_L_BIT(instr)) {					unsigned int val;					get32t_unaligned_check(val, eaddr);					regs->uregs[rd] = val;				} else					put32t_unaligned_check(regs->uregs[rd], eaddr);				eaddr += 4;			}	} else {		for (regbits = REGMASK_BITS(instr), rd = 0; regbits;		     regbits >>= 1, rd += 1)			if (regbits & 1) {				if (LDST_L_BIT(instr)) {					unsigned int val;					get32_unaligned_check(val, eaddr);					regs->uregs[rd] = val;				} else					put32_unaligned_check(regs->uregs[rd], eaddr);				eaddr += 4;			}	}	if (LDST_W_BIT(instr))		regs->uregs[rn] = newaddr;	if (!LDST_L_BIT(instr) || !(REGMASK_BITS(instr) & (1 << 15)))		regs->ARM_pc -= correction;	return TYPE_DONE;fault:	regs->ARM_pc -= correction;	return TYPE_FAULT;bad:	printk(KERN_ERR "Alignment trap: not handling ldm with s-bit set\n");	return TYPE_ERROR;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/737d0bb7701cdebb661e4db0236071a7df977777/alignment.c/buggy/arch/arm/mm/alignment.c