Lines Matching refs:map
81 #define SPAN_ROW_SIZE(map, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowSize) argument
82 #define SPAN_ROW_DATA_SIZE(map_, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowDataSize)
86 static void mr_update_span_set(struct MR_DRV_RAID_MAP_ALL *map,
90 struct RAID_CONTEXT *pRAID_Context, struct MR_DRV_RAID_MAP_ALL *map);
92 u64 strip, struct MR_DRV_RAID_MAP_ALL *map);
126 struct MR_LD_RAID *MR_LdRaidGet(u32 ld, struct MR_DRV_RAID_MAP_ALL *map) in MR_LdRaidGet() argument
128 return &map->raidMap.ldSpanMap[ld].ldRaid; in MR_LdRaidGet()
133 *map) in MR_LdSpanInfoGet()
135 return &map->raidMap.ldSpanMap[ld].spanBlock[0]; in MR_LdSpanInfoGet()
138 static u8 MR_LdDataArmGet(u32 ld, u32 armIdx, struct MR_DRV_RAID_MAP_ALL *map) in MR_LdDataArmGet() argument
140 return map->raidMap.ldSpanMap[ld].dataArmMap[armIdx]; in MR_LdDataArmGet()
143 u16 MR_ArPdGet(u32 ar, u32 arm, struct MR_DRV_RAID_MAP_ALL *map) in MR_ArPdGet() argument
145 return le16_to_cpu(map->raidMap.arMapInfo[ar].pd[arm]); in MR_ArPdGet()
148 u16 MR_LdSpanArrayGet(u32 ld, u32 span, struct MR_DRV_RAID_MAP_ALL *map) in MR_LdSpanArrayGet() argument
150 return le16_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span].span.arrayRef); in MR_LdSpanArrayGet()
153 __le16 MR_PdDevHandleGet(u32 pd, struct MR_DRV_RAID_MAP_ALL *map) in MR_PdDevHandleGet() argument
155 return map->raidMap.devHndlInfo[pd].curDevHdl; in MR_PdDevHandleGet()
158 u16 MR_GetLDTgtId(u32 ld, struct MR_DRV_RAID_MAP_ALL *map) in MR_GetLDTgtId() argument
160 return le16_to_cpu(map->raidMap.ldSpanMap[ld].ldRaid.targetId); in MR_GetLDTgtId()
163 u8 MR_TargetIdToLdGet(u32 ldTgtId, struct MR_DRV_RAID_MAP_ALL *map) in MR_TargetIdToLdGet() argument
165 return map->raidMap.ldTgtIdToLd[ldTgtId]; in MR_TargetIdToLdGet()
169 struct MR_DRV_RAID_MAP_ALL *map) in MR_LdSpanPtrGet() argument
171 return &map->raidMap.ldSpanMap[ld].spanBlock[span].span; in MR_LdSpanPtrGet()
316 struct MR_DRV_RAID_MAP_ALL *map) in MR_GetSpanBlock() argument
318 struct MR_SPAN_BLOCK_INFO *pSpanBlock = MR_LdSpanInfoGet(ld, map); in MR_GetSpanBlock()
320 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetSpanBlock()
358 static int getSpanInfo(struct MR_DRV_RAID_MAP_ALL *map, in getSpanInfo() argument
371 ld = MR_TargetIdToLdGet(ldCount, map); in getSpanInfo()
374 raid = MR_LdRaidGet(ld, map); in getSpanInfo()
380 le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in getSpanInfo()
409 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in getSpanInfo()
412 quad = &map->raidMap.ldSpanMap[ld]. in getSpanInfo()
452 u32 ld, u64 row, u64 *span_blk, struct MR_DRV_RAID_MAP_ALL *map) in mr_spanset_get_span_block() argument
455 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_span_block()
471 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in mr_spanset_get_span_block()
473 quad = &map->raidMap.ldSpanMap[ld]. in mr_spanset_get_span_block()
515 u32 ld, u64 strip, struct MR_DRV_RAID_MAP_ALL *map) in get_row_from_strip() argument
518 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_row_from_strip()
538 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in get_row_from_strip()
584 u32 ld, u64 row, struct MR_DRV_RAID_MAP_ALL *map) in get_strip_from_row() argument
587 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_strip_from_row()
603 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in get_strip_from_row()
605 quad = &map->raidMap.ldSpanMap[ld]. in get_strip_from_row()
645 u32 ld, u64 strip, struct MR_DRV_RAID_MAP_ALL *map) in get_arm_from_strip() argument
648 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm_from_strip()
666 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in get_arm_from_strip()
693 struct MR_DRV_RAID_MAP_ALL *map) in get_arm() argument
695 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm()
703 arm = mega_mod64(stripe, SPAN_ROW_SIZE(map, ld, span)); in get_arm()
707 arm = get_arm_from_strip(instance, ld, stripe, map); in get_arm()
737 struct MR_DRV_RAID_MAP_ALL *map) in mr_spanset_get_phy_params() argument
739 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_phy_params()
757 logArm = get_arm_from_strip(instance, ld, stripRow, map); in mr_spanset_get_phy_params()
760 rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span)); in mr_spanset_get_phy_params()
761 armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod; in mr_spanset_get_phy_params()
763 if (arm >= SPAN_ROW_SIZE(map, ld, span)) in mr_spanset_get_phy_params()
764 arm -= SPAN_ROW_SIZE(map, ld, span); in mr_spanset_get_phy_params()
768 physArm = get_arm(instance, ld, span, stripRow, map); in mr_spanset_get_phy_params()
772 arRef = MR_LdSpanArrayGet(ld, span, map); in mr_spanset_get_phy_params()
773 pd = MR_ArPdGet(arRef, physArm, map); in mr_spanset_get_phy_params()
776 *pDevHandle = MR_PdDevHandleGet(pd, map); in mr_spanset_get_phy_params()
785 pd = MR_ArPdGet(arRef, physArm + 1, map); in mr_spanset_get_phy_params()
787 *pDevHandle = MR_PdDevHandleGet(pd, map); in mr_spanset_get_phy_params()
791 *pdBlock += stripRef + le64_to_cpu(MR_LdSpanPtrGet(ld, span, map)->startBlk); in mr_spanset_get_phy_params()
818 struct MR_DRV_RAID_MAP_ALL *map) in MR_GetPhyParams() argument
820 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetPhyParams()
853 map); in MR_GetPhyParams()
860 span = (u8)MR_GetSpanBlock(ld, row, pdBlock, map); in MR_GetPhyParams()
866 arRef = MR_LdSpanArrayGet(ld, span, map); in MR_GetPhyParams()
867 pd = MR_ArPdGet(arRef, physArm, map); /* Get the pd */ in MR_GetPhyParams()
871 *pDevHandle = MR_PdDevHandleGet(pd, map); in MR_GetPhyParams()
882 pd = MR_ArPdGet(arRef, physArm + 1, map); in MR_GetPhyParams()
885 *pDevHandle = MR_PdDevHandleGet(pd, map); in MR_GetPhyParams()
889 *pdBlock += stripRef + le64_to_cpu(MR_LdSpanPtrGet(ld, span, map)->startBlk); in MR_GetPhyParams()
909 struct MR_DRV_RAID_MAP_ALL *map, u8 **raidLUN) in MR_BuildRaidContext() argument
934 ld = MR_TargetIdToLdGet(ldTgtId, map); in MR_BuildRaidContext()
935 raid = MR_LdRaidGet(ld, map); in MR_BuildRaidContext()
942 if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0) in MR_BuildRaidContext()
951 MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize); in MR_BuildRaidContext()
971 start_row = get_row_from_strip(instance, ld, start_strip, map); in MR_BuildRaidContext()
972 endRow = get_row_from_strip(instance, ld, endStrip, map); in MR_BuildRaidContext()
985 ld, start_row, pdBlock, map); in MR_BuildRaidContext()
1071 if (start_strip == (get_strip_from_row(instance, ld, start_row, map) + in MR_BuildRaidContext()
1072 SPAN_ROW_DATA_SIZE(map, ld, startlba_span) - 1)) { in MR_BuildRaidContext()
1086 if (endStrip == get_strip_from_row(instance, ld, endRow, map)) in MR_BuildRaidContext()
1095 map->raidMap.fpPdIoTimeoutSec); in MR_BuildRaidContext()
1116 io_info, pRAID_Context, map) : in MR_BuildRaidContext()
1119 pRAID_Context, map); in MR_BuildRaidContext()
1131 pRAID_Context, map) : in MR_BuildRaidContext()
1134 io_info, pRAID_Context, map); in MR_BuildRaidContext()
1143 get_arm_from_strip(instance, ld, start_strip, map); in MR_BuildRaidContext()
1159 void mr_update_span_set(struct MR_DRV_RAID_MAP_ALL *map, in mr_update_span_set() argument
1173 ld = MR_TargetIdToLdGet(ldCount, map); in mr_update_span_set()
1176 raid = MR_LdRaidGet(ld, map); in mr_update_span_set()
1179 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in mr_update_span_set()
1184 quad = &map->raidMap.ldSpanMap[ld]. in mr_update_span_set()
1192 if (le32_to_cpu(map->raidMap.ldSpanMap[ld]. in mr_update_span_set()
1200 (ld, count, map)->spanRowDataSize; in mr_update_span_set()
1259 getSpanInfo(map, ldSpanInfo); in mr_update_span_set()