pg_tbl 2650 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (rmem->pg_tbl) { pg_tbl 2656 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->pg_tbl, rmem->pg_tbl_map); pg_tbl 2657 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->pg_tbl = NULL; pg_tbl 2673 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((rmem->nr_pages > 1 || rmem->depth > 0) && !rmem->pg_tbl) { pg_tbl 2678 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->pg_tbl = dma_alloc_coherent(&pdev->dev, pg_tbl_size, pg_tbl 2681 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!rmem->pg_tbl) pg_tbl 2702 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->pg_tbl[i] = pg_tbl 6673 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_ctx_pg_info *pg_tbl; pg_tbl 6675 drivers/net/ethernet/broadcom/bnxt/bnxt.c pg_tbl = kzalloc(sizeof(*pg_tbl), GFP_KERNEL); pg_tbl 6676 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!pg_tbl) pg_tbl 6678 drivers/net/ethernet/broadcom/bnxt/bnxt.c ctx_pg->ctx_pg_tbl[i] = pg_tbl; pg_tbl 6679 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem = &pg_tbl->ring_mem; pg_tbl 6680 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->pg_tbl = ctx_pg->ctx_pg_arr[i]; pg_tbl 6690 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_mem_blk(bp, pg_tbl); pg_tbl 6713 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_ctx_pg_info *pg_tbl; pg_tbl 6716 drivers/net/ethernet/broadcom/bnxt/bnxt.c pg_tbl = ctx_pg->ctx_pg_tbl[i]; pg_tbl 6717 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!pg_tbl) pg_tbl 6719 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem2 = &pg_tbl->ring_mem; pg_tbl 6722 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(pg_tbl); pg_tbl 723 drivers/net/ethernet/broadcom/bnxt/bnxt.h __le64 *pg_tbl; pg_tbl 158 drivers/net/ethernet/brocade/bna/bfi_enet.h union bfi_addr_u pg_tbl; pg_tbl 1293 drivers/net/ethernet/brocade/bna/bna_tx_rx.c (bfi_q)->pg_tbl.a32.addr_lo = (bna_qpt)->hw_qpt_ptr.lsb; \ pg_tbl 1294 drivers/net/ethernet/brocade/bna/bna_tx_rx.c (bfi_q)->pg_tbl.a32.addr_hi = (bna_qpt)->hw_qpt_ptr.msb; \ pg_tbl 813 drivers/net/wireless/realtek/rtw88/mac.c struct rtw_page_table *pg_tbl = NULL; pg_tbl 823 drivers/net/wireless/realtek/rtw88/mac.c pg_tbl = &chip->page_table[1]; pg_tbl 827 drivers/net/wireless/realtek/rtw88/mac.c pg_tbl = &chip->page_table[2]; pg_tbl 829 drivers/net/wireless/realtek/rtw88/mac.c pg_tbl = &chip->page_table[3]; pg_tbl 831 drivers/net/wireless/realtek/rtw88/mac.c pg_tbl = &chip->page_table[4]; pg_tbl 839 drivers/net/wireless/realtek/rtw88/mac.c pubq_num = fifo->acq_pg_num - pg_tbl->hq_num - pg_tbl->lq_num - pg_tbl 840 drivers/net/wireless/realtek/rtw88/mac.c pg_tbl->nq_num - pg_tbl->exq_num - pg_tbl->gapq_num; pg_tbl 841 drivers/net/wireless/realtek/rtw88/mac.c rtw_write16(rtwdev, REG_FIFOPAGE_INFO_1, pg_tbl->hq_num); pg_tbl 842 drivers/net/wireless/realtek/rtw88/mac.c rtw_write16(rtwdev, REG_FIFOPAGE_INFO_2, pg_tbl->lq_num); pg_tbl 843 drivers/net/wireless/realtek/rtw88/mac.c rtw_write16(rtwdev, REG_FIFOPAGE_INFO_3, pg_tbl->nq_num); pg_tbl 844 drivers/net/wireless/realtek/rtw88/mac.c rtw_write16(rtwdev, REG_FIFOPAGE_INFO_4, pg_tbl->exq_num); pg_tbl 232 drivers/staging/gasket/gasket_page_table.c struct gasket_page_table *pg_tbl; pg_tbl 260 drivers/staging/gasket/gasket_page_table.c pg_tbl = *ppg_tbl; pg_tbl 263 drivers/staging/gasket/gasket_page_table.c pg_tbl->entries = vzalloc(bytes); pg_tbl 264 drivers/staging/gasket/gasket_page_table.c if (!pg_tbl->entries) { pg_tbl 267 drivers/staging/gasket/gasket_page_table.c kfree(pg_tbl); pg_tbl 273 drivers/staging/gasket/gasket_page_table.c mutex_init(&pg_tbl->mutex); pg_tbl 274 drivers/staging/gasket/gasket_page_table.c memcpy(&pg_tbl->config, page_table_config, sizeof(*page_table_config)); pg_tbl 275 drivers/staging/gasket/gasket_page_table.c if (pg_tbl->config.mode == GASKET_PAGE_TABLE_MODE_NORMAL || pg_tbl 276 drivers/staging/gasket/gasket_page_table.c pg_tbl->config.mode == GASKET_PAGE_TABLE_MODE_SIMPLE) { pg_tbl 277 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_simple_entries = total_entries; pg_tbl 278 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_extended_entries = 0; pg_tbl 279 drivers/staging/gasket/gasket_page_table.c pg_tbl->extended_flag = 1ull << page_table_config->extended_bit; pg_tbl 281 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_simple_entries = 0; pg_tbl 282 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_extended_entries = total_entries; pg_tbl 283 drivers/staging/gasket/gasket_page_table.c pg_tbl->extended_flag = 0; pg_tbl 285 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_active_pages = 0; pg_tbl 286 drivers/staging/gasket/gasket_page_table.c pg_tbl->base_slot = pg_tbl 288 drivers/staging/gasket/gasket_page_table.c pg_tbl->extended_offset_reg = pg_tbl 290 drivers/staging/gasket/gasket_page_table.c pg_tbl->device = get_device(device); pg_tbl 291 drivers/staging/gasket/gasket_page_table.c pg_tbl->pci_dev = pci_dev; pg_tbl 319 drivers/staging/gasket/gasket_page_table.c static void gasket_free_extended_subtable(struct gasket_page_table *pg_tbl, pg_tbl 330 drivers/staging/gasket/gasket_page_table.c dma_unmap_page(pg_tbl->device, pte->dma_addr, PAGE_SIZE, pg_tbl 346 drivers/staging/gasket/gasket_page_table.c gasket_page_table_garbage_collect_nolock(struct gasket_page_table *pg_tbl) pg_tbl 354 drivers/staging/gasket/gasket_page_table.c for (pte = pg_tbl->entries + pg_tbl->num_simple_entries, pg_tbl 355 drivers/staging/gasket/gasket_page_table.c slot = pg_tbl->base_slot + pg_tbl->num_simple_entries; pg_tbl 356 drivers/staging/gasket/gasket_page_table.c pte < pg_tbl->entries + pg_tbl->config.total_entries; pg_tbl 361 drivers/staging/gasket/gasket_page_table.c gasket_free_extended_subtable(pg_tbl, pte, pg_tbl 368 drivers/staging/gasket/gasket_page_table.c void gasket_page_table_garbage_collect(struct gasket_page_table *pg_tbl) pg_tbl 370 drivers/staging/gasket/gasket_page_table.c mutex_lock(&pg_tbl->mutex); pg_tbl 371 drivers/staging/gasket/gasket_page_table.c gasket_page_table_garbage_collect_nolock(pg_tbl); pg_tbl 372 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 376 drivers/staging/gasket/gasket_page_table.c void gasket_page_table_cleanup(struct gasket_page_table *pg_tbl) pg_tbl 379 drivers/staging/gasket/gasket_page_table.c gasket_page_table_garbage_collect(pg_tbl); pg_tbl 383 drivers/staging/gasket/gasket_page_table.c vfree(pg_tbl->entries); pg_tbl 384 drivers/staging/gasket/gasket_page_table.c pg_tbl->entries = NULL; pg_tbl 386 drivers/staging/gasket/gasket_page_table.c put_device(pg_tbl->device); pg_tbl 387 drivers/staging/gasket/gasket_page_table.c kfree(pg_tbl); pg_tbl 391 drivers/staging/gasket/gasket_page_table.c int gasket_page_table_partition(struct gasket_page_table *pg_tbl, pg_tbl 396 drivers/staging/gasket/gasket_page_table.c mutex_lock(&pg_tbl->mutex); pg_tbl 397 drivers/staging/gasket/gasket_page_table.c if (num_simple_entries > pg_tbl->config.total_entries) { pg_tbl 398 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 402 drivers/staging/gasket/gasket_page_table.c gasket_page_table_garbage_collect_nolock(pg_tbl); pg_tbl 404 drivers/staging/gasket/gasket_page_table.c start = min(pg_tbl->num_simple_entries, num_simple_entries); pg_tbl 406 drivers/staging/gasket/gasket_page_table.c for (i = start; i < pg_tbl->config.total_entries; i++) { pg_tbl 407 drivers/staging/gasket/gasket_page_table.c if (pg_tbl->entries[i].status != PTE_FREE) { pg_tbl 408 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, "entry %d is not free\n", i); pg_tbl 409 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 414 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_simple_entries = num_simple_entries; pg_tbl 415 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_extended_entries = pg_tbl 416 drivers/staging/gasket/gasket_page_table.c pg_tbl->config.total_entries - num_simple_entries; pg_tbl 417 drivers/staging/gasket/gasket_page_table.c writeq(num_simple_entries, pg_tbl->extended_offset_reg); pg_tbl 419 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 430 drivers/staging/gasket/gasket_page_table.c static int is_coherent(struct gasket_page_table *pg_tbl, ulong host_addr) pg_tbl 435 drivers/staging/gasket/gasket_page_table.c if (!pg_tbl->coherent_pages) pg_tbl 438 drivers/staging/gasket/gasket_page_table.c min = (u64)pg_tbl->coherent_pages[0].user_virt; pg_tbl 439 drivers/staging/gasket/gasket_page_table.c max = min + PAGE_SIZE * pg_tbl->num_coherent_pages; pg_tbl 465 drivers/staging/gasket/gasket_page_table.c static int gasket_perform_mapping(struct gasket_page_table *pg_tbl, pg_tbl 480 drivers/staging/gasket/gasket_page_table.c if (is_coherent(pg_tbl, host_addr)) { pg_tbl 483 drivers/staging/gasket/gasket_page_table.c (u64)pg_tbl->coherent_pages[0].user_virt; pg_tbl 486 drivers/staging/gasket/gasket_page_table.c ptes[i].dma_addr = pg_tbl->coherent_pages[0].paddr + pg_tbl 493 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 498 drivers/staging/gasket/gasket_page_table.c ++pg_tbl->num_active_pages; pg_tbl 505 drivers/staging/gasket/gasket_page_table.c dma_map_page(pg_tbl->device, page, 0, PAGE_SIZE, pg_tbl 508 drivers/staging/gasket/gasket_page_table.c if (dma_mapping_error(pg_tbl->device, pg_tbl 511 drivers/staging/gasket/gasket_page_table.c --pg_tbl->num_active_pages; pg_tbl 529 drivers/staging/gasket/gasket_page_table.c dma_map_single(pg_tbl->device, pg_tbl 542 drivers/staging/gasket/gasket_page_table.c static int gasket_simple_page_idx(struct gasket_page_table *pg_tbl, pg_tbl 546 drivers/staging/gasket/gasket_page_table.c (pg_tbl->config.total_entries - 1); pg_tbl 553 drivers/staging/gasket/gasket_page_table.c static ulong gasket_extended_lvl0_page_idx(struct gasket_page_table *pg_tbl, pg_tbl 557 drivers/staging/gasket/gasket_page_table.c (pg_tbl->config.total_entries - 1); pg_tbl 564 drivers/staging/gasket/gasket_page_table.c static ulong gasket_extended_lvl1_page_idx(struct gasket_page_table *pg_tbl, pg_tbl 575 drivers/staging/gasket/gasket_page_table.c static int gasket_alloc_simple_entries(struct gasket_page_table *pg_tbl, pg_tbl 578 drivers/staging/gasket/gasket_page_table.c if (!gasket_is_pte_range_free(pg_tbl->entries + pg_tbl 579 drivers/staging/gasket/gasket_page_table.c gasket_simple_page_idx(pg_tbl, dev_addr), pg_tbl 590 drivers/staging/gasket/gasket_page_table.c static void gasket_perform_unmapping(struct gasket_page_table *pg_tbl, pg_tbl 613 drivers/staging/gasket/gasket_page_table.c dma_unmap_page(pg_tbl->device, ptes[i].dma_addr, pg_tbl 617 drivers/staging/gasket/gasket_page_table.c --pg_tbl->num_active_pages; pg_tbl 629 drivers/staging/gasket/gasket_page_table.c static void gasket_unmap_simple_pages(struct gasket_page_table *pg_tbl, pg_tbl 632 drivers/staging/gasket/gasket_page_table.c uint slot = gasket_simple_page_idx(pg_tbl, dev_addr); pg_tbl 634 drivers/staging/gasket/gasket_page_table.c gasket_perform_unmapping(pg_tbl, pg_tbl->entries + slot, pg_tbl 635 drivers/staging/gasket/gasket_page_table.c pg_tbl->base_slot + slot, num_pages, 1); pg_tbl 642 drivers/staging/gasket/gasket_page_table.c static void gasket_unmap_extended_pages(struct gasket_page_table *pg_tbl, pg_tbl 650 drivers/staging/gasket/gasket_page_table.c slot_idx = gasket_extended_lvl1_page_idx(pg_tbl, dev_addr); pg_tbl 651 drivers/staging/gasket/gasket_page_table.c pte = pg_tbl->entries + pg_tbl->num_simple_entries + pg_tbl 652 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl0_page_idx(pg_tbl, dev_addr); pg_tbl 661 drivers/staging/gasket/gasket_page_table.c gasket_perform_unmapping(pg_tbl, pg_tbl 673 drivers/staging/gasket/gasket_page_table.c static inline bool gasket_addr_is_simple(struct gasket_page_table *pg_tbl, pg_tbl 676 drivers/staging/gasket/gasket_page_table.c return !((addr) & (pg_tbl)->extended_flag); pg_tbl 691 drivers/staging/gasket/gasket_page_table.c static ulong gasket_components_to_dev_address(struct gasket_page_table *pg_tbl, pg_tbl 697 drivers/staging/gasket/gasket_page_table.c return is_simple ? dev_addr : (pg_tbl->extended_flag | dev_addr); pg_tbl 707 drivers/staging/gasket/gasket_page_table.c static bool gasket_is_simple_dev_addr_bad(struct gasket_page_table *pg_tbl, pg_tbl 712 drivers/staging/gasket/gasket_page_table.c (dev_addr / PAGE_SIZE) & (pg_tbl->config.total_entries - 1); pg_tbl 714 drivers/staging/gasket/gasket_page_table.c if (gasket_components_to_dev_address(pg_tbl, 1, page_index, pg_tbl 716 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, "address is invalid, 0x%lX\n", pg_tbl 721 drivers/staging/gasket/gasket_page_table.c if (page_index >= pg_tbl->num_simple_entries) { pg_tbl 722 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 724 drivers/staging/gasket/gasket_page_table.c page_index, pg_tbl->num_simple_entries); pg_tbl 728 drivers/staging/gasket/gasket_page_table.c if (page_index + num_pages > pg_tbl->num_simple_entries) { pg_tbl 729 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 731 drivers/staging/gasket/gasket_page_table.c page_index + num_pages, pg_tbl->num_simple_entries); pg_tbl 745 drivers/staging/gasket/gasket_page_table.c static bool gasket_is_extended_dev_addr_bad(struct gasket_page_table *pg_tbl, pg_tbl 755 drivers/staging/gasket/gasket_page_table.c addr = dev_addr & ~((pg_tbl)->extended_flag); pg_tbl 757 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, "device address out of bounds: 0x%lx\n", pg_tbl 764 drivers/staging/gasket/gasket_page_table.c (pg_tbl->config.total_entries * GASKET_PAGES_PER_SUBTABLE - 1); pg_tbl 767 drivers/staging/gasket/gasket_page_table.c page_lvl0_idx = gasket_extended_lvl0_page_idx(pg_tbl, dev_addr); pg_tbl 772 drivers/staging/gasket/gasket_page_table.c if (gasket_components_to_dev_address(pg_tbl, 0, page_global_idx, pg_tbl 774 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, "address is invalid: 0x%lx\n", pg_tbl 779 drivers/staging/gasket/gasket_page_table.c if (page_lvl0_idx >= pg_tbl->num_extended_entries) { pg_tbl 780 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 782 drivers/staging/gasket/gasket_page_table.c page_lvl0_idx, pg_tbl->num_extended_entries); pg_tbl 786 drivers/staging/gasket/gasket_page_table.c if (page_lvl0_idx + num_lvl0_pages > pg_tbl->num_extended_entries) { pg_tbl 787 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 790 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_extended_entries); pg_tbl 801 drivers/staging/gasket/gasket_page_table.c static void gasket_page_table_unmap_nolock(struct gasket_page_table *pg_tbl, pg_tbl 807 drivers/staging/gasket/gasket_page_table.c if (gasket_addr_is_simple(pg_tbl, dev_addr)) pg_tbl 808 drivers/staging/gasket/gasket_page_table.c gasket_unmap_simple_pages(pg_tbl, dev_addr, num_pages); pg_tbl 810 drivers/staging/gasket/gasket_page_table.c gasket_unmap_extended_pages(pg_tbl, dev_addr, num_pages); pg_tbl 817 drivers/staging/gasket/gasket_page_table.c static int gasket_map_simple_pages(struct gasket_page_table *pg_tbl, pg_tbl 822 drivers/staging/gasket/gasket_page_table.c uint slot_idx = gasket_simple_page_idx(pg_tbl, dev_addr); pg_tbl 824 drivers/staging/gasket/gasket_page_table.c ret = gasket_alloc_simple_entries(pg_tbl, dev_addr, num_pages); pg_tbl 826 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 832 drivers/staging/gasket/gasket_page_table.c ret = gasket_perform_mapping(pg_tbl, pg_tbl->entries + slot_idx, pg_tbl 833 drivers/staging/gasket/gasket_page_table.c pg_tbl->base_slot + slot_idx, host_addr, pg_tbl 837 drivers/staging/gasket/gasket_page_table.c gasket_page_table_unmap_nolock(pg_tbl, dev_addr, num_pages); pg_tbl 838 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, "gasket_perform_mapping %d\n", ret); pg_tbl 847 drivers/staging/gasket/gasket_page_table.c static int gasket_alloc_extended_subtable(struct gasket_page_table *pg_tbl, pg_tbl 876 drivers/staging/gasket/gasket_page_table.c pte->dma_addr = dma_map_page(pg_tbl->device, pte->page, 0, PAGE_SIZE, pg_tbl 878 drivers/staging/gasket/gasket_page_table.c if (dma_mapping_error(pg_tbl->device, pte->dma_addr)) { pg_tbl 908 drivers/staging/gasket/gasket_page_table.c static int gasket_alloc_extended_entries(struct gasket_page_table *pg_tbl, pg_tbl 917 drivers/staging/gasket/gasket_page_table.c subtable_slot_idx = gasket_extended_lvl1_page_idx(pg_tbl, dev_addr); pg_tbl 918 drivers/staging/gasket/gasket_page_table.c pte = pg_tbl->entries + pg_tbl->num_simple_entries + pg_tbl 919 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl0_page_idx(pg_tbl, dev_addr); pg_tbl 920 drivers/staging/gasket/gasket_page_table.c slot = pg_tbl->base_slot + pg_tbl->num_simple_entries + pg_tbl 921 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl0_page_idx(pg_tbl, dev_addr); pg_tbl 928 drivers/staging/gasket/gasket_page_table.c ret = gasket_alloc_extended_subtable(pg_tbl, pte, slot); pg_tbl 930 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 953 drivers/staging/gasket/gasket_page_table.c static int gasket_map_extended_pages(struct gasket_page_table *pg_tbl, pg_tbl 963 drivers/staging/gasket/gasket_page_table.c ret = gasket_alloc_extended_entries(pg_tbl, dev_addr, num_pages); pg_tbl 966 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 968 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl0_page_idx(pg_tbl, dev_addr), pg_tbl 970 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl1_page_idx(pg_tbl, dev_addr), pg_tbl 971 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl0_page_idx(pg_tbl, dev_addr_end), pg_tbl 972 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl1_page_idx(pg_tbl, dev_addr_end)); pg_tbl 977 drivers/staging/gasket/gasket_page_table.c slot_idx = gasket_extended_lvl1_page_idx(pg_tbl, dev_addr); pg_tbl 978 drivers/staging/gasket/gasket_page_table.c pte = pg_tbl->entries + pg_tbl->num_simple_entries + pg_tbl 979 drivers/staging/gasket/gasket_page_table.c gasket_extended_lvl0_page_idx(pg_tbl, dev_addr); pg_tbl 986 drivers/staging/gasket/gasket_page_table.c ret = gasket_perform_mapping(pg_tbl, pte->sublevel + slot_idx, pg_tbl 990 drivers/staging/gasket/gasket_page_table.c gasket_page_table_unmap_nolock(pg_tbl, dev_addr, pg_tbl 1012 drivers/staging/gasket/gasket_page_table.c int gasket_page_table_map(struct gasket_page_table *pg_tbl, ulong host_addr, pg_tbl 1020 drivers/staging/gasket/gasket_page_table.c mutex_lock(&pg_tbl->mutex); pg_tbl 1022 drivers/staging/gasket/gasket_page_table.c if (gasket_addr_is_simple(pg_tbl, dev_addr)) { pg_tbl 1023 drivers/staging/gasket/gasket_page_table.c ret = gasket_map_simple_pages(pg_tbl, host_addr, dev_addr, pg_tbl 1026 drivers/staging/gasket/gasket_page_table.c ret = gasket_map_extended_pages(pg_tbl, host_addr, dev_addr, pg_tbl 1030 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 1044 drivers/staging/gasket/gasket_page_table.c void gasket_page_table_unmap(struct gasket_page_table *pg_tbl, ulong dev_addr, pg_tbl 1050 drivers/staging/gasket/gasket_page_table.c mutex_lock(&pg_tbl->mutex); pg_tbl 1051 drivers/staging/gasket/gasket_page_table.c gasket_page_table_unmap_nolock(pg_tbl, dev_addr, num_pages); pg_tbl 1052 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 1056 drivers/staging/gasket/gasket_page_table.c static void gasket_page_table_unmap_all_nolock(struct gasket_page_table *pg_tbl) pg_tbl 1058 drivers/staging/gasket/gasket_page_table.c gasket_unmap_simple_pages(pg_tbl, pg_tbl 1059 drivers/staging/gasket/gasket_page_table.c gasket_components_to_dev_address(pg_tbl, 1, 0, pg_tbl 1061 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_simple_entries); pg_tbl 1062 drivers/staging/gasket/gasket_page_table.c gasket_unmap_extended_pages(pg_tbl, pg_tbl 1063 drivers/staging/gasket/gasket_page_table.c gasket_components_to_dev_address(pg_tbl, 0, pg_tbl 1065 drivers/staging/gasket/gasket_page_table.c pg_tbl->num_extended_entries * pg_tbl 1070 drivers/staging/gasket/gasket_page_table.c void gasket_page_table_unmap_all(struct gasket_page_table *pg_tbl) pg_tbl 1072 drivers/staging/gasket/gasket_page_table.c mutex_lock(&pg_tbl->mutex); pg_tbl 1073 drivers/staging/gasket/gasket_page_table.c gasket_page_table_unmap_all_nolock(pg_tbl); pg_tbl 1074 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 1079 drivers/staging/gasket/gasket_page_table.c void gasket_page_table_reset(struct gasket_page_table *pg_tbl) pg_tbl 1081 drivers/staging/gasket/gasket_page_table.c mutex_lock(&pg_tbl->mutex); pg_tbl 1082 drivers/staging/gasket/gasket_page_table.c gasket_page_table_unmap_all_nolock(pg_tbl); pg_tbl 1083 drivers/staging/gasket/gasket_page_table.c writeq(pg_tbl->config.total_entries, pg_tbl->extended_offset_reg); pg_tbl 1084 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 1088 drivers/staging/gasket/gasket_page_table.c int gasket_page_table_lookup_page(struct gasket_page_table *pg_tbl, pg_tbl 1095 drivers/staging/gasket/gasket_page_table.c mutex_lock(&pg_tbl->mutex); pg_tbl 1096 drivers/staging/gasket/gasket_page_table.c if (gasket_addr_is_simple(pg_tbl, dev_addr)) { pg_tbl 1097 drivers/staging/gasket/gasket_page_table.c page_num = gasket_simple_page_idx(pg_tbl, dev_addr); pg_tbl 1098 drivers/staging/gasket/gasket_page_table.c if (page_num >= pg_tbl->num_simple_entries) pg_tbl 1101 drivers/staging/gasket/gasket_page_table.c pte = pg_tbl->entries + page_num; pg_tbl 1106 drivers/staging/gasket/gasket_page_table.c page_num = gasket_extended_lvl0_page_idx(pg_tbl, dev_addr); pg_tbl 1107 drivers/staging/gasket/gasket_page_table.c if (page_num >= pg_tbl->num_extended_entries) pg_tbl 1110 drivers/staging/gasket/gasket_page_table.c pte = pg_tbl->entries + pg_tbl->num_simple_entries + page_num; pg_tbl 1115 drivers/staging/gasket/gasket_page_table.c page_num = gasket_extended_lvl1_page_idx(pg_tbl, dev_addr); pg_tbl 1123 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 1129 drivers/staging/gasket/gasket_page_table.c mutex_unlock(&pg_tbl->mutex); pg_tbl 1134 drivers/staging/gasket/gasket_page_table.c bool gasket_page_table_are_addrs_bad(struct gasket_page_table *pg_tbl, pg_tbl 1139 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 1145 drivers/staging/gasket/gasket_page_table.c return gasket_page_table_is_dev_addr_bad(pg_tbl, dev_addr, bytes); pg_tbl 1150 drivers/staging/gasket/gasket_page_table.c bool gasket_page_table_is_dev_addr_bad(struct gasket_page_table *pg_tbl, pg_tbl 1156 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 1162 drivers/staging/gasket/gasket_page_table.c dev_err(pg_tbl->device, pg_tbl 1168 drivers/staging/gasket/gasket_page_table.c if (gasket_addr_is_simple(pg_tbl, dev_addr)) pg_tbl 1169 drivers/staging/gasket/gasket_page_table.c return gasket_is_simple_dev_addr_bad(pg_tbl, dev_addr, pg_tbl 1171 drivers/staging/gasket/gasket_page_table.c return gasket_is_extended_dev_addr_bad(pg_tbl, dev_addr, num_pages); pg_tbl 1185 drivers/staging/gasket/gasket_page_table.c uint gasket_page_table_num_entries(struct gasket_page_table *pg_tbl) pg_tbl 1187 drivers/staging/gasket/gasket_page_table.c if (!pg_tbl) pg_tbl 1189 drivers/staging/gasket/gasket_page_table.c return pg_tbl->num_simple_entries + pg_tbl->num_extended_entries; pg_tbl 1194 drivers/staging/gasket/gasket_page_table.c uint gasket_page_table_num_simple_entries(struct gasket_page_table *pg_tbl) pg_tbl 1196 drivers/staging/gasket/gasket_page_table.c if (!pg_tbl) pg_tbl 1198 drivers/staging/gasket/gasket_page_table.c return pg_tbl->num_simple_entries; pg_tbl 1203 drivers/staging/gasket/gasket_page_table.c uint gasket_page_table_num_active_pages(struct gasket_page_table *pg_tbl) pg_tbl 1205 drivers/staging/gasket/gasket_page_table.c if (!pg_tbl) pg_tbl 1207 drivers/staging/gasket/gasket_page_table.c return pg_tbl->num_active_pages; pg_tbl 1230 drivers/staging/gasket/gasket_page_table.c struct gasket_page_table *pg_tbl; pg_tbl 1238 drivers/staging/gasket/gasket_page_table.c pg_tbl = gasket_dev->page_table[0]; pg_tbl 1239 drivers/staging/gasket/gasket_page_table.c if (!pg_tbl) { pg_tbl 1245 drivers/staging/gasket/gasket_page_table.c pg_tbl->coherent_pages[j].user_virt = pg_tbl 1141 drivers/target/sbp/sbp_target.c struct sbp_page_table_entry *pg_tbl; pg_tbl 1149 drivers/target/sbp/sbp_target.c pg_tbl = kmalloc(pg_tbl_sz, GFP_KERNEL); pg_tbl 1150 drivers/target/sbp/sbp_target.c if (!pg_tbl) pg_tbl 1155 drivers/target/sbp/sbp_target.c pg_tbl, pg_tbl_sz); pg_tbl 1157 drivers/target/sbp/sbp_target.c kfree(pg_tbl); pg_tbl 1161 drivers/target/sbp/sbp_target.c req->pg_tbl = pg_tbl; pg_tbl 1181 drivers/target/sbp/sbp_target.c if (req->pg_tbl) { pg_tbl 1185 drivers/target/sbp/sbp_target.c req->pg_tbl[idx].segment_length); pg_tbl 1275 drivers/target/sbp/sbp_target.c if (req->pg_tbl) { pg_tbl 1276 drivers/target/sbp/sbp_target.c pte = req->pg_tbl; pg_tbl 1447 drivers/target/sbp/sbp_target.c kfree(req->pg_tbl); pg_tbl 218 drivers/target/sbp/sbp_target.h struct sbp_page_table_entry *pg_tbl;