There are build issues in certain targets due to a recent change to the
section declarations (33def8498f). Until
this is reconciled properly, revert to the older declaration style for a
few files.
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Id34aeca94bb395f79fb6a3710f92c6827964a79d
Now KVM better handles the asym aarch32 situation. Allow both configs to
coexist.
Bug: 168847043
Reason: Needed for bringup. Revert when upstream patch is available
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: I62d8fd58ac950846f18cf2cb848a3b59922e9bd6
KVM is not allowed when CONFIG_ASYMMETRIC_AARCH32 is enabled.
But there's a desire to allow the 2 configs to coexist for Android
GKI so that Protected KVM and this feature can both be enabled.
The approach taken here is to simply make sure KVM doesn't see the
asymmetry and hope for the best. It's not a bulletproof solution since
ERET can still cause a return to aarch32. There's very little we can do
anyway and we assume upper layer have to cooperate to guarantee
correctness.
Tested on FVP by booting the same kernel via qemu and attempting to run
a 32bit statically linked binary. The host can run the app fine but the
guest wasn't able to recognize the binary and run it. Which is the
expected behavior.
Bug: 168847043
Reason: Needed for bringup. Revert when upstream patch is available
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: I2fc639815632567d0a4697b184ded03392dd572d
On asym aarch32 systems, bringing the last aarch32 cpu would cause any
running 32bit application to crash. To protect against that, we ensure
that we block the offlining operation of the last online cpu in
aarch32_el0_mask.
Suspend/hibernation and kexec operation should continue to work as
intended.
This is a different approach compared to the original one [1]. We should
be able to convert this to a vendor hook if there's a desire to do so.
[1] http://linux-arm.org/git?p=linux-power.git;a=commit;h=e6b567c1cc07dd1690e5d34b6a93ab9819ab2eeb
Bug: 168847043
Reason: Needed for bringup. Revert when upstream patch is available
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: Ie8a2372d7b7db3c3580f19d724be183f988a5895
On Asym AArch32 system, if a tasks tries to run on unsupported CPU, we
fix up the cpumask silently to make sure tasks aren't killed if placed
on a CPU without AArch32 support
This patch can be omitted if user-space can guarantee the cpumask of
all AArch32 apps only contains AArch32 capable CPUs.
The biggest danger is in apps who try to modify their own cpu affinity
via sched_setaffinity(). Without this change they could trigger
a SIGKILL if they unknowingly affine to the wrong CPU.
Without this patch user-space must ensure that any 32bit app is cloned
into a cpuset cgroup that will restrict it to aarch32 capable cpus.
clone3 syscall allows specifying the cgroup on fork.
Split from Catalin's original patch to support Asym AArch32 systems.
Only modified cpumask_t to become cpumask_var_t in
set_32bit_cpus_allowed().
Bug: 168847043
Reason: Needed for bringup. Revert when upstream patch is available
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: If520cbf5cd705fb0e0399f36b81d4a68e90beb3a
When the CONFIG_ASYMMETRIC_AARCH32 option is enabled (EXPERT), the type
of the ARM64_HAS_32BIT_EL0 capability becomes WEAK_LOCAL_CPU_FEATURE.
The kernel will now return true for system_supports_32bit_el0() and
checks 32-bit tasks are affined to AArch32 capable CPUs only in
do_notify_resume(). If the affinity contains a non-capable AArch32 CPU,
the tasks will get SIGKILLed. If the last CPU supporting 32-bit is
offlined, the kernel will SIGKILL any scheduled 32-bit tasks (the
alternative is to prevent offlining through a new .cpu_disable feature
entry).
In addition to the relaxation of the ARM64_HAS_32BIT_EL0 capability,
this patch factors out the 32-bit cpuinfo and features setting into
separate functions: __cpuinfo_store_cpu_32bit(),
init_cpu_32bit_features(). The cpuinfo of the booting CPU
(boot_cpu_data) is now updated on the first 32-bit capable CPU even if
it is a secondary one. The ID_AA64PFR0_EL0_64BIT_ONLY feature is relaxed
to FTR_NONSTRICT and FTR_HIGHER_SAFE when the asymmetric AArch32 support
is enabled. The compat_elf_hwcaps are only verified for the
AArch32-capable CPUs to still allow hotplugging AArch64-only CPUs.
Bug: 168847043
Reason: Needed for bringup. Revert when upstream patch is available
Nacked-for-upstream-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Cc: Morten Rasmussen <Morten.Rasmussen@arm.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
[Qais: removed affinity handling to a separate patch and fixed up
docs/naming to match the change]
Change-Id: I1a9860a883f001ddebb4df9dee7504edf970d593
The below call stack prevents clk_gating at every IO completion.
We can remove the condition, ufshcd_any_tag_in_use(), since clkgating_work
will check it again.
ufshcd_complete_requests(struct ufs_hba *hba)
ufshcd_transfer_req_compl()
__ufshcd_transfer_req_compl()
__ufshcd_release(hba)
if (ufshcd_any_tag_in_use() == 1)
return;
ufshcd_tmc_handler(hba);
blk_mq_tagset_busy_iter();
Note that, this still requires a work to deal with a potential racy condition
when user sets clkgating.delay_ms to very small value. That can cause preventing
clkgating by the check of ufshcd_any_tag_in_use() in gate_work.
Link: https://lore.kernel.org/linux-scsi/20201028194352.GA3060274@google.com/T/#m3485ba8df14e4ad5cf0aa5b314ffe1cb90d90105
Fixes: 7252a36030 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Change-Id: I9b56725b26e1be8b1da55ae1db7322ab00fc5298
When giving a stress test which enables/disables clkgating, we hit device
timeout sometimes. This patch avoids subtle racy condition to address it.
Note that, this requires a patch to address the device stuck by REQ_CLKS_OFF in
__ufshcd_release().
The fix is "scsi: ufs: avoid to call REQ_CLKS_OFF to CLKS_OFF".
Link: https://lore.kernel.org/linux-scsi/20201028194352.GA3060274@google.com/T/#m979bdb55500f3f63fa4e975524f8559c80697862
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ice47cbd199850aadd15166ac414fd97db3a79aad
DYNAMIC_MINORS value has been set to 64.
Due to this reason, we are facing a module loading fail problem of
device driver like below.
[ 45.712771] pdic_misc_init - return error : -16
We need to increase this value for registering more misc devices.
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Bug: 171370390
Link: https://lore.kernel.org/lkml/20201029070552.GA3062343@kroah.com/
Change-Id: I04ab486ce7674dde3118506c3d783f0e4e211bac
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
After upstream 33def8498f ("treewide: Convert macro and uses of
__section(foo) to __section("foo")"), the preprocessor macro __section
now requires the section name to be double quoted.
This patch resolves breakage that results from merging down from
mainline in this out of tree header.
Fixes: 33def8498f ("treewide: Convert macro and uses of __section(foo) to __section("foo")")
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie6a701251e6420e63187a466b43ec2c834e0ec2e
The code to try to shut up sparse warnings about questionable locking
didn't shut up sparse: it made the result not parse as valid C at all,
since the end result now has a label with no statement.
The proper fix is to just always lock the hardware, the same way Bart
did in commit 8ae178760b ("scsi: qla2xxx: Simplify the functions for
dumping firmware"). That avoids the whole problem with having locking
that is not statically obvious.
But in the meantime, just remove the incorrect attempt at trying to
avoid a sparse warning that just made things worse.
This was exposed by commit 3e6efab865 ("scsi: qla2xxx: Fix reset of
MPI firmware"), very similarly to how commit cbb01c2f2f ("scsi:
qla2xxx: Fix MPI failure AEN (8200) handling") exposed the same problem
in another place, and caused that commit 8ae178760b.
Please don't add code to just shut up sparse without actually fixing
what sparse complains about.
Bug: 171770067
Link: https://lore.kernel.org/r/20201027080745.GA31045@infradead.org
Reported-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Arun Easi <aeasi@marvell.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7243126a46da8cf144a71907781594ddd137d190
One of the assignments that was removed by commit 4a0c1de64b ("crypto:
x86/poly1305 - Remove assignments with no effect") is actually needed,
since it affects the return value.
This fixes the following crypto self-test failure:
alg: shash: poly1305-simd test failed (wrong result) on test vector 2, cfg="init+update+final aligned buffer"
Bug: 171770067
Link: https://lore.kernel.org/r/20201027080745.GA31045@infradead.org
Fixes: 4a0c1de64b ("crypto: x86/poly1305 - Remove assignments with no effect")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifd01e3694adb618091fa1c1646d677a93382152b
Commit c6e5f9d7cf ("ANDROID: cpu-hotplug: Always use real time
scheduling when hotplugging a CPU") tried to speed-up hotplug of
SCHED_NORMAL tasks by temporarily elevating them to SCHED_FIFO. But
while at it, it also prevented hotplug from SCHED_IDLE, SCHED_BATCH or
SCHED_DEADLINE for no apparent reason.
Since this is a userspace-visible change, and is unlikely to actually be
needed, change the patch logic to only optimize for SCHED_NORMAL tasks
and leave the others untouched.
Bug: 169238689
Fixes: c6e5f9d7cf ("ANDROID: cpu-hotplug: Always use real time
scheduling when hotplugging a CPU")
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I4d9e88b15fee56e7d234826e2eaea306a69328bb
After enabling interconect scaling for display on the db845c board,
in certain configurations the board hangs, while the following errors
are observed on the console:
Error sending AMC RPMH requests (-110)
qcom_rpmh TCS Busy, retrying RPMH message send: addr=0x50000
qcom_rpmh TCS Busy, retrying RPMH message send: addr=0x50000
qcom_rpmh TCS Busy, retrying RPMH message send: addr=0x50000
...
In this specific case, the above is related to one of the sequencers
being stuck, while client drivers are returning from probe and trying
to disable the currently unused clock and interconnect resources.
Generally we want to keep the multimedia NoC enabled like the rest of
the NoCs, so let's set the keepalive flag on it too.
Fixes: aae57773fb ("interconnect: qcom: sdm845: Split qnodes into their respective NoCs")
Reported-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Link: https://lore.kernel.org/lkml/20201012194034.26944-1-georgi.djakov@linaro.org/
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I0935e68947919c6a7d38bada810f9e8ed3f61604
We'll want to take the dts changes that landed upstream
in 5.10-rc1, so backout the current delta in android-mainline
and align it to match upstream as of commit 45fe605832
("Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc")
Fixes: f2ddade04b ("ANDROID: lt9611: Sync w/ Vinod's most recent lt9611 patches which enable HDMI audio")
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I93f76c6bbdf465bdfe40067445e47a8e3b3c23cd
Fix bad merge resolutions between Android-specific commit 8de80df7d7
("ANDROID: scsi: ufs: allow ufs variants to override sg entry size")
and the following upstream commits:
- commit 26f968d7de ("scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk")
- commit cc770ce34a ("scsi: ufs: Make ufshcd_print_trs() consider UFSHCD_QUIRK_PRDT_BYTE_GRAN")
This should be folded into
ANDROID-scsi-ufs-allow-ufs-variants-to-override-sg-entry-size.patch.
Fixes: 2c136de302 ("Merge 86cfccb669 ("Merge tag 'dlm-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm") into android-mainline")
Fixes: 22a7eefbeb ("Merge 55e0500eb5 ("Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi") into android-mainline")
Bug: 162257402
Change-Id: I3a2f1f5b6df43028dde248b9a932f5595dd13e21
Signed-off-by: Eric Biggers <ebiggers@google.com>
With the support for memory hotplug and hotremove fully functional,
and having configs ARCH_ENABLE_MEMORY_HOTPLUG and
ARCH_ENABLE_MEMORY_HOTREMOVE enabled by default for x86 targets,
enable config MEMORY_HOTPLUG and MEMORY_HOTREMOVE.
Bug: 170202777
Change-Id: I09b8768a3116ba53144c9f9890b6471106bcfa22
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
With the support for memory hotplug and hotremove fully
functional, and having configs ARCH_ENABLE_MEMORY_HOTPLUG
and ARCH_ENABLE_MEMORY_HOTREMOVE enabled by default for
arm64 targets, enable config MEMORY_HOTREMOVE.
Bug: 170202777
Change-Id: I618dfeeb3f0f4f2c347e6f6424303725bf15e461
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
This reverts commit bca4339bda.
It causes build breakage in the db845c_gki_defconfig
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4c73e66f0a89cf3ed96fd67b49c9103f35db0e8a
Steps on the way to 5.10-rc1
Resolves conflicts with:
drivers/tty/serial/Kconfig
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I346cc0d7065f68a65fa5ba07911999aca0b01a15
Commit bca815d620 ("PM: AVS: smartreflex Move driver to soc specific
drivers") dropped the CONFIG_POWER_AVS configuration option, so it also
needs to be dropped from the arm64 gki_defconfig so that the build
continues to work.
Fixes: bca815d620 ("PM: AVS: smartreflex Move driver to soc specific drivers")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie437bf0dc6977dd58caffb1349186d16873798c9
Steps on the way to 5.10-rc1
Resolves conflicts in:
Documentation/admin-guide/sysctl/vm.rst
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic58f28718f28dae42948c935dfb0c62122fe86fc