Lines Matching refs:size
155 uint32_t size; member
174 qdf_size_t size) in qdf_mem_dma_get_header() argument
177 qdf_roundup((size_t)((uint8_t *)ptr + size), in qdf_mem_dma_get_header()
183 return (uint64_t *)((void *)(header + 1) + header->size); in qdf_mem_get_trailer()
207 static void qdf_mem_header_init(struct qdf_mem_header *header, qdf_size_t size, in qdf_mem_header_init() argument
220 header->size = size; in qdf_mem_header_init()
256 if (header->size > QDF_MEM_MAX_MALLOC) in qdf_mem_header_validate()
292 header->size, QDF_MEM_MAX_MALLOC); in qdf_mem_header_assert_valid()
330 uint32_t size; member
382 table[i].size = meta->size; in qdf_mem_meta_table_insert()
391 table[i].size == meta->size && in qdf_mem_meta_table_insert()
478 table[i].size, in qdf_mem_meta_table_print()
479 table[i].count * table[i].size, in qdf_mem_meta_table_print()
579 table[i].size, in qdf_print_major_alloc()
580 table[i].count * table[i].size, in qdf_print_major_alloc()
788 meta.size = p_node->size; in qdf_print_major_nbuf_allocs()
1086 void qdf_mem_kmalloc_inc(qdf_size_t size) in qdf_mem_kmalloc_inc() argument
1088 qdf_atomic_add(size, &qdf_mem_stat.kmalloc); in qdf_mem_kmalloc_inc()
1091 static void qdf_mem_dma_inc(qdf_size_t size) in qdf_mem_dma_inc() argument
1093 qdf_atomic_add(size, &qdf_mem_stat.dma); in qdf_mem_dma_inc()
1097 void qdf_mem_skb_inc(qdf_size_t size) in qdf_mem_skb_inc() argument
1099 qdf_atomic_add(size, &qdf_mem_stat.skb); in qdf_mem_skb_inc()
1102 void qdf_mem_skb_dec(qdf_size_t size) in qdf_mem_skb_dec() argument
1104 qdf_atomic_sub(size, &qdf_mem_stat.skb); in qdf_mem_skb_dec()
1107 void qdf_mem_skb_total_inc(qdf_size_t size) in qdf_mem_skb_total_inc() argument
1111 qdf_atomic_add(size, &qdf_mem_stat.skb_total); in qdf_mem_skb_total_inc()
1117 void qdf_mem_skb_total_dec(qdf_size_t size) in qdf_mem_skb_total_dec() argument
1119 qdf_atomic_sub(size, &qdf_mem_stat.skb_total); in qdf_mem_skb_total_dec()
1122 void qdf_mem_dp_tx_skb_inc(qdf_size_t size) in qdf_mem_dp_tx_skb_inc() argument
1126 qdf_atomic_add(size, &qdf_mem_stat.dp_tx_skb); in qdf_mem_dp_tx_skb_inc()
1132 void qdf_mem_dp_tx_skb_dec(qdf_size_t size) in qdf_mem_dp_tx_skb_dec() argument
1134 qdf_atomic_sub(size, &qdf_mem_stat.dp_tx_skb); in qdf_mem_dp_tx_skb_dec()
1137 void qdf_mem_dp_rx_skb_inc(qdf_size_t size) in qdf_mem_dp_rx_skb_inc() argument
1141 qdf_atomic_add(size, &qdf_mem_stat.dp_rx_skb); in qdf_mem_dp_rx_skb_inc()
1147 void qdf_mem_dp_rx_skb_dec(qdf_size_t size) in qdf_mem_dp_rx_skb_dec() argument
1149 qdf_atomic_sub(size, &qdf_mem_stat.dp_rx_skb); in qdf_mem_dp_rx_skb_dec()
1185 void qdf_mem_kmalloc_dec(qdf_size_t size) in qdf_mem_kmalloc_dec() argument
1187 qdf_atomic_sub(size, &qdf_mem_stat.kmalloc); in qdf_mem_kmalloc_dec()
1190 static inline void qdf_mem_dma_dec(qdf_size_t size) in qdf_mem_dma_dec() argument
1192 qdf_atomic_sub(size, &qdf_mem_stat.dma); in qdf_mem_dma_dec()
1356 static void *qdf_mem_prealloc_get(size_t size) in qdf_mem_prealloc_get() argument
1360 if (size <= WCNSS_PRE_ALLOC_GET_THRESHOLD) in qdf_mem_prealloc_get()
1363 ptr = wcnss_prealloc_get(size); in qdf_mem_prealloc_get()
1367 memset(ptr, 0, size); in qdf_mem_prealloc_get()
1382 static inline void *qdf_mem_prealloc_get(size_t size) in qdf_mem_prealloc_get() argument
1507 void *qdf_mem_malloc_debug(size_t size, const char *func, uint32_t line, in qdf_mem_malloc_debug() argument
1518 return __qdf_mem_malloc(size, func, line); in qdf_mem_malloc_debug()
1520 if (!size || size > QDF_MEM_MAX_MALLOC) { in qdf_mem_malloc_debug()
1521 qdf_err("Cannot malloc %zu bytes @ %s:%d", size, func, line); in qdf_mem_malloc_debug()
1525 ptr = qdf_mem_prealloc_get(size); in qdf_mem_malloc_debug()
1533 header = kzalloc(size + QDF_MEM_DEBUG_SIZE, flag); in qdf_mem_malloc_debug()
1538 duration, size, func, line); in qdf_mem_malloc_debug()
1541 qdf_warn("Failed to malloc %zuB @ %s:%d", size, func, line); in qdf_mem_malloc_debug()
1545 qdf_mem_header_init(header, size, func, line, caller); in qdf_mem_malloc_debug()
1561 void *qdf_mem_malloc_atomic_debug(size_t size, const char *func, in qdf_mem_malloc_atomic_debug() argument
1572 return qdf_mem_malloc_atomic_debug_fl(size, func, line); in qdf_mem_malloc_atomic_debug()
1574 if (!size || size > QDF_MEM_MAX_MALLOC) { in qdf_mem_malloc_atomic_debug()
1575 qdf_err("Cannot malloc %zu bytes @ %s:%d", size, func, line); in qdf_mem_malloc_atomic_debug()
1579 ptr = qdf_mem_prealloc_get(size); in qdf_mem_malloc_atomic_debug()
1584 header = kzalloc(size + QDF_MEM_DEBUG_SIZE, GFP_ATOMIC); in qdf_mem_malloc_atomic_debug()
1589 duration, size, func, line); in qdf_mem_malloc_atomic_debug()
1592 qdf_warn("Failed to malloc %zuB @ %s:%d", size, func, line); in qdf_mem_malloc_atomic_debug()
1596 qdf_mem_header_init(header, size, func, line, caller); in qdf_mem_malloc_atomic_debug()
1613 void *qdf_mem_malloc_atomic_debug_fl(size_t size, const char *func, in qdf_mem_malloc_atomic_debug_fl() argument
1618 if (!size || size > QDF_MEM_MAX_MALLOC) { in qdf_mem_malloc_atomic_debug_fl()
1619 qdf_nofl_err("Cannot malloc %zu bytes @ %s:%d", size, func, in qdf_mem_malloc_atomic_debug_fl()
1624 ptr = qdf_mem_prealloc_get(size); in qdf_mem_malloc_atomic_debug_fl()
1628 ptr = kzalloc(size, GFP_ATOMIC); in qdf_mem_malloc_atomic_debug_fl()
1631 size, func, line); in qdf_mem_malloc_atomic_debug_fl()
1839 void *qdf_mem_malloc_atomic_fl(size_t size, const char *func, uint32_t line) in qdf_mem_malloc_atomic_fl() argument
1843 if (!size || size > QDF_MEM_MAX_MALLOC) { in qdf_mem_malloc_atomic_fl()
1844 qdf_nofl_err("Cannot malloc %zu bytes @ %s:%d", size, func, in qdf_mem_malloc_atomic_fl()
1849 ptr = qdf_mem_prealloc_get(size); in qdf_mem_malloc_atomic_fl()
1853 ptr = kzalloc(size, GFP_ATOMIC); in qdf_mem_malloc_atomic_fl()
1856 size, func, line); in qdf_mem_malloc_atomic_fl()
2197 void *__qdf_mem_malloc(size_t size, const char *func, uint32_t line) in __qdf_mem_malloc() argument
2201 if (!size || size > QDF_MEM_MAX_MALLOC) { in __qdf_mem_malloc()
2202 qdf_nofl_err("Cannot malloc %zu bytes @ %s:%d", size, func, in __qdf_mem_malloc()
2207 ptr = qdf_mem_prealloc_get(size); in __qdf_mem_malloc()
2211 ptr = kzalloc(size, qdf_mem_malloc_flags()); in __qdf_mem_malloc()
2231 void *__qdf_untracked_mem_malloc(size_t size, const char *func, uint32_t line) in __qdf_untracked_mem_malloc() argument
2235 if (!size || size > QDF_MEM_MAX_MALLOC) { in __qdf_untracked_mem_malloc()
2236 qdf_nofl_err("Cannot malloc %zu bytes @ %s:%d", size, func, in __qdf_untracked_mem_malloc()
2241 ptr = kzalloc(size, qdf_mem_malloc_flags()); in __qdf_untracked_mem_malloc()
2249 void *qdf_aligned_malloc_fl(uint32_t *size, in qdf_aligned_malloc_fl() argument
2259 *vaddr_unaligned = qdf_mem_malloc_fl((qdf_size_t)*size, func, in qdf_aligned_malloc_fl()
2262 qdf_warn("Failed to alloc %uB @ %s:%d", *size, func, line); in qdf_aligned_malloc_fl()
2278 align_alloc_size = *size + align - 1; in qdf_aligned_malloc_fl()
2291 *size = align_alloc_size; in qdf_aligned_malloc_fl()
2412 qdf_shared_mem_t *qdf_mem_shared_mem_alloc(qdf_device_t osdev, uint32_t size) in qdf_mem_shared_mem_alloc() argument
2423 size, qdf_mem_get_dma_addr_ptr(osdev, in qdf_mem_shared_mem_alloc()
2431 qdf_mem_set_dma_size(osdev, &shared_mem->mem_info, size); in qdf_mem_shared_mem_alloc()
2432 size = qdf_mem_get_dma_size(osdev, &shared_mem->mem_info); in qdf_mem_shared_mem_alloc()
2434 qdf_mem_zero(shared_mem->vaddr, size); in qdf_mem_shared_mem_alloc()
2440 shared_mem->vaddr, dma_addr, size); in qdf_mem_shared_mem_alloc()
2444 shared_mem->mem_info.size, in qdf_mem_shared_mem_alloc()
2515 int qdf_mem_cmp(const void *left, const void *right, size_t size) in qdf_mem_cmp() argument
2520 return memcmp(left, right, size); in qdf_mem_cmp()
2535 qdf_size_t size, in qdf_mem_dma_alloc() argument
2540 vaddr = qdf_mem_malloc(size); in qdf_mem_dma_alloc()
2554 void *qdf_mem_dma_alloc(qdf_device_t osdev, void *dev, qdf_size_t size, in qdf_mem_dma_alloc() argument
2563 vaddr = dma_alloc_coherent(dev, size, phy_addr, in qdf_mem_dma_alloc()
2567 qdf_err("%s failed , size: %zu!", __func__, size); in qdf_mem_dma_alloc()
2574 dma_free_coherent(dev, size, vaddr, *phy_addr); in qdf_mem_dma_alloc()
2601 qdf_size_t size; member
2614 qdf_size_t size, qdf_dma_addr_t *paddr) in qdf_mem_dma_alloc() argument
2625 vaddr = dma_alloc_coherent(dev, size, paddr, in qdf_mem_dma_alloc()
2644 dma_free_coherent(dev, size, vaddr, *paddr); in qdf_mem_dma_alloc()
2649 if (size >= sizeof(*entry)) { in qdf_mem_dma_alloc()
2655 dma_free_coherent(dev, size, vaddr, *paddr); in qdf_mem_dma_alloc()
2663 entry->size = size; in qdf_mem_dma_alloc()
2671 dma_free_coherent(dev, size, vaddr, *paddr); in qdf_mem_dma_alloc()
2681 qdf_size_t size, qdf_dma_addr_t *paddr) in qdf_mem_dma_alloc() argument
2683 return dma_alloc_coherent(dev, size, paddr, qdf_mem_malloc_flags()); in qdf_mem_dma_alloc()
2689 qdf_mem_dma_free(void *dev, qdf_size_t size, void *vaddr, qdf_dma_addr_t paddr) in qdf_mem_dma_free() argument
2696 qdf_mem_dma_free(void *dev, qdf_size_t size, void *vaddr, qdf_dma_addr_t paddr) in qdf_mem_dma_free() argument
2698 dma_free_coherent(dev, size, vaddr, paddr); in qdf_mem_dma_free()
2704 qdf_size_t size, qdf_dma_addr_t *paddr, in qdf_mem_alloc_consistent_debug() argument
2716 size, paddr, in qdf_mem_alloc_consistent_debug()
2719 if (!size || size > QDF_MEM_MAX_MALLOC) { in qdf_mem_alloc_consistent_debug()
2720 qdf_err("Cannot malloc %zu bytes @ %s:%d", size, func, line); in qdf_mem_alloc_consistent_debug()
2724 vaddr = qdf_mem_dma_alloc(osdev, dev, size + QDF_DMA_MEM_DEBUG_SIZE, in qdf_mem_alloc_consistent_debug()
2728 qdf_warn("Failed to malloc %zuB @ %s:%d", size, func, line); in qdf_mem_alloc_consistent_debug()
2732 header = qdf_mem_dma_get_header(vaddr, size); in qdf_mem_alloc_consistent_debug()
2738 qdf_mem_header_init(header, size, func, line, caller); in qdf_mem_alloc_consistent_debug()
2746 qdf_mem_dma_inc(size); in qdf_mem_alloc_consistent_debug()
2753 qdf_size_t size, void *vaddr, in qdf_mem_free_consistent_debug() argument
2765 size, vaddr, in qdf_mem_free_consistent_debug()
2782 header = qdf_mem_dma_get_header(vaddr, size); in qdf_mem_free_consistent_debug()
2793 qdf_mem_dma_dec(header->size); in qdf_mem_free_consistent_debug()
2794 qdf_mem_dma_free(dev, size + QDF_DMA_MEM_DEBUG_SIZE, vaddr, paddr); in qdf_mem_free_consistent_debug()
2800 qdf_size_t size, void *vaddr, in __qdf_mem_free_consistent() argument
2803 qdf_mem_dma_dec(size); in __qdf_mem_free_consistent()
2804 qdf_mem_dma_free(dev, size, vaddr, paddr); in __qdf_mem_free_consistent()
2810 qdf_size_t size, qdf_dma_addr_t *paddr, in __qdf_mem_alloc_consistent() argument
2815 if (!size || size > QDF_MEM_MAX_MALLOC) { in __qdf_mem_alloc_consistent()
2817 size, func, line); in __qdf_mem_alloc_consistent()
2821 vaddr = qdf_mem_dma_alloc(osdev, dev, size, paddr); in __qdf_mem_alloc_consistent()
2824 qdf_mem_dma_inc(size); in __qdf_mem_alloc_consistent()
2832 qdf_device_t osdev, uint32_t *size, in qdf_aligned_mem_alloc_consistent_fl() argument
2841 osdev, osdev->dev, (qdf_size_t)*size, paddr_unaligned); in qdf_aligned_mem_alloc_consistent_fl()
2844 *size, func, line); in qdf_aligned_mem_alloc_consistent_fl()
2858 align_alloc_size = *size + align - 1; in qdf_aligned_mem_alloc_consistent_fl()
2860 qdf_mem_free_consistent(osdev, osdev->dev, *size, in qdf_aligned_mem_alloc_consistent_fl()
2873 *size = align_alloc_size; in qdf_aligned_mem_alloc_consistent_fl()
2889 qdf_size_t size, in qdf_mem_dma_sync_single_for_device() argument
2892 dma_sync_single_for_device(osdev->dev, bus_addr, size, direction); in qdf_mem_dma_sync_single_for_device()
2898 qdf_size_t size, in qdf_mem_dma_sync_single_for_cpu() argument
2901 dma_sync_single_for_cpu(osdev->dev, bus_addr, size, direction); in qdf_mem_dma_sync_single_for_cpu()
3064 void *__qdf_mem_valloc(size_t size, const char *func, uint32_t line) in __qdf_mem_valloc() argument
3068 if (!size) { in __qdf_mem_valloc()
3073 ptr = vzalloc(size); in __qdf_mem_valloc()
3129 qdf_size_t size) in __qdf_kmem_cache_create() argument
3133 cache = kmem_cache_create(cache_name, size, in __qdf_kmem_cache_create()
3175 qdf_size_t size) in __qdf_kmem_cache_create() argument
3238 dma_free_coherent(dev, entry->size, entry->vaddr, in qdf_dma_invalid_buf_free()
3242 dma_free_coherent(dev, entry->size, entry, in qdf_dma_invalid_buf_free()