Selaa lähdekoodia

qcacld-3.0: Send high 32bit addr for no smmu platform which fw need

Host send HTT_H2T_MSG_TYPE_WDI_IPA_CFG cmd to fw, need update
high 32bit addr for non-smmu platform which alloc physical
address more than 4G.
If alloc address is 0x1 5000 0000, it will cut off
bit32 ~ bit63, the value fw get is 0x5000 0000, the address
may be used by peripheral. When fw write addr 0x5000 0000,
assert will happen.

When this change compile on 32bit platform, it will error, for
right shift must less than system width.

Change-Id: If1e84cfdcd15494be3f7327986ff0e91ec7b2b3f
CRs-Fixed: 3097240
chunquan 3 vuotta sitten
vanhempi
sitoutus
89d3e86717
1 muutettua tiedostoa jossa 9 lisäystä ja 9 poistoa
  1. 9 9
      core/dp/htt/htt_h2t.c

+ 9 - 9
core/dp/htt/htt_h2t.c

@@ -1062,7 +1062,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 	msg_word++;
 	*msg_word = 0;
 	mem_info_t = &pdev->ipa_uc_tx_rsc.tx_comp_ring->mem_info;
-	addr = (uint32_t)(qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32);
+	addr = (uint64_t)qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32;
 	HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1076,7 +1076,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 		(unsigned int)pdev->ipa_uc_tx_rsc.tx_comp_idx_paddr);
 	msg_word++;
 	*msg_word = 0;
-	addr = (uint32_t)(pdev->ipa_uc_tx_rsc.tx_comp_idx_paddr >> 32);
+	addr = (uint64_t)pdev->ipa_uc_tx_rsc.tx_comp_idx_paddr >> 32;
 	HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1087,7 +1087,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 	msg_word++;
 	*msg_word = 0;
 	mem_info_t = &pdev->ipa_uc_tx_rsc.tx_ce_idx->mem_info;
-	addr = (uint32_t)(qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32);
+	addr = (uint64_t)qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32;
 	HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1098,7 +1098,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 	msg_word++;
 	*msg_word = 0;
 	mem_info_t = &pdev->ipa_uc_rx_rsc.rx_ind_ring->mem_info;
-	addr = (uint32_t)(qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32);
+	addr = (uint64_t)qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32;
 	HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1114,7 +1114,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 	msg_word++;
 	*msg_word = 0;
 	mem_info_t = &pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx->mem_info;
-	addr = (uint32_t)(qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32);
+	addr = (uint64_t)qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32;
 	HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1123,7 +1123,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 		(unsigned int)pdev->ipa_uc_rx_rsc.rx_rdy_idx_paddr);
 	msg_word++;
 	*msg_word = 0;
-	addr = (uint32_t)(pdev->ipa_uc_rx_rsc.rx_rdy_idx_paddr >> 32);
+	addr = (uint64_t)pdev->ipa_uc_rx_rsc.rx_rdy_idx_paddr >> 32;
 	HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1134,7 +1134,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 	msg_word++;
 	*msg_word = 0;
 	mem_info_t = &pdev->ipa_uc_rx_rsc.rx2_ind_ring->mem_info;
-	addr = (uint32_t)(qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32);
+	addr = (uint64_t)qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32;
 	HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1150,7 +1150,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 	msg_word++;
 	*msg_word = 0;
 	mem_info_t = &pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx->mem_info;
-	addr = (uint32_t)(qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32);
+	addr = (uint64_t)qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32;
 	HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_SET(*msg_word, addr);
 
 	msg_word++;
@@ -1161,7 +1161,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
 	msg_word++;
 	*msg_word = 0;
 	mem_info_t = &pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx->mem_info;
-	addr = (uint32_t)(qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32);
+	addr = (uint64_t)qdf_mem_get_dma_addr(pdev->osdev, mem_info_t) >> 32;
 	HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_SET(*msg_word, addr);
 
 	SET_HTC_PACKET_INFO_TX(&pkt->htc_pkt,