Commit Graph

992830 Commits

Author SHA1 Message Date
qctecmdr
8ef61a54d5 Merge "usb: gadget: f_fs_ipc_log: Fix log text" 2021-02-12 13:02:45 -08:00
qctecmdr
73cf8ab2fa Merge "msm: kgsl: Map GMU AO register space" 2021-02-12 13:02:45 -08:00
qctecmdr
dcad8a3ee6 Merge "sched/walt: Use nr_running > 1 condition for same cluster lb" 2021-02-12 13:02:44 -08:00
Carter Cooper
21eaa6c951 msm: kgsl: Update register access protection for Waipio
Bring in the latest and greatest register protections.

Change-Id: I62a0c1ea143c56232a8ff5b892428822d48312a7
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2021-02-12 14:01:41 -07:00
Nitheesh Muthuraj
6db58fa047 msm: kgsl: Remove ION_FLAG_CACHED check
ION is no longer used so remove checking for ION cached flags.

Change-Id: I42dac9460abd9fecfc2aca8f4f4fe26adbf22097
Signed-off-by: Nitheesh Muthuraj <nmuthuraj@codeaurora.org>
2021-02-12 14:01:08 -07:00
Urvashi Agrawal
fe4b773fb2 msm: kgsl: Add a thread control packets for GenC
With Concurrent Binning enabled we need to make sure
certain PM4 commands like the SMMU table update, CP_INIT,
CACHE_CLEAN etc are exceuted by the correct thread.
Add thread control support at places which need them.

Change-Id: Ib735cd970f06ef507a6837c913c34de154fc25a6
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
Signed-off-by: Raghu Ananya Arabolu <rarabolu@codeaurora.org>
2021-02-12 12:19:12 -07:00
Manikandan Mohan
6152113223 modules.blocklist: Remove WLAN protocol driver from block list
WLAN driver is updated to be compatible with GKI model. Thus remove
it from block list and allow loading at boot.

Change-Id: Iddb2516f9cc5dd40e8090022780a0be5ede149a7
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2021-02-12 11:04:58 -08:00
Jaegeuk Kim
84b3c06a75 ANDROID: GKI: bring WPAN into GKI
https://developer.android.com/things/sdk/apis/lowpan:
On these networks, Android devices can communicate directly with
other peer devices, even ultra-low power battery operated nodes
that may not have WiFi or Bluetooth connectivity (such as door
locks and window sensors).

Bug: 175144495
Change-Id: I58203325e70570a37e7f55c2b45bb77a8cf88554
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2021-02-12 17:09:17 +00:00
Marc Zyngier
5ea1ff037e FROMGIT: arm64: cpufeatures: Allow disabling of Pointer Auth from the command-line
In order to be able to disable Pointer Authentication  at runtime,
whether it is for testing purposes, or to work around HW issues,
let's add support for overriding the ID_AA64ISAR1_EL1.{GPI,GPA,API,APA}
fields.

This is further mapped on the arm64.nopauth command-line alias.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Tested-by: Srinivas Ramana <sramana@codeaurora.org>
Link: https://lore.kernel.org/r/20210208095732.3267263-23-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit f8da5752fd1b25f1ecf78a79013e2dfd2b860589
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I0913dff5ed1c5ee731ad6705e8b6cbde8b3e9a81
2021-02-12 15:27:48 +00:00
Srinivas Ramana
3a52c12b3a FROMGIT: arm64: Defer enabling pointer authentication on boot core
Defer enabling pointer authentication on boot core until
after its required to be enabled by cpufeature framework.
This will help in controlling the feature dynamically
with a boot parameter.

Signed-off-by: Ajay Patil <pajay@qti.qualcomm.com>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1610152163-16554-2-git-send-email-sramana@codeaurora.org
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-22-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 7f6240858cf3abb75237c9ba63ec70d232573ae8
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I05c400e88abf15ab0348ce8ac2698c0ce800456a
2021-02-12 15:27:47 +00:00
Marc Zyngier
f0a30f9617 FROMGIT: arm64: cpufeatures: Allow disabling of BTI from the command-line
In order to be able to disable BTI at runtime, whether it is
for testing purposes, or to work around HW issues, let's add
support for overriding the ID_AA64PFR1_EL1.BTI field.

This is further mapped on the arm64.nobti command-line alias.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Tested-by: Srinivas Ramana <sramana@codeaurora.org>
Link: https://lore.kernel.org/r/20210208095732.3267263-21-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 93ad55b7852b324a3fd7d46910b88c81deb62357
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: Ib6a3e923a97120d6a438a7b46cb182a175d434bf
2021-02-12 15:27:47 +00:00
Marc Zyngier
9dccdf5197 FROMGIT: arm64: Move "nokaslr" over to the early cpufeature infrastructure
Given that the early cpufeature infrastructure has borrowed quite
a lot of code from the kaslr implementation, let's reimplement
the matching of the "nokaslr" option with it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-20-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit a762f4ffc3c8a434da1b712e57a80d8d10404198
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I615eacac68b7109c76e835d3118ae8ecfa466d2a
2021-02-12 15:27:47 +00:00
Marc Zyngier
1952c1aee8 FROMGIT: KVM: arm64: Document HVC_VHE_RESTART stub hypercall
For completeness, let's document the HVC_VHE_RESTART stub.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-19-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 166cc2a4be0d80075d379b30d3e84895c878a1a8
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: Ib390651a635fe2f83dcc4d1a0c5a959eb892e5bd
2021-02-12 15:27:47 +00:00
Marc Zyngier
2163159d76 FROMGIT: arm64: Make kvm-arm.mode={nvhe, protected} an alias of id_aa64mmfr1.vh=0
Admitedly, passing id_aa64mmfr1.vh=0 on the command-line isn't
that easy to understand, and it is likely that users would much
prefer write "kvm-arm.mode=nvhe", or "...=protected".

So here you go. This has the added advantage that we can now
always honor the "kvm-arm.mode=protected" option, even when
booting on a VHE system.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-18-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 1945a067f351debcd2518d9f6039b1835de08dfd
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I66d4a5bdb341db7ac6017bd6af97cdddb694d6c3
2021-02-12 15:27:47 +00:00
Marc Zyngier
77ecc9a1fc FROMGIT: arm64: Add an aliasing facility for the idreg override
In order to map the override of idregs to options that a user
can easily understand, let's introduce yet another option
array, which maps an option to the corresponding idreg options.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-17-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 863ace77e9ff85c06d57e9491faffae8512070de
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I11cb658212a06752db6ece7c9157f83e07d243a5
2021-02-12 15:27:47 +00:00
Marc Zyngier
1514fff3c6 FROMGIT: arm64: Honor VHE being disabled from the command-line
Finally we can check whether VHE is disabled on the command line,
and not enable it if that's the user's wish.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-16-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 41fac42c25338f4ea295b58106c26683d893a1c6
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I12b82cf5968019806d4c851b5021cf27b1675893
2021-02-12 15:27:47 +00:00
Marc Zyngier
91071a3574 FROMGIT: arm64: Allow ID_AA64MMFR1_EL1.VH to be overridden from the command line
As we want to be able to disable VHE at runtime, let's match
"id_aa64mmfr1.vh=" from the command line as an override.
This doesn't have much effect yet as our boot code doesn't look
at the cpufeature, but only at the HW registers.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-15-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 361db0fca7affafa920f7d91bf93b9d9da44712f
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I997bac244601e0750a714ef37dfcafc99bf668a9
2021-02-12 15:27:46 +00:00
Marc Zyngier
9a251050b9 FROMGIT: arm64: cpufeature: Add an early command-line cpufeature override facility
In order to be able to override CPU features at boot time,
let's add a command line parser that matches options of the
form "cpureg.feature=value", and store the corresponding
value into the override val/mask pair.

No features are currently defined, so no expected change in
functionality.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-14-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 33200303553d3d74e7b980493cf363da545f887d
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I3b39617885adf2bc8200b66cc8f8dab87caa5f33
2021-02-12 15:27:46 +00:00
Marc Zyngier
c89aee1e3d FROMGIT: arm64: Extract early FDT mapping from kaslr_early_init()
As we want to parse more options very early in the kernel lifetime,
let's always map the FDT early. This is achieved by moving that
code out of kaslr_early_init().

No functional change expected.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-13-maz@kernel.org
[will: Ensue KASAN is enabled before running C code]
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit f6f0c4362f070cab4a0cec432e82428d702ce0a6
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: Ie8795399948d170975a1070facce16defca0cb39
2021-02-12 15:27:46 +00:00
Marc Zyngier
a31f6cf381 FROMGIT: arm64: cpufeature: Use IDreg override in __read_sysreg_by_encoding()
__read_sysreg_by_encoding() is used by a bunch of cpufeature helpers,
which should take the feature override into account. Let's do that.

For a good measure (and because we are likely to need to further
down the line), make this helper available to the rest of the
non-modular kernel.

Code that needs to know the *real* features of a CPU can still
use read_sysreg_s(), and find the bare, ugly truth.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-12-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit b3341ae0efa235726ad69e53ce83c6a3c445bda8
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: Iac1fc235a5611efcd2c45dd6ec813e535e7deac9
2021-02-12 15:27:46 +00:00
Marc Zyngier
b424fe642b FROMGIT: arm64: cpufeature: Add global feature override facility
Add a facility to globally override a feature, no matter what
the HW says. Yes, this sounds dangerous, but we do respect the
"safe" value for a given feature. This doesn't mean the user
doesn't need to know what they are doing.

Nothing uses this yet, so we are pretty safe. For now.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-11-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 8f266a5d878ad38fbd43e41e22847650f51d4734
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I16342064f707c80134dcd4eadd0af757bc30c6d2
2021-02-12 15:27:46 +00:00
Marc Zyngier
1402c03b69 FROMGIT: arm64: Move SCTLR_EL1 initialisation to EL-agnostic code
We can now move the initial SCTLR_EL1 setup to be used for both
EL1 and EL2 setup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-10-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit d077cb3cb90470f8bd7dbe357a474e13589390b9
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I73d3a02404d21ddd91b7902423fb011df5bd3856
2021-02-12 15:27:46 +00:00
Marc Zyngier
6dec63c4c0 FROMGIT: arm64: Simplify init_el2_state to be non-VHE only
As init_el2_state is now nVHE only, let's simplify it and drop
the VHE setup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-9-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit e2df464173f0b585adb958a09536eae2cd1dbefd
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I8fd05f6c93da5bcbdf80c86fbc24b19eef0509a3
2021-02-12 15:27:46 +00:00
Marc Zyngier
d382cdf411 FROMGIT: arm64: Move VHE-specific SPE setup to mutate_to_vhe()
There isn't much that a VHE kernel needs on top of whatever has
been done for nVHE, so let's move the little we need to the
VHE stub (the SPE setup), and drop the init_el2_state macro.

No expected functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-8-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 19e87e131915a2389a08874092a82fe5aa0f8952
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I79e0d7c70fdd5f27227356d12a40a4c7d27f56ba
2021-02-12 15:27:45 +00:00
Marc Zyngier
169eb0593d FROMGIT: arm64: Drop early setting of MDSCR_EL2.TPMS
When running VHE, we set MDSCR_EL2.TPMS very early on to force
the trapping of EL1 SPE accesses to EL2.

However:
- we are running with HCR_EL2.{E2H,TGE}={1,1}, meaning that there
  is no EL1 to trap from

- before entering a guest, we call kvm_arm_setup_debug(), which
  sets MDCR_EL2_TPMS in the per-vcpu shadow mdscr_el2, which gets
  applied on entry by __activate_traps_common().

The early setting of MDSCR_EL2.TPMS is therefore useless and can
be dropped.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210208095732.3267263-7-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit c6f8c92f3f368d345c38aea5cc0e60515bcb159e
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I9f9c2cc7507f6dae891810ee5904f5d02c744324
2021-02-12 15:27:45 +00:00
Marc Zyngier
b8fc8e6d3c FROMGIT: arm64: Initialise as nVHE before switching to VHE
As we are aiming to be able to control whether we enable VHE or
not, let's always drop down to EL1 first, and only then upgrade
to VHE if at all possible.

This means that if the kernel is booted at EL2, we always start
with a nVHE init, drop to EL1 to initialise the the kernel, and
only then upgrade the kernel EL to EL2 if possible (the process
is obviously shortened for secondary CPUs).

The resume path is handled similarly to a secondary CPU boot.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-6-maz@kernel.org
[will: Avoid calling switch_to_vhe twice on kaslr path]
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 0c93df9622d4d921bcd0dc83f71fed9e98f5119f
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I4996fdb284e37ef0b43d9aadc42f95e0e5ebde19
2021-02-12 15:27:45 +00:00
Marc Zyngier
d72553321c FROMGIT: arm64: Provide an 'upgrade to VHE' stub hypercall
As we are about to change the way a VHE system boots, let's
provide the core helper, in the form of a stub hypercall that
enables VHE and replicates the full EL1 context at EL2, thanks
to EL1 and VHE-EL2 being extremely similar.

On exception return, the kernel carries on at EL2. Fancy!

Nothing calls this new hypercall yet, so no functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-5-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit f359182291c757cdf77bcd014c025d1ed6b87662
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I209373fb629a711c2f926a2aa463fe2594d2966e
2021-02-12 15:27:45 +00:00
Marc Zyngier
14c8f906cd FROMGIT: arm64: Turn the MMU-on sequence into a macro
Turning the MMU on is a popular sport in the arm64 kernel, and
we do it more than once, or even twice. As we are about to add
even more, let's turn it into a macro.

No expected functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-4-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 8cc8a32415364e475c25277b507f06f67c47ca9a
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I8ed57feaac3ea866de92d69cb5c95bcd9e26ea83
2021-02-12 15:27:45 +00:00
Marc Zyngier
012766049a FROMGIT: arm64: Fix outdated TCR setup comment
The arm64 kernel has long be able to use more than 39bit VAs.
Since day one, actually. Let's rewrite the offending comment.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-3-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit b161f92482426a7323884d57cbae683812909988
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: Ie175e7869caaf0a363c30771944c9986edf4e05d
2021-02-12 15:27:45 +00:00
Marc Zyngier
40dda987de FROMGIT: arm64: Fix labels in el2_setup macros
If someone happens to write the following code:

	b	1f
	init_el2_state	vhe
1:
	[...]

they will be in for a long debugging session, as the label "1f"
will be resolved *inside* the init_el2_state macro instead of
after it. Not really what one expects.

Instead, rewite the EL2 setup macros to use unambiguous labels,
thanks to the usual macro counter trick.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-2-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 114945d84a30a5feba8ec24d854257c78c89abd1
 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cpufeature)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: Ied15c02f6967f17ce26ee7c213d019e7a1b17aa0
2021-02-12 15:27:45 +00:00
Tyler Hicks
d61923dd61 UPSTREAM: arm64: Extend the kernel command line from the bootloader
Provide support for additional kernel command line parameters to be
concatenated onto the end of the command line provided by the
bootloader. Additional parameters are specified in the CONFIG_CMDLINE
option when CONFIG_CMDLINE_EXTEND is selected, matching other
architectures and leveraging existing support in the FDT and EFI stub
code.

Special care must be taken for the arch-specific nokaslr parsing. Search
the bootargs FDT property and the CONFIG_CMDLINE when
CONFIG_CMDLINE_EXTEND is in use.

There are a couple of known use cases for this feature:

1) Switching between stable and development kernel versions, where one
   of the versions benefits from additional command line parameters,
   such as debugging options.
2) Specifying additional command line parameters, for additional tuning
   or debugging, when the bootloader does not offer an interactive mode.

Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Link: https://lore.kernel.org/r/20200921191557.350256-3-tyhicks@linux.microsoft.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 1e40d105dae5b7aca8ca7bfd7a0c348c0c509dba)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I335c35a965ad7eae7c7726bc1f41ba791765c935
2021-02-12 15:27:45 +00:00
Will Deacon
31cfaa5e43 Revert "ANDROID: arm64: copy CONFIG_CMDLINE_EXTEND from ARM"
This reverts commit 056f12819b.

Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I02809bb1cdd73619452cf0c5d1bada04a7e1442a
2021-02-12 15:27:44 +00:00
Tyler Hicks
e47c7411e4 UPSTREAM: arm64: kaslr: Refactor early init command line parsing
Don't ask for *the* command line string to search for "nokaslr" in
kaslr_early_init(). Instead, tell a helper function to search all the
appropriate command line strings for "nokaslr" and return the result.

This paves the way for searching multiple command line strings without
having to concatenate the strings in early init.

Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Link: https://lore.kernel.org/r/20200921191557.350256-2-tyhicks@linux.microsoft.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 52ec03f75d599d5bc240422bac8574724a319bec)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 175544340
Change-Id: I2ba194376b6c9939ca76b6528154ab6acb2438b7
2021-02-12 15:27:44 +00:00
Akash Asthana
2991bcf5d4 platform: msm: msm-geni-se: Check for NULL before unvoting
If console driver is probed before all the enabled  QUP wrapper are probed
then while removing the proxy votes for earlycon NULL pointer crash will
trigger, because it tries to remove the vote from QUP device which is not
ready/probed yet.

Change-Id: Ic190d15d992a2087ca7e59dde41c975b4b66ce0c
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
2021-02-12 18:13:16 +05:30
Pavankumar Kondeti
89fbcb3dd6 sched/walt: Use nr_running > 1 condition for same cluster lb
FIFO/RT tasks are supposed to run for short amount of time. So
when a CPU is busy with 1 RT and 1 CFS task, the other idle CPU
won't offer help thinking the CFS task will run immediately.
However, results indicate that realaxing this policy and pulling
the CFS task helps in reducing the runnables. This policy is
limited to the same capacity cluster load balance as we want
strict prefer idle behavior for it.

Change-Id: I4df6e00233503e096b1bb87fd17a784ea53fd9be
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-02-12 16:08:34 +05:30
Pavankumar Kondeti
6a02a50128 sched/walt: Use unbounded cpu util in load balancer
The utilization return by cpu_util() is bounded by the original
capacity of the CPU. Load balancer uses the utilization to
break the ties. Use unbounded cpu utilization so that the most
loaded CPU gets help.

Change-Id: Id16cea205e6eb07a42a1e86fda533cd825df6908
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-02-12 16:08:34 +05:30
Shashank Babu Chinta Venkata
b0142fb368 ABI: add proc_remove symbol to QCOM whitelist
Add proc_remove symbol required by focaltech touch driver
to whitelist.

Change-Id: If5b53ccb3e50b5ed37ccbeeaa9524175b0cb19b0
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-02-12 01:08:27 -08:00
Kevin Hilman
6bac618534 ANDROID: GKI: amlogic: add DTB overlays
Add Android DTB overlays for sei510, sei610, VIM3 and VIM3L.

Copied from yukawa v5.10 kernel
- repo: kernel/hikey-linaro
- branch: amlogic-bmeson-5.10

Bug: 179406580
Change-Id: Ie257351f7dec6765feb162dff014eb1d97eb1039
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
(cherry picked from commit bb24b363f75ef5b9712bb11208814b1f24df8e5c kernel/common android-mainline)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2021-02-12 10:08:04 +01:00
Kevin Hilman
9eb5a3a29e ANDROID: GKI: add support for Amlogic SoCs, everything as modules
Add build config, and kernel config fragment to build a GKI kernel for
Amlogic SoCs with *all* SoC-specific functionality built as modules.

Bug: 179406580
Change-Id: I76664649b00f968819f9c8fefd18656e0b519e79
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
(cherry picked from commit db7b42ae4d8de5d9616f88ebf831b2752d08b47b kernel/common android-mainline)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2021-02-12 10:08:03 +01:00
Kevin Hilman
a7db97195b ANDROID: GKI: Kconfig.gki: add hidden PHY configs
When testing GKI with out-of-tree PCIe support as modules, it was
discovered some hidden Kconfigs are required for DPHYs.  Add here so
out of tree PCIe drivers and PHYs can be built in a separate tree.

Bug: 179406580
Change-Id: Ic27c678b4e0dd4c29d354ff1139d453b99a3744f
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
(cherry picked from commit 4b41c1113cab477366e5f08e03453ff5e612c949 kernel/common android-mainline)
2021-02-12 10:08:03 +01:00
Kevin Hilman
2ff6197f94 ANDROID: GKI: enable networking; add hidden network configs
Drop the explicit disable of CONFIG_ETHERNET from gki_defconfig so
wired networking support is enabled by default.

Also, when testing GKI with out-of-tree wired networking modules, it
was discovered that a few hidden Kconfigs are required.  Add them here
so out of tree net drivers can be built in a separate tree.

Bug: 179406580
Change-Id: Ia66742e514ae1a3c9f8d0ec1d92eb40b68d12ce7
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
(cherry picked from commit 30f31797fe80307598bc2502bfe2eb19b9bf13fe kernel/common android-mainline)
2021-02-12 10:08:03 +01:00
Pavankumar Kondeti
b51c928bff sched/walt: Don't migrate running task to a busy CPU
Active migration of running tasks is allowed only onto idle CPUs.
Add a check for it in walt_lb_find_busiest_lower_cap_cpu().

Change-Id: I195aadc8b5822d4f231edd2f57d9df5ef1a6e350
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-02-12 14:37:28 +05:30
Pavankumar Kondeti
7eb65430bc sched/walt: Fix misfit accounting issues
Currently we are using task_fits_capacity() for  misfit task
accounting. This does not consider boost scenarios. We also
end up accounting 100% tasks running on the highest capacity
CPU as misfit. A task on the highest capacity CPU should never
be treated as misfit.

rq->misfit_task_load should use task_util() not task_load(). The
later is task demand scaled to sched_ravg_window in nano seconds.

Change-Id: I1f923e33530d2d04d7bfca9dd42920f799794864
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-02-12 14:37:28 +05:30
Chandana Kishori Chiluveru
5e7f62065d abi: Update abi_gki_aarch64_qcom symbol list
Update abi_gki_aarch64_qcom symbol list.

Change-Id: Ic93bf27740f1ec1990de7b4bd4c48739fdb7d697
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2021-02-12 12:54:46 +05:30
Prakash Gupta
396d6354ae ANDROID: GKI: Enable CONFIG_CMA_DEBUGFS
This will allow userdebug/eng builds to access cma debugfs without needing
to build a separate debug kernel.

Bug: 179338962
Change-Id: I2cb6cf9bfb2b686983f91ffd7f3f520a6ffa5adf
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2021-02-12 03:19:14 +00:00
qctecmdr
9cd1c7ecd6 Merge "sched/walt: Fix walt_lb_find_busiest_lower_cap_cpu() condition" 2021-02-11 17:11:43 -08:00
qctecmdr
ca91a22ed4 Merge "msm: adsprpc: Replace API dma_buf_get_flags and remove uncached attributes" 2021-02-11 17:11:43 -08:00
qctecmdr
7673aaddc3 Merge "usb: dwc3: dwc3-msm: Avoid overriding DBM_GEN_CFG register" 2021-02-11 17:11:43 -08:00
qctecmdr
d27a283691 Merge "GKI: Update abi_gki_aarch64_qcom list for display" 2021-02-11 17:11:43 -08:00
Umesh Vats
6079fa5117 modules.blocklist: Remove entry for FM driver
Remove the entry for FM Radio driver form block list.

Change-Id: I51c34d7bcf03b516203859d0e0f049da2fd90441
Signed-off-by: Umesh Vats <uvats@codeaurora.org>
2021-02-11 16:57:18 -08:00