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

Commit 109de2c6 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 2d8171be on remote branch

Change-Id: I26bde2a37b8804217ba92f9a4dab78dda38508ed
parents 0c4bd5a8 2d8171be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -623,7 +623,6 @@ CONFIG_MSM_PIL=y
CONFIG_MSM_SYSMON_QMI_COMM=y
CONFIG_MSM_PIL_SSR_GENERIC=y
CONFIG_MSM_BOOT_STATS=y
CONFIG_QCOM_DCC_V2=y
CONFIG_QCOM_EUD=y
CONFIG_QCOM_MINIDUMP=y
CONFIG_MSM_CORE_HANG_DETECT=y
@@ -644,6 +643,7 @@ CONFIG_QCOM_SMCINVOKE=y
CONFIG_MSM_EVENT_TIMER=y
CONFIG_MSM_PM=y
CONFIG_QTI_L2_REUSE=y
CONFIG_QCOM_DCC=y
CONFIG_QTI_RPM_STATS_LOG=y
CONFIG_QTEE_SHM_BRIDGE=y
CONFIG_MEM_SHARE_QMI_SERVICE=y
+5 −0
Original line number Diff line number Diff line
@@ -472,6 +472,7 @@ struct fastrpc_file {
	struct mutex perf_mutex;
	struct pm_qos_request pm_qos_req;
	int qos_request;
	struct mutex pm_qos_mutex;
	struct mutex map_mutex;
	struct mutex internal_map_mutex;
	/* Identifies the device (MINOR_NUM_DEV / MINOR_NUM_SECURE_DEV) */
@@ -3859,6 +3860,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
	mutex_destroy(&fl->perf_mutex);
	mutex_destroy(&fl->map_mutex);
	mutex_destroy(&fl->internal_map_mutex);
	mutex_destroy(&fl->pm_qos_mutex);
	kfree(fl);
	return 0;
}
@@ -4232,6 +4234,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
	hlist_add_head(&fl->hn, &me->drivers);
	spin_unlock(&me->hlock);
	mutex_init(&fl->perf_mutex);
	mutex_init(&fl->pm_qos_mutex);
	init_completion(&fl->shutdown);
	return 0;
}
@@ -4359,12 +4362,14 @@ static int fastrpc_internal_control(struct fastrpc_file *fl,
		fl->pm_qos_req.type = PM_QOS_REQ_AFFINE_CORES;
		cpumask_copy(&fl->pm_qos_req.cpus_affine, &mask);

		mutex_lock(&fl->pm_qos_mutex);
		if (!fl->qos_request) {
			pm_qos_add_request(&fl->pm_qos_req,
				PM_QOS_CPU_DMA_LATENCY, latency);
			fl->qos_request = 1;
		} else
			pm_qos_update_request(&fl->pm_qos_req, latency);
		mutex_unlock(&fl->pm_qos_mutex);

		/* Ensure CPU feature map updated to DSP for early WakeUp */
		fastrpc_send_cpuinfo_to_dsp(fl);
+2 −1
Original line number Diff line number Diff line
@@ -276,9 +276,10 @@ static int clk_debug_measure_get(void *data, u64 *val)
	enable_debug_clks(measure);
	*val = clk_debug_mux_measure_rate(measure);

	trace_clk_measure(clk_hw_get_name(hw), *val);
	/* recursively calculate actual freq */
	*val *= get_mux_divs(measure);
	/* enable ftrace support */
	trace_clk_measure(clk_hw_get_name(hw), *val);
	disable_debug_clks(measure);
exit:
	if (meas->bus_cl_id)
+29 −2
Original line number Diff line number Diff line
@@ -5,7 +5,9 @@

#include <linux/kthread.h>
#include <linux/notifier.h>
#include <linux/pagevec.h>
#include <linux/shmem_fs.h>
#include <linux/swap.h>

#include "kgsl_reclaim.h"
#include "kgsl_sharedmem.h"
@@ -193,6 +195,12 @@ ssize_t kgsl_proc_max_reclaim_limit_show(struct device *dev,
	return scnprintf(buf, PAGE_SIZE, "%d\n", kgsl_reclaim_max_page_limit);
}

static void kgsl_release_page_vec(struct pagevec *pvec)
{
	check_move_unevictable_pages(pvec->pages, pvec->nr);
	__pagevec_release(pvec);
}

static int kgsl_reclaim_callback(struct notifier_block *nb,
		unsigned long pid, void *data)
{
@@ -266,20 +274,39 @@ static int kgsl_reclaim_callback(struct notifier_block *nb,

		if (!kgsl_mmu_unmap(memdesc->pagetable, memdesc)) {
			int i;
			struct pagevec pvec;

			/*
			 * Pages that are first allocated are by default added
			 * to unevictable list. To reclaim them, we first clear
			 * the AS_UNEVICTABLE flag of the shmem file address
			 * space thus check_move_unevictable_pages() places
			 * them on the evictable list.
			 *
			 * Once reclaim is done, hint that further shmem
			 * allocations will have to be on the unevictable list.
			 */
			mapping_clear_unevictable(
					memdesc->shmem_filp->f_mapping);
			pagevec_init(&pvec);
			for (i = 0; i < memdesc->page_count; i++) {
				set_page_dirty_lock(memdesc->pages[i]);
				spin_lock(&memdesc->lock);
				put_page(memdesc->pages[i]);
				pagevec_add(&pvec, memdesc->pages[i]);
				memdesc->pages[i] = NULL;
				spin_unlock(&memdesc->lock);
				if (pagevec_count(&pvec) == PAGEVEC_SIZE)
					kgsl_release_page_vec(&pvec);
			}
			if (pagevec_count(&pvec))
				kgsl_release_page_vec(&pvec);

			memdesc->priv |= KGSL_MEMDESC_RECLAIMED;

			ret = reclaim_address_space
				(memdesc->shmem_filp->f_mapping, data);

			mapping_set_unevictable(memdesc->shmem_filp->f_mapping);
			memdesc->reclaimed_page_count += memdesc->page_count;
			atomic_add(memdesc->page_count,
					&process->reclaimed_page_count);
+2 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
 */

@@ -974,6 +975,7 @@ static int kgsl_memdesc_file_setup(struct kgsl_memdesc *memdesc, uint64_t size)
			memdesc->shmem_filp = NULL;
			return ret;
		}
		mapping_set_unevictable(memdesc->shmem_filp->f_mapping);
	}

	return 0;
Loading