Lines Matching refs:map

73 #define SPAN_ROW_SIZE(map, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowSize)  argument
74 #define SPAN_ROW_DATA_SIZE(map_, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowDataSize)
78 static void mr_update_span_set(struct MR_DRV_RAID_MAP_ALL *map,
82 struct RAID_CONTEXT *pRAID_Context, struct MR_DRV_RAID_MAP_ALL *map);
84 u64 strip, struct MR_DRV_RAID_MAP_ALL *map);
118 struct MR_LD_RAID *MR_LdRaidGet(u32 ld, struct MR_DRV_RAID_MAP_ALL *map) in MR_LdRaidGet() argument
120 return &map->raidMap.ldSpanMap[ld].ldRaid; in MR_LdRaidGet()
125 *map) in MR_LdSpanInfoGet()
127 return &map->raidMap.ldSpanMap[ld].spanBlock[0]; in MR_LdSpanInfoGet()
130 static u8 MR_LdDataArmGet(u32 ld, u32 armIdx, struct MR_DRV_RAID_MAP_ALL *map) in MR_LdDataArmGet() argument
132 return map->raidMap.ldSpanMap[ld].dataArmMap[armIdx]; in MR_LdDataArmGet()
135 u16 MR_ArPdGet(u32 ar, u32 arm, struct MR_DRV_RAID_MAP_ALL *map) in MR_ArPdGet() argument
137 return le16_to_cpu(map->raidMap.arMapInfo[ar].pd[arm]); in MR_ArPdGet()
140 u16 MR_LdSpanArrayGet(u32 ld, u32 span, struct MR_DRV_RAID_MAP_ALL *map) in MR_LdSpanArrayGet() argument
142 return le16_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span].span.arrayRef); in MR_LdSpanArrayGet()
145 u16 MR_PdDevHandleGet(u32 pd, struct MR_DRV_RAID_MAP_ALL *map) in MR_PdDevHandleGet() argument
147 return map->raidMap.devHndlInfo[pd].curDevHdl; in MR_PdDevHandleGet()
150 u16 MR_GetLDTgtId(u32 ld, struct MR_DRV_RAID_MAP_ALL *map) in MR_GetLDTgtId() argument
152 return le16_to_cpu(map->raidMap.ldSpanMap[ld].ldRaid.targetId); in MR_GetLDTgtId()
155 u8 MR_TargetIdToLdGet(u32 ldTgtId, struct MR_DRV_RAID_MAP_ALL *map) in MR_TargetIdToLdGet() argument
157 return map->raidMap.ldTgtIdToLd[ldTgtId]; in MR_TargetIdToLdGet()
161 struct MR_DRV_RAID_MAP_ALL *map) in MR_LdSpanPtrGet() argument
163 return &map->raidMap.ldSpanMap[ld].spanBlock[span].span; in MR_LdSpanPtrGet()
308 struct MR_DRV_RAID_MAP_ALL *map) in MR_GetSpanBlock() argument
310 struct MR_SPAN_BLOCK_INFO *pSpanBlock = MR_LdSpanInfoGet(ld, map); in MR_GetSpanBlock()
312 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetSpanBlock()
350 static int getSpanInfo(struct MR_DRV_RAID_MAP_ALL *map, in getSpanInfo() argument
363 ld = MR_TargetIdToLdGet(ldCount, map); in getSpanInfo()
366 raid = MR_LdRaidGet(ld, map); in getSpanInfo()
372 le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in getSpanInfo()
401 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in getSpanInfo()
404 quad = &map->raidMap.ldSpanMap[ld]. in getSpanInfo()
444 u32 ld, u64 row, u64 *span_blk, struct MR_DRV_RAID_MAP_ALL *map) in mr_spanset_get_span_block() argument
447 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_span_block()
463 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in mr_spanset_get_span_block()
465 quad = &map->raidMap.ldSpanMap[ld]. in mr_spanset_get_span_block()
507 u32 ld, u64 strip, struct MR_DRV_RAID_MAP_ALL *map) in get_row_from_strip() argument
510 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_row_from_strip()
530 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in get_row_from_strip()
576 u32 ld, u64 row, struct MR_DRV_RAID_MAP_ALL *map) in get_strip_from_row() argument
579 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_strip_from_row()
595 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in get_strip_from_row()
597 quad = &map->raidMap.ldSpanMap[ld]. in get_strip_from_row()
637 u32 ld, u64 strip, struct MR_DRV_RAID_MAP_ALL *map) in get_arm_from_strip() argument
640 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm_from_strip()
658 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in get_arm_from_strip()
685 struct MR_DRV_RAID_MAP_ALL *map) in get_arm() argument
687 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm()
695 arm = mega_mod64(stripe, SPAN_ROW_SIZE(map, ld, span)); in get_arm()
699 arm = get_arm_from_strip(instance, ld, stripe, map); in get_arm()
729 struct MR_DRV_RAID_MAP_ALL *map) in mr_spanset_get_phy_params() argument
731 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_phy_params()
751 logArm = get_arm_from_strip(instance, ld, stripRow, map); in mr_spanset_get_phy_params()
754 rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span)); in mr_spanset_get_phy_params()
755 armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod; in mr_spanset_get_phy_params()
757 if (arm >= SPAN_ROW_SIZE(map, ld, span)) in mr_spanset_get_phy_params()
758 arm -= SPAN_ROW_SIZE(map, ld, span); in mr_spanset_get_phy_params()
762 physArm = get_arm(instance, ld, span, stripRow, map); in mr_spanset_get_phy_params()
766 arRef = MR_LdSpanArrayGet(ld, span, map); in mr_spanset_get_phy_params()
767 pd = MR_ArPdGet(arRef, physArm, map); in mr_spanset_get_phy_params()
770 *pDevHandle = MR_PdDevHandleGet(pd, map); in mr_spanset_get_phy_params()
778 pd = MR_ArPdGet(arRef, physArm + 1, map); in mr_spanset_get_phy_params()
780 *pDevHandle = MR_PdDevHandleGet(pd, map); in mr_spanset_get_phy_params()
784 *pdBlock += stripRef + le64_to_cpu(MR_LdSpanPtrGet(ld, span, map)->startBlk); in mr_spanset_get_phy_params()
811 struct MR_DRV_RAID_MAP_ALL *map) in MR_GetPhyParams() argument
813 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetPhyParams()
847 map); in MR_GetPhyParams()
854 span = (u8)MR_GetSpanBlock(ld, row, pdBlock, map); in MR_GetPhyParams()
860 arRef = MR_LdSpanArrayGet(ld, span, map); in MR_GetPhyParams()
861 pd = MR_ArPdGet(arRef, physArm, map); /* Get the pd */ in MR_GetPhyParams()
865 *pDevHandle = MR_PdDevHandleGet(pd, map); in MR_GetPhyParams()
874 pd = MR_ArPdGet(arRef, physArm + 1, map); in MR_GetPhyParams()
877 *pDevHandle = MR_PdDevHandleGet(pd, map); in MR_GetPhyParams()
881 *pdBlock += stripRef + le64_to_cpu(MR_LdSpanPtrGet(ld, span, map)->startBlk); in MR_GetPhyParams()
901 struct MR_DRV_RAID_MAP_ALL *map, u8 **raidLUN) in MR_BuildRaidContext() argument
924 ld = MR_TargetIdToLdGet(ldTgtId, map); in MR_BuildRaidContext()
925 raid = MR_LdRaidGet(ld, map); in MR_BuildRaidContext()
932 if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0) in MR_BuildRaidContext()
941 MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize); in MR_BuildRaidContext()
961 start_row = get_row_from_strip(instance, ld, start_strip, map); in MR_BuildRaidContext()
962 endRow = get_row_from_strip(instance, ld, endStrip, map); in MR_BuildRaidContext()
975 ld, start_row, pdBlock, map); in MR_BuildRaidContext()
1061 if (start_strip == (get_strip_from_row(instance, ld, start_row, map) + in MR_BuildRaidContext()
1062 SPAN_ROW_DATA_SIZE(map, ld, startlba_span) - 1)) { in MR_BuildRaidContext()
1076 if (endStrip == get_strip_from_row(instance, ld, endRow, map)) in MR_BuildRaidContext()
1085 map->raidMap.fpPdIoTimeoutSec); in MR_BuildRaidContext()
1107 io_info, pRAID_Context, map) : in MR_BuildRaidContext()
1110 pRAID_Context, map); in MR_BuildRaidContext()
1122 pRAID_Context, map) : in MR_BuildRaidContext()
1125 io_info, pRAID_Context, map); in MR_BuildRaidContext()
1134 get_arm_from_strip(instance, ld, start_strip, map); in MR_BuildRaidContext()
1150 void mr_update_span_set(struct MR_DRV_RAID_MAP_ALL *map, in mr_update_span_set() argument
1164 ld = MR_TargetIdToLdGet(ldCount, map); in mr_update_span_set()
1167 raid = MR_LdRaidGet(ld, map); in mr_update_span_set()
1170 if (le32_to_cpu(map->raidMap.ldSpanMap[ld].spanBlock[span]. in mr_update_span_set()
1175 quad = &map->raidMap.ldSpanMap[ld]. in mr_update_span_set()
1183 if (le32_to_cpu(map->raidMap.ldSpanMap[ld]. in mr_update_span_set()
1191 (ld, count, map)->spanRowDataSize; in mr_update_span_set()
1195 (ld, count, map)->spanRowDataSize); in mr_update_span_set()
1254 getSpanInfo(map, ldSpanInfo); in mr_update_span_set()