dp_be.c 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033
  1. /*
  2. * Copyright (c) 2021 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #include <wlan_utility.h>
  19. #include <dp_internal.h>
  20. #include <dp_htt.h>
  21. #include "dp_be.h"
  22. #include "dp_be_tx.h"
  23. #include "dp_be_rx.h"
  24. #include <hal_be_api.h>
  25. /* Generic AST entry aging timer value */
  26. #define DP_AST_AGING_TIMER_DEFAULT_MS 5000
  27. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  28. #define DP_TX_VDEV_ID_CHECK_ENABLE 0
  29. static struct wlan_cfg_tcl_wbm_ring_num_map g_tcl_wbm_map_array[MAX_TCL_DATA_RINGS] = {
  30. {.tcl_ring_num = 0, .wbm_ring_num = 0, .wbm_rbm_id = HAL_BE_WBM_SW0_BM_ID, .for_ipa = 0},
  31. {1, 4, HAL_BE_WBM_SW4_BM_ID, 0},
  32. {2, 2, HAL_BE_WBM_SW2_BM_ID, 0},
  33. {3, 6, HAL_BE_WBM_SW5_BM_ID, 0},
  34. {4, 7, HAL_BE_WBM_SW6_BM_ID, 0}
  35. };
  36. #else
  37. #define DP_TX_VDEV_ID_CHECK_ENABLE 1
  38. static struct wlan_cfg_tcl_wbm_ring_num_map g_tcl_wbm_map_array[MAX_TCL_DATA_RINGS] = {
  39. {.tcl_ring_num = 0, .wbm_ring_num = 0, .wbm_rbm_id = HAL_BE_WBM_SW0_BM_ID, .for_ipa = 0},
  40. {1, 1, HAL_BE_WBM_SW1_BM_ID, 0},
  41. {2, 2, HAL_BE_WBM_SW2_BM_ID, 0},
  42. {3, 3, HAL_BE_WBM_SW3_BM_ID, 0},
  43. {4, 4, HAL_BE_WBM_SW4_BM_ID, 0}
  44. };
  45. #endif
  46. static void dp_soc_cfg_attach_be(struct dp_soc *soc)
  47. {
  48. struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx = soc->wlan_cfg_ctx;
  49. wlan_cfg_set_rx_rel_ring_id(soc_cfg_ctx, WBM2SW_REL_ERR_RING_NUM);
  50. soc->wlan_cfg_ctx->tcl_wbm_map_array = g_tcl_wbm_map_array;
  51. /* this is used only when dmac mode is enabled */
  52. soc->num_rx_refill_buf_rings = 1;
  53. }
  54. qdf_size_t dp_get_context_size_be(enum dp_context_type context_type)
  55. {
  56. switch (context_type) {
  57. case DP_CONTEXT_TYPE_SOC:
  58. return sizeof(struct dp_soc_be);
  59. case DP_CONTEXT_TYPE_PDEV:
  60. return sizeof(struct dp_pdev_be);
  61. case DP_CONTEXT_TYPE_VDEV:
  62. return sizeof(struct dp_vdev_be);
  63. case DP_CONTEXT_TYPE_PEER:
  64. return sizeof(struct dp_peer_be);
  65. default:
  66. return 0;
  67. }
  68. }
  69. #ifdef DP_FEATURE_HW_COOKIE_CONVERSION
  70. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  71. /**
  72. * dp_cc_wbm_sw_en_cfg() - configure HW cookie conversion enablement
  73. per wbm2sw ring
  74. * @cc_cfg: HAL HW cookie conversion configuration structure pointer
  75. *
  76. * Return: None
  77. */
  78. static inline
  79. void dp_cc_wbm_sw_en_cfg(struct hal_hw_cc_config *cc_cfg)
  80. {
  81. cc_cfg->wbm2sw6_cc_en = 1;
  82. cc_cfg->wbm2sw5_cc_en = 1;
  83. cc_cfg->wbm2sw4_cc_en = 1;
  84. cc_cfg->wbm2sw3_cc_en = 1;
  85. cc_cfg->wbm2sw2_cc_en = 1;
  86. /* disable wbm2sw1 hw cc as it's for FW */
  87. cc_cfg->wbm2sw1_cc_en = 0;
  88. cc_cfg->wbm2sw0_cc_en = 1;
  89. cc_cfg->wbm2fw_cc_en = 0;
  90. }
  91. #else
  92. static inline
  93. void dp_cc_wbm_sw_en_cfg(struct hal_hw_cc_config *cc_cfg)
  94. {
  95. cc_cfg->wbm2sw6_cc_en = 1;
  96. cc_cfg->wbm2sw5_cc_en = 1;
  97. cc_cfg->wbm2sw4_cc_en = 1;
  98. cc_cfg->wbm2sw3_cc_en = 1;
  99. cc_cfg->wbm2sw2_cc_en = 1;
  100. cc_cfg->wbm2sw1_cc_en = 1;
  101. cc_cfg->wbm2sw0_cc_en = 1;
  102. cc_cfg->wbm2fw_cc_en = 0;
  103. }
  104. #endif
  105. /**
  106. * dp_cc_reg_cfg_init() - initialize and configure HW cookie
  107. conversion register
  108. * @soc: SOC handle
  109. * @cc_ctx: cookie conversion context pointer
  110. * @is_4k_align: page address 4k alignd
  111. *
  112. * Return: None
  113. */
  114. static void dp_cc_reg_cfg_init(struct dp_soc *soc,
  115. struct dp_hw_cookie_conversion_t *cc_ctx,
  116. bool is_4k_align)
  117. {
  118. struct hal_hw_cc_config cc_cfg = { 0 };
  119. if (soc->cdp_soc.ol_ops->get_con_mode &&
  120. soc->cdp_soc.ol_ops->get_con_mode() == QDF_GLOBAL_FTM_MODE)
  121. return;
  122. if (!soc->wlan_cfg_ctx->hw_cc_enabled) {
  123. dp_info("INI skip HW CC register setting");
  124. return;
  125. }
  126. cc_cfg.lut_base_addr_31_0 = cc_ctx->cmem_base;
  127. cc_cfg.cc_global_en = true;
  128. cc_cfg.page_4k_align = is_4k_align;
  129. cc_cfg.cookie_offset_msb = DP_CC_DESC_ID_SPT_VA_OS_MSB;
  130. cc_cfg.cookie_page_msb = DP_CC_DESC_ID_PPT_PAGE_OS_MSB;
  131. /* 36th bit should be 1 then HW know this is CMEM address */
  132. cc_cfg.lut_base_addr_39_32 = 0x10;
  133. cc_cfg.error_path_cookie_conv_en = true;
  134. cc_cfg.release_path_cookie_conv_en = true;
  135. dp_cc_wbm_sw_en_cfg(&cc_cfg);
  136. hal_cookie_conversion_reg_cfg_be(soc->hal_soc, &cc_cfg);
  137. }
  138. /**
  139. * dp_hw_cc_cmem_write() - DP wrapper function for CMEM buffer writing
  140. * @hal_soc_hdl: HAL SOC handle
  141. * @offset: CMEM address
  142. * @value: value to write
  143. *
  144. * Return: None.
  145. */
  146. static inline void dp_hw_cc_cmem_write(hal_soc_handle_t hal_soc_hdl,
  147. uint32_t offset,
  148. uint32_t value)
  149. {
  150. hal_cmem_write(hal_soc_hdl, offset, value);
  151. }
  152. /**
  153. * dp_hw_cc_cmem_addr_init() - Check and initialize CMEM base address for
  154. HW cookie conversion
  155. * @soc: SOC handle
  156. * @cc_ctx: cookie conversion context pointer
  157. *
  158. * Return: 0 in case of success, else error value
  159. */
  160. static inline QDF_STATUS dp_hw_cc_cmem_addr_init(
  161. struct dp_soc *soc,
  162. struct dp_hw_cookie_conversion_t *cc_ctx)
  163. {
  164. dp_info("cmem base 0x%llx, size 0x%llx",
  165. soc->cmem_base, soc->cmem_size);
  166. /* get CMEM for cookie conversion */
  167. if (soc->cmem_size < DP_CC_PPT_MEM_SIZE) {
  168. dp_err("cmem_size %llu bytes < 4K", soc->cmem_size);
  169. return QDF_STATUS_E_RESOURCES;
  170. }
  171. cc_ctx->cmem_base = (uint32_t)(soc->cmem_base +
  172. DP_CC_MEM_OFFSET_IN_CMEM);
  173. return QDF_STATUS_SUCCESS;
  174. }
  175. #else
  176. static inline void dp_cc_reg_cfg_init(struct dp_soc *soc,
  177. struct dp_hw_cookie_conversion_t *cc_ctx,
  178. bool is_4k_align) {}
  179. static inline void dp_hw_cc_cmem_write(hal_soc_handle_t hal_soc_hdl,
  180. uint32_t offset,
  181. uint32_t value)
  182. { }
  183. static inline QDF_STATUS dp_hw_cc_cmem_addr_init(
  184. struct dp_soc *soc,
  185. struct dp_hw_cookie_conversion_t *cc_ctx)
  186. {
  187. return QDF_STATUS_SUCCESS;
  188. }
  189. #endif
  190. static QDF_STATUS dp_hw_cookie_conversion_attach(struct dp_soc_be *be_soc)
  191. {
  192. struct dp_soc *soc = DP_SOC_BE_GET_SOC(be_soc);
  193. struct dp_hw_cookie_conversion_t *cc_ctx = &be_soc->hw_cc_ctx;
  194. uint32_t max_tx_rx_desc_num, num_spt_pages, i = 0;
  195. struct dp_spt_page_desc *spt_desc;
  196. struct qdf_mem_dma_page_t *dma_page;
  197. QDF_STATUS qdf_status;
  198. qdf_status = dp_hw_cc_cmem_addr_init(soc, cc_ctx);
  199. if (!QDF_IS_STATUS_SUCCESS(qdf_status))
  200. return qdf_status;
  201. /* estimate how many SPT DDR pages needed */
  202. max_tx_rx_desc_num = WLAN_CFG_NUM_TX_DESC_MAX * MAX_TXDESC_POOLS +
  203. WLAN_CFG_RX_SW_DESC_NUM_SIZE_MAX * MAX_RXDESC_POOLS;
  204. num_spt_pages = max_tx_rx_desc_num / DP_CC_SPT_PAGE_MAX_ENTRIES;
  205. num_spt_pages = num_spt_pages <= DP_CC_PPT_MAX_ENTRIES ?
  206. num_spt_pages : DP_CC_PPT_MAX_ENTRIES;
  207. dp_info("num_spt_pages needed %d", num_spt_pages);
  208. dp_desc_multi_pages_mem_alloc(soc, DP_HW_CC_SPT_PAGE_TYPE,
  209. &cc_ctx->page_pool, qdf_page_size,
  210. num_spt_pages, 0, false);
  211. if (!cc_ctx->page_pool.dma_pages) {
  212. dp_err("spt ddr pages allocation failed");
  213. return QDF_STATUS_E_RESOURCES;
  214. }
  215. cc_ctx->page_desc_base = qdf_mem_malloc(
  216. num_spt_pages * sizeof(struct dp_spt_page_desc));
  217. if (!cc_ctx->page_desc_base) {
  218. dp_err("spt page descs allocation failed");
  219. goto fail_0;
  220. }
  221. /* initial page desc */
  222. spt_desc = cc_ctx->page_desc_base;
  223. dma_page = cc_ctx->page_pool.dma_pages;
  224. while (i < num_spt_pages) {
  225. /* check if page address 4K aligned */
  226. if (qdf_unlikely(dma_page[i].page_p_addr & 0xFFF)) {
  227. dp_err("non-4k aligned pages addr %pK",
  228. (void *)dma_page[i].page_p_addr);
  229. goto fail_1;
  230. }
  231. spt_desc[i].page_v_addr =
  232. dma_page[i].page_v_addr_start;
  233. spt_desc[i].page_p_addr =
  234. dma_page[i].page_p_addr;
  235. i++;
  236. }
  237. cc_ctx->total_page_num = num_spt_pages;
  238. qdf_spinlock_create(&cc_ctx->cc_lock);
  239. return QDF_STATUS_SUCCESS;
  240. fail_1:
  241. qdf_mem_free(cc_ctx->page_desc_base);
  242. fail_0:
  243. dp_desc_multi_pages_mem_free(soc, DP_HW_CC_SPT_PAGE_TYPE,
  244. &cc_ctx->page_pool, 0, false);
  245. return QDF_STATUS_E_FAILURE;
  246. }
  247. static QDF_STATUS dp_hw_cookie_conversion_detach(struct dp_soc_be *be_soc)
  248. {
  249. struct dp_soc *soc = DP_SOC_BE_GET_SOC(be_soc);
  250. struct dp_hw_cookie_conversion_t *cc_ctx = &be_soc->hw_cc_ctx;
  251. qdf_mem_free(cc_ctx->page_desc_base);
  252. dp_desc_multi_pages_mem_free(soc, DP_HW_CC_SPT_PAGE_TYPE,
  253. &cc_ctx->page_pool, 0, false);
  254. qdf_spinlock_destroy(&cc_ctx->cc_lock);
  255. return QDF_STATUS_SUCCESS;
  256. }
  257. static QDF_STATUS dp_hw_cookie_conversion_init(struct dp_soc_be *be_soc)
  258. {
  259. struct dp_soc *soc = DP_SOC_BE_GET_SOC(be_soc);
  260. struct dp_hw_cookie_conversion_t *cc_ctx = &be_soc->hw_cc_ctx;
  261. uint32_t i = 0;
  262. struct dp_spt_page_desc *spt_desc;
  263. if (!cc_ctx->total_page_num) {
  264. dp_err("total page num is 0");
  265. return QDF_STATUS_E_INVAL;
  266. }
  267. spt_desc = cc_ctx->page_desc_base;
  268. while (i < cc_ctx->total_page_num) {
  269. /* write page PA to CMEM */
  270. dp_hw_cc_cmem_write(soc->hal_soc,
  271. (cc_ctx->cmem_base +
  272. i * DP_CC_PPT_ENTRY_SIZE_4K_ALIGNED),
  273. (spt_desc[i].page_p_addr >>
  274. DP_CC_PPT_ENTRY_HW_APEND_BITS_4K_ALIGNED));
  275. spt_desc[i].ppt_index = i;
  276. spt_desc[i].avail_entry_index = 0;
  277. /* link page desc */
  278. if ((i + 1) != cc_ctx->total_page_num)
  279. spt_desc[i].next = &spt_desc[i + 1];
  280. else
  281. spt_desc[i].next = NULL;
  282. i++;
  283. }
  284. cc_ctx->page_desc_freelist = cc_ctx->page_desc_base;
  285. cc_ctx->free_page_num = cc_ctx->total_page_num;
  286. /* write WBM/REO cookie conversion CFG register */
  287. dp_cc_reg_cfg_init(soc, cc_ctx, true);
  288. return QDF_STATUS_SUCCESS;
  289. }
  290. static QDF_STATUS dp_hw_cookie_conversion_deinit(struct dp_soc_be *be_soc)
  291. {
  292. struct dp_hw_cookie_conversion_t *cc_ctx = &be_soc->hw_cc_ctx;
  293. cc_ctx->page_desc_freelist = NULL;
  294. cc_ctx->free_page_num = 0;
  295. return QDF_STATUS_SUCCESS;
  296. }
  297. uint16_t dp_cc_spt_page_desc_alloc(struct dp_soc_be *be_soc,
  298. struct dp_spt_page_desc **list_head,
  299. struct dp_spt_page_desc **list_tail,
  300. uint16_t num_desc)
  301. {
  302. uint16_t num_pages, count;
  303. struct dp_hw_cookie_conversion_t *cc_ctx = &be_soc->hw_cc_ctx;
  304. num_pages = (num_desc / DP_CC_SPT_PAGE_MAX_ENTRIES) +
  305. (num_desc % DP_CC_SPT_PAGE_MAX_ENTRIES ? 1 : 0);
  306. if (num_pages > cc_ctx->free_page_num) {
  307. dp_err("fail: num_pages required %d > free_page_num %d",
  308. num_pages,
  309. cc_ctx->free_page_num);
  310. return 0;
  311. }
  312. qdf_spin_lock_bh(&cc_ctx->cc_lock);
  313. *list_head = *list_tail = cc_ctx->page_desc_freelist;
  314. for (count = 0; count < num_pages; count++) {
  315. if (qdf_unlikely(!cc_ctx->page_desc_freelist)) {
  316. cc_ctx->page_desc_freelist = *list_head;
  317. *list_head = *list_tail = NULL;
  318. qdf_spin_unlock_bh(&cc_ctx->cc_lock);
  319. return 0;
  320. }
  321. *list_tail = cc_ctx->page_desc_freelist;
  322. cc_ctx->page_desc_freelist = cc_ctx->page_desc_freelist->next;
  323. }
  324. (*list_tail)->next = NULL;
  325. cc_ctx->free_page_num -= count;
  326. qdf_spin_unlock_bh(&cc_ctx->cc_lock);
  327. return count;
  328. }
  329. void dp_cc_spt_page_desc_free(struct dp_soc_be *be_soc,
  330. struct dp_spt_page_desc **list_head,
  331. struct dp_spt_page_desc **list_tail,
  332. uint16_t page_nums)
  333. {
  334. struct dp_hw_cookie_conversion_t *cc_ctx = &be_soc->hw_cc_ctx;
  335. struct dp_spt_page_desc *temp_list = NULL;
  336. qdf_spin_lock_bh(&cc_ctx->cc_lock);
  337. temp_list = cc_ctx->page_desc_freelist;
  338. cc_ctx->page_desc_freelist = *list_head;
  339. (*list_tail)->next = temp_list;
  340. cc_ctx->free_page_num += page_nums;
  341. *list_tail = NULL;
  342. *list_head = NULL;
  343. qdf_spin_unlock_bh(&cc_ctx->cc_lock);
  344. }
  345. static QDF_STATUS dp_soc_attach_be(struct dp_soc *soc)
  346. {
  347. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  348. QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
  349. soc->wbm_sw0_bm_id = hal_tx_get_wbm_sw0_bm_id();
  350. qdf_status = dp_tx_init_bank_profiles(be_soc);
  351. /* cookie conversion */
  352. qdf_status = dp_hw_cookie_conversion_attach(be_soc);
  353. return qdf_status;
  354. }
  355. static QDF_STATUS dp_soc_detach_be(struct dp_soc *soc)
  356. {
  357. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  358. dp_tx_deinit_bank_profiles(be_soc);
  359. dp_hw_cookie_conversion_detach(be_soc);
  360. return QDF_STATUS_SUCCESS;
  361. }
  362. static QDF_STATUS dp_soc_init_be(struct dp_soc *soc)
  363. {
  364. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  365. QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
  366. qdf_status = dp_hw_cookie_conversion_init(be_soc);
  367. /* route vdev_id mismatch notification via FW completion */
  368. hal_tx_vdev_mismatch_routing_set(soc->hal_soc,
  369. HAL_TX_VDEV_MISMATCH_FW_NOTIFY);
  370. return qdf_status;
  371. }
  372. static QDF_STATUS dp_soc_deinit_be(struct dp_soc *soc)
  373. {
  374. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  375. dp_hw_cookie_conversion_deinit(be_soc);
  376. return QDF_STATUS_SUCCESS;
  377. }
  378. static QDF_STATUS dp_pdev_attach_be(struct dp_pdev *pdev)
  379. {
  380. return QDF_STATUS_SUCCESS;
  381. }
  382. static QDF_STATUS dp_pdev_detach_be(struct dp_pdev *pdev)
  383. {
  384. return QDF_STATUS_SUCCESS;
  385. }
  386. static QDF_STATUS dp_vdev_attach_be(struct dp_soc *soc, struct dp_vdev *vdev)
  387. {
  388. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  389. struct dp_vdev_be *be_vdev = dp_get_be_vdev_from_dp_vdev(vdev);
  390. be_vdev->vdev_id_check_en = DP_TX_VDEV_ID_CHECK_ENABLE;
  391. be_vdev->bank_id = dp_tx_get_bank_profile(be_soc, be_vdev);
  392. if (be_vdev->bank_id == DP_BE_INVALID_BANK_ID) {
  393. QDF_BUG(0);
  394. return QDF_STATUS_E_FAULT;
  395. }
  396. if (vdev->opmode == wlan_op_mode_sta) {
  397. if (soc->cdp_soc.ol_ops->set_mec_timer)
  398. soc->cdp_soc.ol_ops->set_mec_timer(
  399. soc->ctrl_psoc,
  400. vdev->vdev_id,
  401. DP_AST_AGING_TIMER_DEFAULT_MS);
  402. hal_tx_vdev_mcast_ctrl_set(soc->hal_soc, vdev->vdev_id,
  403. HAL_TX_MCAST_CTRL_MEC_NOTIFY);
  404. }
  405. return QDF_STATUS_SUCCESS;
  406. }
  407. static QDF_STATUS dp_vdev_detach_be(struct dp_soc *soc, struct dp_vdev *vdev)
  408. {
  409. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  410. struct dp_vdev_be *be_vdev = dp_get_be_vdev_from_dp_vdev(vdev);
  411. dp_tx_put_bank_profile(be_soc, be_vdev);
  412. return QDF_STATUS_SUCCESS;
  413. }
  414. qdf_size_t dp_get_soc_context_size_be(void)
  415. {
  416. return sizeof(struct dp_soc_be);
  417. }
  418. /**
  419. * dp_rxdma_ring_sel_cfg_be() - Setup RXDMA ring config
  420. * @soc: Common DP soc handle
  421. *
  422. * Return: QDF_STATUS
  423. */
  424. static QDF_STATUS
  425. dp_rxdma_ring_sel_cfg_be(struct dp_soc *soc)
  426. {
  427. int i;
  428. int mac_id;
  429. struct htt_rx_ring_tlv_filter htt_tlv_filter = {0};
  430. struct dp_srng *rx_mac_srng;
  431. QDF_STATUS status = QDF_STATUS_SUCCESS;
  432. /*
  433. * In Beryllium chipset msdu_start, mpdu_end
  434. * and rx_attn are part of msdu_end/mpdu_start
  435. */
  436. htt_tlv_filter.msdu_start = 0;
  437. htt_tlv_filter.mpdu_end = 0;
  438. htt_tlv_filter.attention = 0;
  439. htt_tlv_filter.mpdu_start = 1;
  440. htt_tlv_filter.msdu_end = 1;
  441. htt_tlv_filter.packet = 1;
  442. htt_tlv_filter.packet_header = 1;
  443. htt_tlv_filter.ppdu_start = 0;
  444. htt_tlv_filter.ppdu_end = 0;
  445. htt_tlv_filter.ppdu_end_user_stats = 0;
  446. htt_tlv_filter.ppdu_end_user_stats_ext = 0;
  447. htt_tlv_filter.ppdu_end_status_done = 0;
  448. htt_tlv_filter.enable_fp = 1;
  449. htt_tlv_filter.enable_md = 0;
  450. htt_tlv_filter.enable_md = 0;
  451. htt_tlv_filter.enable_mo = 0;
  452. htt_tlv_filter.fp_mgmt_filter = 0;
  453. htt_tlv_filter.fp_ctrl_filter = FILTER_CTRL_BA_REQ;
  454. htt_tlv_filter.fp_data_filter = (FILTER_DATA_UCAST |
  455. FILTER_DATA_MCAST |
  456. FILTER_DATA_DATA);
  457. htt_tlv_filter.mo_mgmt_filter = 0;
  458. htt_tlv_filter.mo_ctrl_filter = 0;
  459. htt_tlv_filter.mo_data_filter = 0;
  460. htt_tlv_filter.md_data_filter = 0;
  461. htt_tlv_filter.offset_valid = true;
  462. /* Not subscribing to mpdu_end, msdu_start and rx_attn */
  463. htt_tlv_filter.rx_mpdu_end_offset = 0;
  464. htt_tlv_filter.rx_msdu_start_offset = 0;
  465. htt_tlv_filter.rx_attn_offset = 0;
  466. htt_tlv_filter.rx_packet_offset = soc->rx_pkt_tlv_size;
  467. htt_tlv_filter.rx_header_offset =
  468. hal_rx_pkt_tlv_offset_get(soc->hal_soc);
  469. htt_tlv_filter.rx_mpdu_start_offset =
  470. hal_rx_mpdu_start_offset_get(soc->hal_soc);
  471. htt_tlv_filter.rx_msdu_end_offset =
  472. hal_rx_msdu_end_offset_get(soc->hal_soc);
  473. dp_info("TLV subscription\n"
  474. "msdu_start %d, mpdu_end %d, attention %d"
  475. "mpdu_start %d, msdu_end %d, pkt_hdr %d, pkt %d\n"
  476. "TLV offsets\n"
  477. "msdu_start %d, mpdu_end %d, attention %d"
  478. "mpdu_start %d, msdu_end %d, pkt_hdr %d, pkt %d\n",
  479. htt_tlv_filter.msdu_start,
  480. htt_tlv_filter.mpdu_end,
  481. htt_tlv_filter.attention,
  482. htt_tlv_filter.mpdu_start,
  483. htt_tlv_filter.msdu_end,
  484. htt_tlv_filter.packet_header,
  485. htt_tlv_filter.packet,
  486. htt_tlv_filter.rx_msdu_start_offset,
  487. htt_tlv_filter.rx_mpdu_end_offset,
  488. htt_tlv_filter.rx_attn_offset,
  489. htt_tlv_filter.rx_mpdu_start_offset,
  490. htt_tlv_filter.rx_msdu_end_offset,
  491. htt_tlv_filter.rx_header_offset,
  492. htt_tlv_filter.rx_packet_offset);
  493. for (i = 0; i < MAX_PDEV_CNT; i++) {
  494. struct dp_pdev *pdev = soc->pdev_list[i];
  495. if (!pdev)
  496. continue;
  497. for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
  498. int mac_for_pdev =
  499. dp_get_mac_id_for_pdev(mac_id, pdev->pdev_id);
  500. /*
  501. * Obtain lmac id from pdev to access the LMAC ring
  502. * in soc context
  503. */
  504. int lmac_id =
  505. dp_get_lmac_id_for_pdev_id(soc, mac_id,
  506. pdev->pdev_id);
  507. rx_mac_srng = dp_get_rxdma_ring(pdev, lmac_id);
  508. if (!rx_mac_srng->hal_srng)
  509. continue;
  510. htt_h2t_rx_ring_cfg(soc->htt_handle, mac_for_pdev,
  511. rx_mac_srng->hal_srng,
  512. RXDMA_BUF, RX_DATA_BUFFER_SIZE,
  513. &htt_tlv_filter);
  514. }
  515. }
  516. return status;
  517. }
  518. #ifdef WLAN_FEATURE_NEAR_FULL_IRQ
  519. /**
  520. * dp_service_near_full_srngs_be() - Main bottom half callback for the
  521. * near-full IRQs.
  522. * @soc: Datapath SoC handle
  523. * @int_ctx: Interrupt context
  524. * @dp_budget: Budget of the work that can be done in the bottom half
  525. *
  526. * Return: work done in the handler
  527. */
  528. static uint32_t
  529. dp_service_near_full_srngs_be(struct dp_soc *soc, struct dp_intr *int_ctx,
  530. uint32_t dp_budget)
  531. {
  532. int ring = 0;
  533. int budget = dp_budget;
  534. uint32_t work_done = 0;
  535. uint32_t remaining_quota = dp_budget;
  536. struct dp_intr_stats *intr_stats = &int_ctx->intr_stats;
  537. int tx_ring_near_full_mask = int_ctx->tx_ring_near_full_mask;
  538. int rx_near_full_grp_1_mask = int_ctx->rx_near_full_grp_1_mask;
  539. int rx_near_full_grp_2_mask = int_ctx->rx_near_full_grp_2_mask;
  540. int rx_near_full_mask = rx_near_full_grp_1_mask |
  541. rx_near_full_grp_2_mask;
  542. dp_verbose_debug("rx_ring_near_full 0x%x tx_ring_near_full 0x%x",
  543. rx_near_full_mask,
  544. tx_ring_near_full_mask);
  545. if (rx_near_full_mask) {
  546. for (ring = 0; ring < soc->num_reo_dest_rings; ring++) {
  547. if (!(rx_near_full_mask & (1 << ring)))
  548. continue;
  549. work_done = dp_rx_nf_process(int_ctx,
  550. soc->reo_dest_ring[ring].hal_srng,
  551. ring, remaining_quota);
  552. if (work_done) {
  553. intr_stats->num_rx_ring_near_full_masks[ring]++;
  554. dp_verbose_debug("rx NF mask 0x%x ring %d, work_done %d budget %d",
  555. rx_near_full_mask, ring,
  556. work_done,
  557. budget);
  558. budget -= work_done;
  559. if (budget <= 0)
  560. goto budget_done;
  561. remaining_quota = budget;
  562. }
  563. }
  564. }
  565. if (tx_ring_near_full_mask) {
  566. for (ring = 0; ring < soc->num_tcl_data_rings; ring++) {
  567. if (!(tx_ring_near_full_mask & (1 << ring)))
  568. continue;
  569. work_done = dp_tx_comp_nf_handler(int_ctx, soc,
  570. soc->tx_comp_ring[ring].hal_srng,
  571. ring, remaining_quota);
  572. if (work_done) {
  573. intr_stats->num_tx_comp_ring_near_full_masks[ring]++;
  574. dp_verbose_debug("tx NF mask 0x%x ring %d, work_done %d budget %d",
  575. tx_ring_near_full_mask, ring,
  576. work_done, budget);
  577. budget -= work_done;
  578. if (budget <= 0)
  579. break;
  580. remaining_quota = budget;
  581. }
  582. }
  583. }
  584. intr_stats->num_near_full_masks++;
  585. budget_done:
  586. return dp_budget - budget;
  587. }
  588. /**
  589. * dp_srng_test_and_update_nf_params_be() - Check if the srng is in near full
  590. * state and set the reap_limit appropriately
  591. * as per the near full state
  592. * @soc: Datapath soc handle
  593. * @dp_srng: Datapath handle for SRNG
  594. * @max_reap_limit: [Output Buffer] Buffer to set the max reap limit as per
  595. * the srng near-full state
  596. *
  597. * Return: 1, if the srng is in near-full state
  598. * 0, if the srng is not in near-full state
  599. */
  600. static int
  601. dp_srng_test_and_update_nf_params_be(struct dp_soc *soc,
  602. struct dp_srng *dp_srng,
  603. int *max_reap_limit)
  604. {
  605. return _dp_srng_test_and_update_nf_params(soc, dp_srng, max_reap_limit);
  606. }
  607. /**
  608. * dp_init_near_full_arch_ops_be() - Initialize the arch ops handler for the
  609. * near full IRQ handling operations.
  610. * @arch_ops: arch ops handle
  611. *
  612. * Return: none
  613. */
  614. static inline void
  615. dp_init_near_full_arch_ops_be(struct dp_arch_ops *arch_ops)
  616. {
  617. arch_ops->dp_service_near_full_srngs = dp_service_near_full_srngs_be;
  618. arch_ops->dp_srng_test_and_update_nf_params =
  619. dp_srng_test_and_update_nf_params_be;
  620. }
  621. #else
  622. static inline void
  623. dp_init_near_full_arch_ops_be(struct dp_arch_ops *arch_ops)
  624. {
  625. }
  626. #endif
  627. #ifdef WLAN_SUPPORT_PPEDS
  628. static void dp_soc_ppe_srng_deinit(struct dp_soc *soc)
  629. {
  630. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  631. struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
  632. soc_cfg_ctx = soc->wlan_cfg_ctx;
  633. if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
  634. return;
  635. dp_srng_deinit(soc, &be_soc->ppe_release_ring, PPE_RELEASE, 0);
  636. wlan_minidump_remove(be_soc->ppe_release_ring.base_vaddr_unaligned,
  637. be_soc->ppe_release_ring.alloc_size,
  638. soc->ctrl_psoc,
  639. WLAN_MD_DP_SRNG_PPE_RELEASE,
  640. "ppe_release_ring");
  641. dp_srng_deinit(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0);
  642. wlan_minidump_remove(be_soc->ppe2tcl_ring.base_vaddr_unaligned,
  643. be_soc->ppe2tcl_ring.alloc_size,
  644. soc->ctrl_psoc,
  645. WLAN_MD_DP_SRNG_PPE2TCL,
  646. "ppe2tcl_ring");
  647. dp_srng_deinit(soc, &be_soc->reo2ppe_ring, REO2PPE, 0);
  648. wlan_minidump_remove(be_soc->reo2ppe_ring.base_vaddr_unaligned,
  649. be_soc->reo2ppe_ring.alloc_size,
  650. soc->ctrl_psoc,
  651. WLAN_MD_DP_SRNG_REO2PPE,
  652. "reo2ppe_ring");
  653. }
  654. static void dp_soc_ppe_srng_free(struct dp_soc *soc)
  655. {
  656. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  657. struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
  658. soc_cfg_ctx = soc->wlan_cfg_ctx;
  659. if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
  660. return;
  661. dp_srng_free(soc, &be_soc->ppe_release_ring);
  662. dp_srng_free(soc, &be_soc->ppe2tcl_ring);
  663. dp_srng_free(soc, &be_soc->reo2ppe_ring);
  664. }
  665. static QDF_STATUS dp_soc_ppe_srng_alloc(struct dp_soc *soc)
  666. {
  667. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  668. uint32_t entries;
  669. struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
  670. soc_cfg_ctx = soc->wlan_cfg_ctx;
  671. if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
  672. return QDF_STATUS_SUCCESS;
  673. entries = wlan_cfg_get_dp_soc_reo2ppe_ring_size(soc_cfg_ctx);
  674. if (dp_srng_alloc(soc, &be_soc->reo2ppe_ring, REO2PPE,
  675. entries, 0)) {
  676. dp_err("%pK: dp_srng_alloc failed for reo2ppe", soc);
  677. goto fail;
  678. }
  679. entries = wlan_cfg_get_dp_soc_ppe2tcl_ring_size(soc_cfg_ctx);
  680. if (dp_srng_alloc(soc, &be_soc->ppe2tcl_ring, PPE2TCL,
  681. entries, 0)) {
  682. dp_err("%pK: dp_srng_alloc failed for ppe2tcl_ring", soc);
  683. goto fail;
  684. }
  685. entries = wlan_cfg_get_dp_soc_ppe_release_ring_size(soc_cfg_ctx);
  686. if (dp_srng_alloc(soc, &be_soc->ppe_release_ring, PPE_RELEASE,
  687. entries, 0)) {
  688. dp_err("%pK: dp_srng_alloc failed for ppe_release_ring", soc);
  689. goto fail;
  690. }
  691. return QDF_STATUS_SUCCESS;
  692. fail:
  693. dp_soc_ppe_srng_free(soc);
  694. return QDF_STATUS_E_NOMEM;
  695. }
  696. static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc)
  697. {
  698. struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
  699. struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
  700. soc_cfg_ctx = soc->wlan_cfg_ctx;
  701. if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
  702. return QDF_STATUS_SUCCESS;
  703. if (dp_srng_init(soc, &be_soc->reo2ppe_ring, REO2PPE, 0, 0)) {
  704. dp_err("%pK: dp_srng_init failed for reo2ppe", soc);
  705. goto fail;
  706. }
  707. wlan_minidump_log(be_soc->reo2ppe_ring.base_vaddr_unaligned,
  708. be_soc->reo2ppe_ring.alloc_size,
  709. soc->ctrl_psoc,
  710. WLAN_MD_DP_SRNG_REO2PPE,
  711. "reo2ppe_ring");
  712. if (dp_srng_init(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0, 0)) {
  713. dp_err("%pK: dp_srng_init failed for ppe2tcl_ring", soc);
  714. goto fail;
  715. }
  716. wlan_minidump_log(be_soc->ppe2tcl_ring.base_vaddr_unaligned,
  717. be_soc->ppe2tcl_ring.alloc_size,
  718. soc->ctrl_psoc,
  719. WLAN_MD_DP_SRNG_PPE2TCL,
  720. "ppe2tcl_ring");
  721. if (dp_srng_init(soc, &be_soc->ppe_release_ring, PPE_RELEASE, 0, 0)) {
  722. dp_err("%pK: dp_srng_init failed for ppe_release_ring", soc);
  723. goto fail;
  724. }
  725. wlan_minidump_log(be_soc->ppe_release_ring.base_vaddr_unaligned,
  726. be_soc->ppe_release_ring.alloc_size,
  727. soc->ctrl_psoc,
  728. WLAN_MD_DP_SRNG_PPE_RELEASE,
  729. "ppe_release_ring");
  730. return QDF_STATUS_SUCCESS;
  731. fail:
  732. dp_soc_ppe_srng_deinit(soc);
  733. return QDF_STATUS_E_NOMEM;
  734. }
  735. #else
  736. static void dp_soc_ppe_srng_deinit(struct dp_soc *soc)
  737. {
  738. }
  739. static void dp_soc_ppe_srng_free(struct dp_soc *soc)
  740. {
  741. }
  742. static QDF_STATUS dp_soc_ppe_srng_alloc(struct dp_soc *soc)
  743. {
  744. return QDF_STATUS_SUCCESS;
  745. }
  746. static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc)
  747. {
  748. return QDF_STATUS_SUCCESS;
  749. }
  750. #endif
  751. static void dp_soc_srng_deinit_be(struct dp_soc *soc)
  752. {
  753. uint32_t i;
  754. dp_soc_ppe_srng_deinit(soc);
  755. if (hal_dmac_cmn_src_rxbuf_ring_get(soc->hal_soc)) {
  756. for (i = 0; i < soc->num_rx_refill_buf_rings; i++) {
  757. dp_srng_deinit(soc, &soc->rx_refill_buf_ring[i],
  758. RXDMA_BUF, 0);
  759. }
  760. }
  761. }
  762. static void dp_soc_srng_free_be(struct dp_soc *soc)
  763. {
  764. uint32_t i;
  765. dp_soc_ppe_srng_free(soc);
  766. if (hal_dmac_cmn_src_rxbuf_ring_get(soc->hal_soc)) {
  767. for (i = 0; i < soc->num_rx_refill_buf_rings; i++)
  768. dp_srng_free(soc, &soc->rx_refill_buf_ring[i]);
  769. }
  770. }
  771. static QDF_STATUS dp_soc_srng_alloc_be(struct dp_soc *soc)
  772. {
  773. struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
  774. uint32_t ring_size;
  775. uint32_t i;
  776. soc_cfg_ctx = soc->wlan_cfg_ctx;
  777. ring_size = wlan_cfg_get_dp_soc_rxdma_refill_ring_size(soc_cfg_ctx);
  778. if (hal_dmac_cmn_src_rxbuf_ring_get(soc->hal_soc)) {
  779. for (i = 0; i < soc->num_rx_refill_buf_rings; i++) {
  780. if (dp_srng_alloc(soc, &soc->rx_refill_buf_ring[i],
  781. RXDMA_BUF, ring_size, 0)) {
  782. dp_err("%pK: dp_srng_alloc failed refill ring",
  783. soc);
  784. goto fail;
  785. }
  786. }
  787. }
  788. if (dp_soc_ppe_srng_alloc(soc)) {
  789. dp_err("%pK: ppe rings alloc failed",
  790. soc);
  791. goto fail;
  792. }
  793. return QDF_STATUS_SUCCESS;
  794. fail:
  795. dp_soc_srng_free_be(soc);
  796. return QDF_STATUS_E_NOMEM;
  797. }
  798. static QDF_STATUS dp_soc_srng_init_be(struct dp_soc *soc)
  799. {
  800. int i = 0;
  801. if (hal_dmac_cmn_src_rxbuf_ring_get(soc->hal_soc)) {
  802. for (i = 0; i < soc->num_rx_refill_buf_rings; i++) {
  803. if (dp_srng_init(soc, &soc->rx_refill_buf_ring[i],
  804. RXDMA_BUF, 0, 0)) {
  805. dp_err("%pK: dp_srng_init failed refill ring",
  806. soc);
  807. goto fail;
  808. }
  809. }
  810. }
  811. if (dp_soc_ppe_srng_init(soc)) {
  812. dp_err("%pK: ppe rings init failed",
  813. soc);
  814. goto fail;
  815. }
  816. return QDF_STATUS_SUCCESS;
  817. fail:
  818. dp_soc_srng_deinit_be(soc);
  819. return QDF_STATUS_E_NOMEM;
  820. }
  821. #ifdef DP_TX_IMPLICIT_RBM_MAPPING
  822. static void dp_tx_implicit_rbm_set_be(struct dp_soc *soc,
  823. uint8_t tx_ring_id,
  824. uint8_t bm_id)
  825. {
  826. hal_tx_config_rbm_mapping_be(soc->hal_soc,
  827. soc->tcl_data_ring[tx_ring_id].hal_srng,
  828. bm_id);
  829. }
  830. #else
  831. static void dp_tx_implicit_rbm_set_be(struct dp_soc *soc,
  832. uint8_t tx_ring_id,
  833. uint8_t bm_id)
  834. {
  835. }
  836. #endif
  837. void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
  838. {
  839. #ifndef QCA_HOST_MODE_WIFI_DISABLED
  840. arch_ops->tx_hw_enqueue = dp_tx_hw_enqueue_be;
  841. arch_ops->dp_rx_process = dp_rx_process_be;
  842. arch_ops->tx_comp_get_params_from_hal_desc =
  843. dp_tx_comp_get_params_from_hal_desc_be;
  844. arch_ops->dp_tx_desc_pool_init = dp_tx_desc_pool_init_be;
  845. arch_ops->dp_tx_desc_pool_deinit = dp_tx_desc_pool_deinit_be;
  846. arch_ops->dp_rx_desc_pool_init = dp_rx_desc_pool_init_be;
  847. arch_ops->dp_rx_desc_pool_deinit = dp_rx_desc_pool_deinit_be;
  848. arch_ops->dp_wbm_get_rx_desc_from_hal_desc =
  849. dp_wbm_get_rx_desc_from_hal_desc_be;
  850. #endif
  851. arch_ops->txrx_get_context_size = dp_get_context_size_be;
  852. arch_ops->dp_rx_desc_cookie_2_va =
  853. dp_rx_desc_cookie_2_va_be;
  854. arch_ops->txrx_soc_attach = dp_soc_attach_be;
  855. arch_ops->txrx_soc_detach = dp_soc_detach_be;
  856. arch_ops->txrx_soc_init = dp_soc_init_be;
  857. arch_ops->txrx_soc_deinit = dp_soc_deinit_be;
  858. arch_ops->txrx_soc_srng_alloc = dp_soc_srng_alloc_be;
  859. arch_ops->txrx_soc_srng_init = dp_soc_srng_init_be;
  860. arch_ops->txrx_soc_srng_deinit = dp_soc_srng_deinit_be;
  861. arch_ops->txrx_soc_srng_free = dp_soc_srng_free_be;
  862. arch_ops->txrx_pdev_attach = dp_pdev_attach_be;
  863. arch_ops->txrx_pdev_detach = dp_pdev_detach_be;
  864. arch_ops->txrx_vdev_attach = dp_vdev_attach_be;
  865. arch_ops->txrx_vdev_detach = dp_vdev_detach_be;
  866. arch_ops->dp_rxdma_ring_sel_cfg = dp_rxdma_ring_sel_cfg_be;
  867. arch_ops->dp_rx_peer_metadata_peer_id_get =
  868. dp_rx_peer_metadata_peer_id_get_be;
  869. arch_ops->soc_cfg_attach = dp_soc_cfg_attach_be;
  870. arch_ops->tx_implicit_rbm_set = dp_tx_implicit_rbm_set_be;
  871. dp_init_near_full_arch_ops_be(arch_ops);
  872. }