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

Commit 08b6daa2 authored by Imran Khan's avatar Imran Khan Committed by Sarangdhar Joshi
Browse files

arm64: Control use of app specific settings



The app specific settings should be used only for those
socs where it is needed. This change introduces a module
parameter to control use of this feature.

CRs-Fixed: 997757
Change-Id: I60742c531706538500d3db6f058b966438d56db5
Signed-off-by: default avatarImran Khan <kimran@codeaurora.org>
parent e746c583
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ static inline void clear_app_setting_bit(uint32_t bit) {}
extern void switch_app_setting_bit(struct task_struct *prev,
				   struct task_struct *next);
extern void apply_app_setting_bit(struct file *file);
extern bool use_app_setting;
#endif

#endif
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@ static struct kparam_string kps = {
static int set_name(const char *str, struct kernel_param *kp);
module_param_call(lib_name, set_name, param_get_string, &kps, S_IWUSR);

bool use_app_setting = true;
module_param(use_app_setting, bool, 0644);
MODULE_PARM_DESC(use_app_setting, "control use of app specific settings");

static int set_name(const char *str, struct kernel_param *kp)
{
	int len = strlen(str);
+2 −1
Original line number Diff line number Diff line
@@ -5043,6 +5043,7 @@ prepare_task_switch(struct rq *rq, struct task_struct *prev,
	prepare_arch_switch(next);

#ifdef CONFIG_MSM_APP_SETTINGS
	if (use_app_setting)
		switch_app_setting_bit(prev, next);
#endif
}
+2 −1
Original line number Diff line number Diff line
@@ -1281,6 +1281,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
	*populate = 0;

#ifdef CONFIG_MSM_APP_SETTINGS
	if (use_app_setting)
		apply_app_setting_bit(file);
#endif