iwlwifi: pcie: move iwl_pcie_ctxt_info_alloc_dma() to user
There's no need for this to be an inline in the header file, only the context-info.c file ever uses it. Move it there. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20200418110539.818a06457888.Ib4f55280cd14d7edab37f2992b381c9b6ca4cd7a@changeid
This commit is contained in:
committed by
Luca Coelho
parent
f05f8edd90
commit
63417549fc
@@ -93,6 +93,21 @@ static void *iwl_pcie_ctxt_info_dma_alloc_coherent(struct iwl_trans *trans,
|
|||||||
return _iwl_pcie_ctxt_info_dma_alloc_coherent(trans, size, phys, 0);
|
return _iwl_pcie_ctxt_info_dma_alloc_coherent(trans, size, phys, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int iwl_pcie_ctxt_info_alloc_dma(struct iwl_trans *trans,
|
||||||
|
const struct fw_desc *sec,
|
||||||
|
struct iwl_dram_data *dram)
|
||||||
|
{
|
||||||
|
dram->block = iwl_pcie_ctxt_info_dma_alloc_coherent(trans, sec->len,
|
||||||
|
&dram->physical);
|
||||||
|
if (!dram->block)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
dram->size = sec->len;
|
||||||
|
memcpy(dram->block, sec->data, sec->len);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans)
|
void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
struct iwl_self_init_dram *dram = &trans->init_dram;
|
struct iwl_self_init_dram *dram = &trans->init_dram;
|
||||||
|
|||||||
@@ -792,22 +792,6 @@ static inline int iwl_pcie_get_num_sections(const struct fw_img *fw,
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int iwl_pcie_ctxt_info_alloc_dma(struct iwl_trans *trans,
|
|
||||||
const struct fw_desc *sec,
|
|
||||||
struct iwl_dram_data *dram)
|
|
||||||
{
|
|
||||||
dram->block = dma_alloc_coherent(trans->dev, sec->len,
|
|
||||||
&dram->physical,
|
|
||||||
GFP_KERNEL);
|
|
||||||
if (!dram->block)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
dram->size = sec->len;
|
|
||||||
memcpy(dram->block, sec->data, sec->len);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void iwl_pcie_ctxt_info_free_fw_img(struct iwl_trans *trans)
|
static inline void iwl_pcie_ctxt_info_free_fw_img(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
struct iwl_self_init_dram *dram = &trans->init_dram;
|
struct iwl_self_init_dram *dram = &trans->init_dram;
|
||||||
|
|||||||
Reference in New Issue
Block a user