Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b4fa244 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: use atomic allocations for setup/teardown pipes" into msm-4.14

parents 2b465df2 ad437e5c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ static int ipa3_reconfigure_channel_to_gpi(struct ipa3_ep_context *ep,
	chan_props.ring_len = 2 * GSI_CHAN_RE_SIZE_16B;
	chan_props.ring_base_vaddr =
		dma_alloc_coherent(ipa3_ctx->pdev, chan_props.ring_len,
		&chan_dma_addr, 0);
		&chan_dma_addr, GFP_ATOMIC);
	chan_props.ring_base_addr = chan_dma_addr;
	chan_dma->base = chan_props.ring_base_vaddr;
	chan_dma->phys_base = chan_props.ring_base_addr;
@@ -299,7 +299,7 @@ static int ipa3_reset_with_open_aggr_frame_wa(u32 clnt_hdl,

	memset(&xfer_elem, 0, sizeof(struct gsi_xfer_elem));
	buff = dma_alloc_coherent(ipa3_ctx->pdev, 1, &dma_addr,
		GFP_KERNEL);
		GFP_ATOMIC);
	xfer_elem.addr = dma_addr;
	xfer_elem.len = 1;
	xfer_elem.flags = GSI_XFER_FLAG_EOT;
+7 −2
Original line number Diff line number Diff line
@@ -3631,6 +3631,11 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in,
	dma_addr_t dma_addr;
	dma_addr_t evt_dma_addr;
	int result;
	gfp_t mem_flag = GFP_KERNEL;

	if (in->client == IPA_CLIENT_APPS_WAN_CONS ||
		in->client == IPA_CLIENT_APPS_WAN_PROD)
		mem_flag = GFP_ATOMIC;

	if (!ep) {
		IPAERR("EP context is empty\n");
@@ -3668,7 +3673,7 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in,
		gsi_evt_ring_props.ring_base_vaddr =
			dma_alloc_coherent(ipa3_ctx->pdev,
			gsi_evt_ring_props.ring_len,
			&evt_dma_addr, GFP_KERNEL);
			&evt_dma_addr, mem_flag);
		if (!gsi_evt_ring_props.ring_base_vaddr) {
			IPAERR("fail to dma alloc %u bytes\n",
				gsi_evt_ring_props.ring_len);
@@ -3743,7 +3748,7 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in,
		gsi_channel_props.ring_len = 2 * in->desc_fifo_sz;
	gsi_channel_props.ring_base_vaddr =
		dma_alloc_coherent(ipa3_ctx->pdev, gsi_channel_props.ring_len,
			&dma_addr, GFP_KERNEL);
			&dma_addr, mem_flag);
	if (!gsi_channel_props.ring_base_vaddr) {
		IPAERR("fail to dma alloc %u bytes\n",
			gsi_channel_props.ring_len);