Lines Matching defs:arm

118 u16 MR_ArPdGet(u32 ar, u32 arm, struct MR_DRV_RAID_MAP_ALL *map)
120 return le16_to_cpu(map->raidMap.arMapInfo[ar].pd[arm]);
641 "returns invalid arm for ld=%x strip=%lx\n",
647 /* This Function will return Phys arm */
653 u32 arm = 0;
659 arm = mega_mod64(stripe, SPAN_ROW_SIZE(map, ld, span));
662 /* start with logical arm */
663 arm = get_arm_from_strip(instance, ld, stripe, map);
664 if (arm != -1U)
665 arm *= 2;
669 return arm;
676 * This routine calculates the arm, span and block for the specified stripe and
703 u32 logArm, rowMod, armQ, arm;
718 arm = armQ + 1 + logArm;
719 if (arm >= SPAN_ROW_SIZE(map, ld, span))
720 arm -= SPAN_ROW_SIZE(map, ld, span);
721 physArm = (u8)arm;
723 /* Calculate the arm */
777 * This routine calculates the arm, span and block for the specified stripe and
810 /* logical arm within row */
812 u32 rowMod, armQ, arm;
819 arm = armQ+1+logArm; /* data always logically follows Q */
820 if (arm >= raid->rowSize) /* handle wrap condition */
821 arm -= raid->rowSize;
822 physArm = (u8)arm;
899 * This routine calculates the logical arm, data Arm, row number and parity arm
918 /* parity disk arm, first arm is 0 */
921 /* logical arm within row */
923 /* physical arm for data */
935 /* P Parity arm, note this can go negative adjust if negative */
1357 u8 bestArm, pd0, pd1, span, arm;
1365 arm = (io_info->span_arm & RAID_CTX_SPANARM_ARM_MASK);
1373 pd0 = MR_ArPdGet(arRef, arm, drv_map);
1374 pd1 = MR_ArPdGet(arRef, (arm + 1) >= span_row_size ?
1375 (arm + 1 - span_row_size) : arm + 1, drv_map);
1382 bestArm = arm;
1391 bestArm = (diff0 <= diff1 ? arm : arm ^ 1);
1396 if ((bestArm == arm && pend0 > pend1 + lb_pending_cmds) ||
1397 (bestArm != arm && pend1 > pend0 + lb_pending_cmds))
1403 io_info->pd_after_lb = (bestArm == arm) ? pd0 : pd1;
1418 /* get best new arm (PD ID) */