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

Commit 4e4e0a14 authored by Matthias Maennich's avatar Matthias Maennich
Browse files

ANDROID: add latest patches to quilt series



up to 06dc94f1 ("ANDROID: sched: Honor sync flag for energy-aware wakeups")

Change-Id: Ic808532ca712428d0716b9fd6cc5fd168d9d0db1
Signed-off-by: default avatarMatthias Maennich <maennich@google.com>
parent 06dc94f1
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ram Muthiah <rammuthiah@google.com>
Date: Thu, 17 Oct 2019 18:28:10 -0700
Subject: ANDROID: gki_defconfig: remove PWRSEQ_EMMC and PWRSEQ_SIMPLE

These modules are not required for GKI.

Bug: 139431025
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I9a82010eb326b0a336725037e0356a63a0c9f053
---
 arch/x86/configs/gki_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig
index 18c3429c7ede..949c449b9d1f 100644
--- a/arch/x86/configs/gki_defconfig
+++ b/arch/x86/configs/gki_defconfig
@@ -289,6 +289,8 @@ CONFIG_USB_CONFIGFS_F_ACC=y
 CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
 CONFIG_USB_CONFIGFS_F_MIDI=y
 CONFIG_MMC=m
+# CONFIG_PWRSEQ_EMMC is not set
+# CONFIG_PWRSEQ_SIMPLE is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_TRIGGERS=y
+51 −0
Original line number Diff line number Diff line
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Redpath <chris.redpath@arm.com>
Date: Thu, 17 Oct 2019 11:18:08 +0100
Subject: ANDROID: sched: Honor sync flag for energy-aware wakeups

Since we don't do energy-aware wakeups when we are overutilized, always
honoring sync wakeups in this state does not prevent wake-wide mechanics
overruling the flag as normal.

Having the check for (cpu_rq(cpu)->nr_running == 1) in the test condition
means that we only bypass the energy model for sync wakeups where the
cpu is about to become idle. This matches the use of this flag in Binder
which is the main place where sync wakeups come from in Android.

This patch is based upon previous work to build EAS for android products.
It replaces
commit 79e3a4a27ee5 ("ANDROID: sched: Unconditionally honor sync flag
 for energy-aware wakeups")
in what's considered to be 'EAS'.

sync-hint code taken from wahoo
https://android.googlesource.com/kernel/msm/+/4a5e890ec60d
written by Juri Lelli <juri.lelli@arm.com>

Change-Id: I4b3d79141fc8e53dc51cd63ac11096c2e3cb10f5
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
(cherry-picked from commit f1ec666a62de)
[ Moved the feature to find_energy_efficient_cpu() and removed the
  sysctl knob ]
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
[ Add 'cpu_rq(cpu)->nr_running == 1' to the condition and remove the
  word 'Unconditionally' from the patch name ]
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
---
 kernel/sched/fair.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ba1eaa599dbc..8f8692baa679 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6364,7 +6364,8 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
 		goto fail;
 
 	cpu = smp_processor_id();
-	if (sync && cpumask_test_cpu(cpu, p->cpus_ptr)) {
+	if (sync && cpu_rq(cpu)->nr_running == 1 &&
+	    cpumask_test_cpu(cpu, p->cpus_ptr)) {
 		rcu_read_unlock();
 		return cpu;
 	}
+42 −0
Original line number Diff line number Diff line
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Steve Muckle <smuckle@google.com>
Date: Thu, 17 Oct 2019 12:14:13 -0700
Subject: ANDROID: unconditionally compile sig_ok in struct module

The generic kernel image must have module signing disabled so it can
load kernel modules from all vendors. Unfortunately loading a signed
kernel module into a kernel with module signing disabled will fail
because struct module_layout (which appears in kernel modules) contains
struct module, and struct module contains the sig_ok field, which is
conditionally compiled depending on CONFIG_MODULE_SIG (module signing).

Unconditionally compile the sig_ok field to work around this problem.

Bug: 135940219
Test: load a signed kernel module with module signing disabled
Change-Id: I5cc437c806f74f89c0e45ce4135136ca0c70738e
Signed-off-by: Steve Muckle <smuckle@google.com>
---
 include/linux/module.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index 6d20895e7739..6744ffe9a727 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -389,10 +389,12 @@ struct module {
 	const s32 *unused_gpl_crcs;
 #endif
 
-#ifdef CONFIG_MODULE_SIG
-	/* Signature was verified. */
+	/*
+	 * Signature was verified. Unconditionally compiled in Android to
+	 * preserve ABI compatibility between kernels without module
+	 * signing enabled and signed modules.
+	 */
 	bool sig_ok;
-#endif
 
 	bool async_probe_requested;
 
+4 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
# android-mainline patches
#
# Applies onto mainline 4f5cafb5cb84 Linux v5.4-rc3
# Matches android-mainline 1caeb408f5db UPSTREAM: base: soc: Handle custom soc information sysfs entries
# Matches android-mainline 06dc94f19d2f "ANDROID: sched: Honor sync flag for energy-aware wakeups"
#
ANDROID-x86-Remove-a-useless-warning-message.patch
ANDROID-Kbuild-LLVMLinux-allow-overriding-clang-target-triple.patch
@@ -232,3 +232,6 @@ Revert-drivers-qcom-rpmh-rsc-modularize-RSC-controller-driver.patch
clk-add-pre-and-post-change-rate-callbacks.patch
ANDROID-gki_defconfig-enable-fs-verity.patch
UPSTREAM-base-soc-Handle-custom-soc-information-sysfs-entries.patch
ANDROID-unconditionally-compile-sig_ok-in-struct-module.patch
ANDROID-gki_defconfig-remove-PWRSEQ_EMMC-and-PWRSEQ_SIMPLE.patch
ANDROID-sched-Honor-sync-flag-for-energy-aware-wakeups.patch