Lines Matching refs:sc_buf_pool
749 INIT_LIST_HEAD(&oct->sc_buf_pool.head); in octeon_setup_sc_buffer_pool()
750 spin_lock_init(&oct->sc_buf_pool.lock); in octeon_setup_sc_buffer_pool()
751 atomic_set(&oct->sc_buf_pool.alloc_buf_count, 0); in octeon_setup_sc_buffer_pool()
766 list_add_tail(&sc->node, &oct->sc_buf_pool.head); in octeon_setup_sc_buffer_pool()
842 spin_lock_bh(&oct->sc_buf_pool.lock); in octeon_free_sc_buffer_pool()
844 list_for_each_safe(tmp, tmp2, &oct->sc_buf_pool.head) { in octeon_free_sc_buffer_pool()
852 INIT_LIST_HEAD(&oct->sc_buf_pool.head); in octeon_free_sc_buffer_pool()
854 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_free_sc_buffer_pool()
876 spin_lock_bh(&oct->sc_buf_pool.lock); in octeon_alloc_soft_command()
878 if (list_empty(&oct->sc_buf_pool.head)) { in octeon_alloc_soft_command()
879 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_alloc_soft_command()
883 list_for_each(tmp, &oct->sc_buf_pool.head) in octeon_alloc_soft_command()
888 atomic_inc(&oct->sc_buf_pool.alloc_buf_count); in octeon_alloc_soft_command()
890 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_alloc_soft_command()
933 spin_lock_bh(&oct->sc_buf_pool.lock); in octeon_free_soft_command()
935 list_add_tail(&sc->node, &oct->sc_buf_pool.head); in octeon_free_soft_command()
937 atomic_dec(&oct->sc_buf_pool.alloc_buf_count); in octeon_free_soft_command()
939 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_free_soft_command()