mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
139 lines
4.8 KiB
Diff
139 lines
4.8 KiB
Diff
--- a/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/calib.c
|
|
@@ -120,7 +120,7 @@ int iwl_calib_set(struct iwl_priv *priv,
|
|
struct iwl_calib_result *res, *tmp;
|
|
|
|
res = kmalloc(sizeof(*res) + len - sizeof(struct iwl_calib_hdr),
|
|
- GFP_ATOMIC);
|
|
+ GFP_ATOMIC | GFP_LX_DMA);
|
|
if (!res)
|
|
return -ENOMEM;
|
|
memcpy(&res->hdr, cmd, len);
|
|
--- a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
|
|
@@ -666,7 +666,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
|
|
ctx = iwl_rxon_ctx_from_vif(vif);
|
|
|
|
if (!priv->scan_cmd) {
|
|
- priv->scan_cmd = kmalloc(scan_cmd_size, GFP_KERNEL);
|
|
+ priv->scan_cmd = kmalloc(scan_cmd_size, GFP_KERNEL | GFP_LX_DMA);
|
|
if (!priv->scan_cmd) {
|
|
IWL_DEBUG_SCAN(priv,
|
|
"fail to allocate memory for scan\n");
|
|
--- a/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c
|
|
@@ -251,7 +251,7 @@ int iwl_phy_db_set_section(struct iwl_phy_db *phy_db,
|
|
return -EINVAL;
|
|
|
|
kfree(entry->data);
|
|
- entry->data = kmemdup(phy_db_notif->data, size, GFP_ATOMIC);
|
|
+ entry->data = kmemdup(phy_db_notif->data, size, GFP_ATOMIC | GFP_LX_DMA);
|
|
if (!entry->data) {
|
|
entry->size = 0;
|
|
return -ENOMEM;
|
|
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
|
|
@@ -99,7 +99,7 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
|
|
kmem_cache_create(trans->dev_cmd_pool_name,
|
|
sizeof(struct iwl_device_cmd),
|
|
sizeof(void *),
|
|
- SLAB_HWCACHE_ALIGN,
|
|
+ SLAB_HWCACHE_ALIGN|SLAB_LX_DMA,
|
|
NULL);
|
|
if (!trans->dev_cmd_pool)
|
|
return NULL;
|
|
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
|
|
@@ -767,7 +767,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
|
|
|
scan_size = iwl_mvm_scan_size(mvm);
|
|
|
|
- mvm->scan_cmd = kmalloc(scan_size, GFP_KERNEL);
|
|
+ mvm->scan_cmd = kmalloc(scan_size, GFP_KERNEL | GFP_LX_DMA);
|
|
if (!mvm->scan_cmd)
|
|
goto out_free;
|
|
|
|
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
|
|
@@ -501,11 +501,11 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
|
|
else
|
|
blacklist_len = IWL_SCAN_MAX_BLACKLIST_LEN;
|
|
|
|
- blacklist = kzalloc(sizeof(*blacklist) * blacklist_len, GFP_KERNEL);
|
|
+ blacklist = kzalloc(sizeof(*blacklist) * blacklist_len, GFP_KERNEL | GFP_LX_DMA);
|
|
if (!blacklist)
|
|
return -ENOMEM;
|
|
|
|
- profile_cfg = kzalloc(sizeof(*profile_cfg), GFP_KERNEL);
|
|
+ profile_cfg = kzalloc(sizeof(*profile_cfg), GFP_KERNEL | GFP_LX_DMA);
|
|
if (!profile_cfg) {
|
|
ret = -ENOMEM;
|
|
goto free_blacklist;
|
|
@@ -1052,7 +1052,7 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
|
|
cmd_size = sizeof(struct iwl_scan_config_v1);
|
|
cmd_size += mvm->fw->ucode_capa.n_scan_channels;
|
|
|
|
- cfg = kzalloc(cmd_size, GFP_KERNEL);
|
|
+ cfg = kzalloc(cmd_size, GFP_KERNEL | GFP_LX_DMA);
|
|
if (!cfg)
|
|
return -ENOMEM;
|
|
|
|
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
|
|
@@ -502,7 +502,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq,
|
|
|
|
txq->entries = kcalloc(slots_num,
|
|
sizeof(struct iwl_pcie_txq_entry),
|
|
- GFP_KERNEL);
|
|
+ GFP_KERNEL | GFP_LX_DMA);
|
|
|
|
if (!txq->entries)
|
|
goto error;
|
|
@@ -511,7 +511,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq,
|
|
for (i = 0; i < slots_num; i++) {
|
|
txq->entries[i].cmd =
|
|
kmalloc(sizeof(struct iwl_device_cmd),
|
|
- GFP_KERNEL);
|
|
+ GFP_KERNEL | GFP_LX_DMA);
|
|
if (!txq->entries[i].cmd)
|
|
goto error;
|
|
}
|
|
@@ -938,7 +938,7 @@ static int iwl_pcie_tx_alloc(struct iwl_trans *trans)
|
|
}
|
|
|
|
trans_pcie->txq_memory = kcalloc(trans->cfg->base_params->num_of_queues,
|
|
- sizeof(struct iwl_txq), GFP_KERNEL);
|
|
+ sizeof(struct iwl_txq), GFP_KERNEL | GFP_LX_DMA);
|
|
if (!trans_pcie->txq_memory) {
|
|
IWL_ERR(trans, "Not enough memory for txq\n");
|
|
ret = -ENOMEM;
|
|
@@ -1539,7 +1539,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
|
|
}
|
|
|
|
dup_buf = kmemdup(cmddata[i], cmdlen[i],
|
|
- GFP_ATOMIC);
|
|
+ GFP_ATOMIC | GFP_LX_DMA);
|
|
if (!dup_buf)
|
|
return -ENOMEM;
|
|
} else {
|
|
--- a/net/core/skbuff.c
|
|
+++ b/net/core/skbuff.c
|
|
@@ -130,6 +130,8 @@ static void *__kmalloc_reserve(size_t size, gfp_t flags, int node,
|
|
void *obj;
|
|
bool ret_pfmemalloc = false;
|
|
|
|
+ flags |= GFP_LX_DMA;
|
|
+
|
|
/*
|
|
* Try a regular allocation, when that fails and we're not entitled
|
|
* to the reserves, fail.
|
|
@@ -278,7 +280,7 @@ struct sk_buff *__build_skb(void *data, unsigned int frag_size)
|
|
struct sk_buff *skb;
|
|
unsigned int size = frag_size ? : ksize(data);
|
|
|
|
- skb = kmem_cache_alloc(skbuff_head_cache, GFP_ATOMIC);
|
|
+ skb = kmem_cache_alloc(skbuff_head_cache, GFP_ATOMIC|GFP_LX_DMA);
|
|
if (!skb)
|
|
return NULL;
|
|
|