Commit graph android_kernel_motorola_sm6375/kernel
Author SHA1 Message Date
Pavankumar Kondeti
dfd45fa093 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I616acbe5bfdb0e1bf88e923d98b4a3d54d26d942
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-12-15 14:58:36 +05:30
qctecmdr
0249e58009 Merge "sched/walt: Improve the scheduler" 2020-12-05 23:42:40 -08:00
qctecmdr
d1d92738ec Merge "Merge android11-5.4.61+ (3720133) into msm-5.4" 2020-12-01 02:17:29 -08:00
Pavankumar Kondeti
0fe8be6276 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I8f521dfd31ff1c8cc1f16805e4e0ac78228d9383
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-11-26 14:53:46 +05:30
Blagovest Kolenichev
c47e2335cc Merge android11-5.4.61+ (3720133) into msm-5.4
* refs/heads/tmp-3720133:
  ANDROID: ABI: Update allowed list for QCOM
  FROMGIT: Input: Add devices for HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE
  ANDROID: GKI: add allowed list for Exynosauto SoC
  ANDROID: GKI: update allowed list for Exynosauto SoC
  UPSTREAM: mfd: sprd: Add wakeup capability for PMIC IRQ
  UPSTREAM: tick/common: Touch watchdog in tick_unfreeze() on all CPUs
  FROMLIST: thermal: Fix NULL pointer dereference issue
  ANDROID: ABI: Update allowed list for QCOM
  UPSTREAM: spi: Fix regression to return zero on success instead of positive value
  UPSTREAM: thermal: power_allocator: Fix Kconfig warning
  UPSTREAM: of/platform: Unconditionally pause/resume sync state during kernel init
  UPSTREAM: selinux: ensure the policy has been loaded before reading the sidtab stats
  UPSTREAM: MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel
  UPSTREAM: mfd: syscon: Fix syscon_regmap_lookup_by_phandle_args() dummy
  UPSTREAM: ARM: bcm2835_defconfig: Explicitly restore CONFIG_DEBUG_FS
  UPSTREAM: ARM: socfpga_defconfig: Add back DEBUG_FS
  UPSTREAM: um: Fix header inclusion
  UPSTREAM: net: fix fraglist segmentation reference count leak
  UPSTREAM: ipv6: ndisc: RFC-ietf-6man-ra-pref64-09 is now published as RFC8781
  UPSTREAM: of: property: Fix create device links for all child-supplier dependencies
  UPSTREAM: of: property: Do not link to disabled devices
  UPSTREAM: mmc: sdhci: Fix SDHCI_QUIRK_BROKEN_CQE
  UPSTREAM: usb: renesas-xhci: include correct header for get_unaligned_le16()
  UPSTREAM: wil6210: account for napi_gro_receive never returning GRO_DROP
  UPSTREAM: nl80211: fix memory leak when parsing NL80211_ATTR_HE_BSS_COLOR
  UPSTREAM: thermal/drivers/sprd: Fix return value of sprd_thm_probe()
  UPSTREAM: fscrypt: restrict IV_INO_LBLK_* to AES-256-XTS
  UPSTREAM: fscrypt: use smp_load_acquire() for fscrypt_prepared_key
  UPSTREAM: nvmem: sprd: Fix return value of sprd_efuse_probe()
  UPSTREAM: mac80211: fix warning in 6 GHz IE addition in mesh mode
  UPSTREAM: scsi: ufs: Fix interrupt error message for shared interrupts
  UPSTREAM: sched/fair: Fix wrong negative conversion in find_energy_efficient_cpu()
  UPSTREAM: driver core: Fix device_pm_lock() locking for device links
  UPSTREAM: fscrypt: restrict IV_INO_LBLK_32 to ino_bits <= 32
  UPSTREAM: scsi: ufs: ufs-mediatek: Eliminate error message for unbound mphy
  UPSTREAM: scsi: ufs: ufs-mediatek: Fix HOST_PA_TACTIVATE quirk
  UPSTREAM: cfg80211: fix 6 GHz channel conversion
  ANDROID: GKI: update symbol list for exynosauto soc
  ANDROID: ABI: update allowed list for galaxy
  ANDROID: GKI: initial upload list for exynosauto soc
  ANDROID: ABI: Update allowed list for QCOM

 Conflicts:
	drivers/thermal/thermal_sysfs.c
	kernel/sched/fair.c

Change-Id: I9a0af53ba055157468e6b3cee41f4c8bda1f34af
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-11-19 11:55:48 -08:00
qctecmdr
5cc19bc1b5 Merge "sched: Fix "releasing a pinned lock" lockdep warning" 2020-11-18 22:31:08 -08:00
Pavankumar Kondeti
c83a851f7d sched: Fix "releasing a pinned lock" lockdep warning
WALT requires both src and dst runqueue locks to be held
during migration. So a double_lock_balance() is added
in move_queued_task() before calling set_task_cpu(). However,
releasing the src rq lock, which is pinned is giving a
lockdep warning. Fix this by unpinning the lock before
calling double_lock_balance.

Change-Id: I64dec0701b3467185cf53f311ebb521c6a822e88
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-11-18 08:58:35 +05:30
Chunyan Zhang
5eaa11cf0d UPSTREAM: tick/common: Touch watchdog in tick_unfreeze() on all CPUs
Suspend to IDLE invokes tick_unfreeze() on resume. tick_unfreeze() on the
first resuming CPU resumes timekeeping, which also has the side effect of
resetting the softlockup watchdog on this CPU.

But on the secondary CPUs the watchdog is not reset in the resume /
unfreeze() path, which can result in false softlockup warnings on those
CPUs depending on the time spent in suspend.

Prevent this by clearing the softlock watchdog in the unfreeze path also
on the secondary resuming CPUs.

[ tglx: Massaged changelog ]

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200110083902.27276-1-chunyan.zhang@unisoc.com
Bug: 173341055
(cherry picked from commit 5167c506d62dd9ffab73eba23c79b0a8845c9fe1)
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
Change-Id: Iab440b4137726811fce76f3636a4cf8bafc2c202
2020-11-18 02:12:36 +00:00
Lukasz Luba
91c21bea59 UPSTREAM: sched/fair: Fix wrong negative conversion in find_energy_efficient_cpu()
In find_energy_efficient_cpu() 'cpu_cap' could be less that 'util'.
It might be because of RT, DL (so higher sched class than CFS), irq or
thermal pressure signal, which reduce the capacity value.
In such situation the result of 'cpu_cap - util' might be negative but
stored in the unsigned long. Then it might be compared with other unsigned
long when uclamp_rq_util_with() reduced the 'util' such that is passes the
fits_capacity() check.

Prevent this situation and make the arithmetic more safe.

Fixes: 1d42509e475cd ("sched/fair: Make EAS wakeup placement consider uclamp restrictions")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/20200810083004.26420-1-lukasz.luba@arm.com
(cherry picked from commit da0777d35f47892f359c3f73ea155870bb595700)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib3e22c155eb031854cfb4428494c1c4da57692b1
2020-11-14 16:20:56 +01:00
Blagovest Kolenichev
98c101df75 Merge android11-5.4.61+ (dc2d5a0) into msm-5.4
* refs/heads/tmp-dc2d5a0:
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: modules: cfi cleanup for module load failure
  ANDROID: Temporarily disable XFRM_USER_COMPAT filtering
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: ABI: update allowed list for QCOM
  ANDROID: fix kernelci build-break due to stop_ipi hook
  BACKPORT: rcu/tree: Export rcu_idle_{enter,exit} to modules
  ANDROID: GKI: Add some symbols to symbol list
  ANDROID: arm64: smp: fix Lockdep warning: RCU used illegally from idle CPU.
  ANDROID: Fix build-break caused by android_rvh_nf_conn_alloc hook
  ANDROID: GKI: Enable DEBUG_INFO_DWARF4
  ANDROID: cfi: ensure RCU is watching in __cfi_slowpath
  UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller
  BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
  UPSTREAM: xfrm/compat: Add 32=>64-bit messages translator
  UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
  UPSTREAM: xfrm/compat: Add 64=>32-bit messages translator
  BACKPORT: xfrm: Provide API to register translator module
  ANDROID: ABI: update allowed list for galaxy
  ANDROID: Update the KMI_GENERATION after KMI changes on October 31
  ANDROID: Input: bump SW_MAX up to 0x3f
  ANDROID: GKI: ABI update for Oct 31 KABI break
  ANDROID: GKI: add Android ABI padding to struct nf_conn
  ANDROID: GKI: add vendor padding variable in struct skb_shared_info
  ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle
  ANDROID: GKI: add vendor padding variable in struct nf_conn
  ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle
  ANDROID: GKI: add vendor padding variable in struct sock
  ANDROID: fuse: Add support for d_canonical_path
  ANDROID: vfs: add d_canonical_path for stacked filesystem support
  ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI
  Revert "ANDROID: GKI: fix ABI breakage in module.h"
  ANDROID: ABI: update allowed list for galaxy
  FROMLIST: char: misc: increase DYNAMIC_MINORS value

 Conflicts:
	net/netfilter/nf_conntrack_core.c

Change-Id: I0687237ba5f07f291a5f3b49ee2057071fcb2717
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-11-13 03:55:57 -08:00
Mayank Grover
4e7a62687a ANDROID: modules: cfi cleanup for module load failure
Cleanup cfi shadow for failure in module loading,
to avoid causing warnings.

Bug: 172542186
Change-Id: I1de7ffa7d884c8e46891b8bbc8196ec0d2cef0d6
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2020-11-06 10:09:05 +05:30
qctecmdr
c9d2eaf4a6 Merge "cpufreq: schedutil: Queue sugov irq work on policy online cpu" 2020-11-04 14:57:12 -08:00
qctecmdr
9d8a1b1f7a Merge "sched: fix compile issue" 2020-11-04 06:07:45 -08:00
Borislav Petkov
de84825a22 BACKPORT: rcu/tree: Export rcu_idle_{enter,exit} to modules
Fix this link error:

  ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined!
  ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined!

when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light
of ARM needing those soon too, they should simply be exported.

Link: https://lore.kernel.org/linux-pm/20200921103741.GC5901@zn.tnic/
Bug: 172034763
Change-Id: I26d516d11edbce673f52df6474f6695c5a1e2b07
(cherry picked from commit 3ad1c8ef083bef96ec922688966484be1039e6b5)
Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle")
Reported-by: Sven Joachim <svenjoac@gmx.de>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Paul E. McKenney <paulmckrcu@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Cheng Jui Wang <cheng-jui.wang@mediatek.com>
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
2020-11-04 01:02:40 +00:00
qctecmdr
c0d9738fcd Merge "Merge android11-5.4.61+ (874de1d) into msm-5.4" 2020-11-02 20:59:38 -08:00
Biao Long
cebe8679d5 sched: fix compile issue
Root_task_group is acessed outside CONFIG_SCHED_CGROUP
and it results in compilation error.so add macro check
here to avoid compile issue.

Change-Id: Ic3ce1962236f8114f8b03aca8ebd1c8fbd42a076
Signed-off-by: Biao Long <blong@codeaurora.org>
2020-11-03 10:20:17 +08:00
Sami Tolvanen
d0dc5d8586 ANDROID: cfi: ensure RCU is watching in __cfi_slowpath
Indirect calls can happen when RCU is not watching, so we need to wake
it up again for the CFI shadow and __module_address. As these calls can
happen anywhere, use rcu_nmi_enter() similarly to kernel_text_address(),
and switch to rcu_read_lock_sched() for shadow access.

Bug: 169017431
Change-Id: Iebb857df898e644b4952a62d86fa5ff9852b5711
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-11-02 18:55:52 +00:00
qctecmdr
3064610aa0 Merge "soc/qcom/hyp_core_ctl: Track VPM Group state for VM" 2020-11-01 20:06:45 -08:00
Greg Kroah-Hartman
d2a52d0eaa Revert "ANDROID: GKI: fix ABI breakage in module.h"
This reverts commit db96212bde as it is
not needed if we are able to update the Android KABI.

Fixes: db96212bde ("ANDROID: GKI: fix ABI breakage in module.h")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic6f4f449e554240457e1f94c49b53fa158f0d00e
2020-10-30 10:02:25 +01:00
Maria Yu
9af2c23239 cpufreq: schedutil: Queue sugov irq work on policy online cpu
Got never update frequency if scheduled the irq
work on an offlined cpu and it will always pending.
Queue sugov irq work on any online cpu if current
cpu is offline.

Change-Id: I33fc691917b5866488b6aeb11ed902a2753130b2
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
[clingutla@codeaurora.org: Moved 'walt_irq_work_queue' to 'sched.h'
 for multiple callers]
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2020-10-30 12:44:28 +05:30
Blagovest Kolenichev
d9a7f5879a Merge android11-5.4.61+ (874de1d) into msm-5.4
* refs/heads/tmp-874de1d:
  ANDROID: GKI: enable CONFIG_CPU_FREQ_STAT and more thermal configs
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: sched: add restrict vendor hook to modify load balance behavior
  ANDROID: GKI: Update abi_gki_aarch64_oneplus
  ANDROID: scs: use vmapped shadow stacks by default
  ANDROID: ABI: update allowed list for QCOM
  UPSTREAM: sched/fair/util_est: Implement faster ramp-up EWMA on utilization increases
  ANDROID: GKI: Update abi_gki_aarch64_exynos
  ANDROID: kbuild: disable GCOV with CFI
  ANDROID: GKI: add built-in PCIE_DW_PLAT_EP
  ANDROID: PCI: dwc: export symbols for ep driver
  ANDROID: recordmcount: avoid STT_FILE as base for mcount offset relocation
  ANDROID: iommu: Enable CONFIG_IOMMU_IO_PGTABLE_ARMV7S
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Quad lvl1 pgtable for MediaTek
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Add cfg as a param in some macros
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Extend PA34 for MediaTek
  BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: modules: fix suspicious rcu usage

 Conflicts:
	kernel/sched/fair.c
	kernel/sched/features.h

Change-Id: I5d8dc058a0aca2b90ca702f18f71f663af9774fc
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-10-29 15:36:09 -07:00
Blagovest Kolenichev
1eba98287b Merge android11-5.4.61+ (e17d9fc) into msm-5.4
* refs/heads/tmp-e17d9fc:
  ANDROID: GKI: Enable CONFIG_X86_X2APIC
  ANDROID: GKI: update xiaomi symbol list
  ANDROID: GKI: fix ABI breakage in module.h
  UPSTREAM: modules: inherit TAINT_PROPRIETARY_MODULE
  UPSTREAM: modules: return licensing information from find_symbol
  UPSTREAM: modules: rename the licence field in struct symsearch to license
  UPSTREAM: modules: unexport __module_address
  UPSTREAM: modules: unexport __module_text_address
  UPSTREAM: modules: mark each_symbol_section static
  UPSTREAM: modules: mark find_symbol static
  UPSTREAM: modules: mark ref_module static
  ANDROID: GKI: Update abi_gki_aarch64_exynos
  ANDROID: ABI: update allowed list for QCOM
  UPSTREAM: binder: fix UAF when releasing todo list

Change-Id: I6db85b4587d3b60f386c58fd6b1589746e9281c5
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-10-29 10:35:10 -07:00
Sai Harshini Nimmala
f89f67ece0 soc/qcom/hyp_core_ctl: Track VPM Group state for VM
VM has to go into suspend state outside of use case boundary. Delay in
transitioning to system suspend or spurious wake-ups after the use case
is completed will result in a system regression.
Adding a mechanism to track both the scenarios of delay in system
suspend and spurious wake-ups of the VM by checking the VPM Group state
associated with the VM.

Change-Id: I2a5990989033ffd3cc57ae1cba93b8ba6b63a3c7
Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
2020-10-28 20:58:26 -07:00
YT Chang
54cf84a595 ANDROID: sched: add restrict vendor hook to modify load balance behavior
For modifying load balance policy, we add the hook on
find_busiest_group().
It allows us to modify load balance paths.

Bug: 168248326
Signed-off-by: YT Chang <yt.chang@mediatek.com>
Change-Id: I77ec043576139806551b978eb1bdf9f637442dfb
(cherry picked from commit a2ca8408de6183364b4c17f341f06e875bc7a1c1)
(cherry picked from commit 489646b879ede582b6b00803edd3f777aede4d85)
2020-10-27 15:11:50 +00:00
Patrick Bellasi
d82457153c UPSTREAM: sched/fair/util_est: Implement faster ramp-up EWMA on utilization increases
The estimated utilization for a task:

   util_est = max(util_avg, est.enqueue, est.ewma)

is defined based on:

 - util_avg: the PELT defined utilization
 - est.enqueued: the util_avg at the end of the last activation
 - est.ewma:     a exponential moving average on the est.enqueued samples

According to this definition, when a task suddenly changes its bandwidth
requirements from small to big, the EWMA will need to collect multiple
samples before converging up to track the new big utilization.

This slow convergence towards bigger utilization values is not
aligned to the default scheduler behavior, which is to optimize for
performance. Moreover, the est.ewma component fails to compensate for
temporarely utilization drops which spans just few est.enqueued samples.

To let util_est do a better job in the scenario depicted above, change
its definition by making util_est directly follow upward motion and
only decay the est.ewma on downward.

Bug: 120440300
Signed-off-by: Patrick Bellasi <patrick.bellasi@matbug.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Douglas Raillard <douglas.raillard@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Perret <qperret@google.com>
Cc: Rafael J . Wysocki <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191023205630.14469-1-patrick.bellasi@matbug.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit b8c96361402aa3e74ad48ceef18aed99153d8da8)
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: Iaa75dec917748375d9043c3ebf21bf272299c8dd
2020-10-26 12:24:35 +00:00
Neal Liu
ba2f977129 ANDROID: modules: fix suspicious rcu usage
Use rcu_read_lock_sched() & rcu_read_unlock_sched() to mark the
beginning & end of a RCU-sched critical section instead.

Bug: 171362096
Signed-off-by: Neal Liu <neal.liu@mediatek.com>
Change-Id: Idb40e2c2356621398e06944f7cb9b8bc5ef1d92a
2020-10-22 17:03:51 +00:00
Greg Kroah-Hartman
db96212bde ANDROID: GKI: fix ABI breakage in module.h
commit 262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE")
changes the size of 'struct module' a bit by adding a single boolean
value to the middle.  Move things around a bit and take up a space to
preserve the abi so that nothing changes with the abi before that commit
was merged.

This might be able to be dropped at the next Android KABI "Break", if
one happens.

Bug: 171277690
Fixes: 262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie31a6fcea384ad665248c87f7abfde4d214da70a
2020-10-20 16:49:28 +02:00
Christoph Hellwig
35b560985b UPSTREAM: modules: inherit TAINT_PROPRIETARY_MODULE
If a TAINT_PROPRIETARY_MODULE exports symbol, inherit the taint flag
for all modules importing these symbols, and don't allow loading
symbols from TAINT_PROPRIETARY_MODULE modules if the module previously
imported gplonly symbols.  Add a anti-circumvention devices so people
don't accidentally get themselves into trouble this way.

Comment from Greg:
  "Ah, the proven-to-be-illegal "GPL Condom" defense :)"

Bug: 171277690
[jeyu: pr_info -> pr_err and pr_warn as per discussion]
Link: http://lore.kernel.org/r/20200730162957.GA22469@lst.de
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit 262e6ae7081df304fc625cf368d5c2cbba2bb991)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id7c1af6bb8523bc39bda1efc661929d9ea0ccb20
2020-10-20 16:39:18 +02:00
Christoph Hellwig
f39710f356 UPSTREAM: modules: return licensing information from find_symbol
Report the GPLONLY status through a new argument.

Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit ef1dac6021cc8ec5de02ce31722bf26ac4ed5523)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I93285e06e380509b11356256da4d3d5a8738e252
2020-10-20 14:28:36 +02:00
Christoph Hellwig
35601d5015 UPSTREAM: modules: rename the licence field in struct symsearch to license
Use the same spelling variant as the rest of the file.

Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit cd8732cdcc37d7077c4fa2c966b748c0662b607e)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0ad6d1dcbe39053566bb922b9a71359f753df85c
2020-10-20 14:28:25 +02:00
Christoph Hellwig
684d5eaf06 UPSTREAM: modules: unexport __module_address
__module_address is only used by built-in code.

Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit 34e64705ad415ed7a816e60ef62b42fe6d1729d9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9fb9339e17a7bac54afee8d301f33298a702fcb9
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-10-20 10:01:50 +02:00
Christoph Hellwig
68d5cd1dcb UPSTREAM: modules: unexport __module_text_address
__module_text_address is only used by built-in code.

Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit 3fe1e56d0e68b623dd62d8d38265d2a052e7e185)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1a9081c6fa3d2a6e27ede24a4fa2b6a220cd521d
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-10-20 10:01:48 +02:00
Christoph Hellwig
6cd6da665d UPSTREAM: modules: mark each_symbol_section static
each_symbol_section is only used inside of module.c.

Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit a54e04914c211b5678602a46b3ede5d82ec1327d)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5debe30f150847281874d9b2c47952f9036d37d2
2020-10-20 10:01:46 +02:00
Christoph Hellwig
2951ba186e UPSTREAM: modules: mark find_symbol static
find_symbol is only used in module.c.

Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit 773110470e2fa3839523384ae014f8a723c4d178)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifd34f7a477be9ed1b7715ce966473f2898c5a975
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-10-20 10:01:44 +02:00
Christoph Hellwig
ec46411eb4 UPSTREAM: modules: mark ref_module static
ref_module isn't used anywhere outside of module.c.

Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit 7ef5264de773279b9f23b6cc8afb5addb30e970b)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I68f39675f53b745664c833ac150d838563c78aae
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-10-20 10:01:33 +02:00
Blagovest Kolenichev
a1f16e27ca Merge android11-5.4.61+ (8540985) into msm-5.4
* refs/heads/tmp-8540985:
  ANDROID: trace: sched: add sched blocked tracepoint which dumps out context of sleep.
  ANDROID: ABI: update allowed list for QCOM
  ANDROID: Update KMI_GENERATION after KMI change
  ANDROID: GKI: update the .xml file with the October 15 ABI breakages
  ANDROID: GKI: fs.h: add Android ABI padding to struct file
  ANDROID: vendor_hooks: Add a vendor data to file struct
  ANDROID: vendor_hooks: Extend the vendor data array in task_struct
  ANDROID: GKI: add fields required to enable CONFIG_TRANSPARENT_HUGEPAGE
  ANDROID: Drop abi_gki_aarch64_workarounds
  UPSTREAM: ehci-hcd: Move include to keep CRC stable
  ANDROID: GKI: update xiaomi symbol list
  ANDROID: GKI: update Vivo symbol list
  ANDROID: sysrq: add vendor hook for sysrq crash information
  ANDROID: ABI: update allowed list for galaxy
  ANDROID: GKI: update Vivo symbol list
  ANDROID: adding __nocfi to cpuidle_enter_state
  ANDROID: ABI: update allowed list for galaxy
  ANDROID: workqueue: add vendor hook for wq lockup information

Change-Id: I29b7a5396075c41257cba3d4595356df755490f1
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-10-19 10:50:25 -07:00
Riley Andrews
8540985fd2 ANDROID: trace: sched: add sched blocked tracepoint which dumps out context of sleep.
Declare war on uninterruptible sleep. Add a tracepoint which
walks the kernel stack and dumps the first non-scheduler function
called before the scheduler is invoked.

Bug: 120445457
Change-Id: I19e965d5206329360a92cbfe2afcc8c30f65c229
Signed-off-by: Riley Andrews <riandrews@google.com>
[astrachan: deleted an unnecessary whitespace change]
Signed-off-by: Alistair Strachan <astrachan@google.com>
Bug: 170916884
Signed-off-by: Todd Kjos <tkjos@google.com>
2020-10-16 15:55:07 +00:00
qctecmdr
919c7a1748 Merge "sched: fix suspicious RCU usage warning" 2020-10-09 23:26:55 -07:00
Jeevan Shriram
460f3fd8a4 Merge android11-5.4.61+ (d240b69) into msm-5.4
* remotes/origin/tmp-d240b69:
  ANDROID: db845c_gki.fragment: Add missing qcom drivers required for cpufreq functionality
  ANDROID: ABI: update allowed list for QCOM
  ANDROID: GKI: add allowed list file for xiaomi
  ANDROID: Disable kthread delayed work fp check in CFI builds
  ANDROID: ABI: update allowed list for QCOM
  ANDROID: GKI: pid: Export for find_task_by_vpid
  ANDROID: GKI: core: Export for runqueues
  ANDROID: GKI: time: Export for nsec_to_clock_t
  ANDROID: GKI: signal: Export for __lock_task_sighand
  ANDROID: GKI: cputime: Export for thread_group_cputime_adjusted
  ANDROID: GKI: loadavg: Export for get_avenrun
  ANDROID: Refresh ABI.xmls with libabigail 1.8.0-98bbf30d
  ANDROID: sched: add cpumask parameter to cpu capacity vendor hook
  ANDROID: ABI: Added symbols for allwinner
  ANDROID: ABI: Update allowed list for EXYNOS
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: drop KERNEL_DIR setting in build.config.common

Change-Id: I790253af5262bdb92cc84a87f90628607944c69f
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2020-10-09 07:27:04 -07:00
qctecmdr
72e0d2cf86 Merge "sched/walt: Improve the scheduler" 2020-10-08 21:56:20 -07:00
Satya Durga Srinivasu Prabhala
580788d5df sched: fix suspicious RCU usage warning
Below warning is observed during boot when lockdep is enabled:

[    0.233539] =============================
[    0.237668] WARNING: suspicious RCU usage
[    0.241798] 5.4.57-qgki-debug-g003be53-dirty #2 Not tainted
[    0.247528] -----------------------------
[    0.251657] include/linux/cgroup.h:488 suspicious rcu_dereference_check() usage!
[    0.259250]
[    0.259250] other info that might help us debug this:
[    0.259250]
[    0.267467]
[    0.267467] rcu_scheduler_active = 1, debug_locks = 1
[    0.274179] 2 locks held by swapper/0/0:
[    0.278222]  #0: ffffff800b7b89b0 (&p->pi_lock){....}, at: wake_up_new_task+0x44/0x1f4
[    0.286367]  #1: ffffff8179306018 (&rq->lock){-.-.}, at: __task_rq_lock+0x60/0xd8
[    0.294061]
[    0.294061] stack backtrace:
[    0.298544] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.57-qgki-debug-g003be53-dirty #2
[    0.306946] Hardware name: Qualcomm Technologies, Inc. LahainaP MTP (DT)
[    0.313828] Call trace:
[    0.316353]  dump_backtrace.cfi_jt+0x0/0x4
[    0.320569]  show_stack+0x18/0x24
[    0.323989]  dump_stack+0xe0/0x160
[    0.327496]  lockdep_rcu_suspicious+0x138/0x154
[    0.332155]  task_fits_max+0x11c/0x290
[    0.336015]  enqueue_task_fair+0x104/0x268
[    0.340230]  enqueue_task+0x154/0x1c8
[    0.344003]  wake_up_new_task+0xd4/0x1f4
[    0.348048]  _do_fork+0x264/0x37c
[    0.351469]  kernel_thread+0x50/0x78
[    0.355156]  rest_init+0x2c/0x1f0
[    0.358577]  start_kernel+0x0/0x424
[    0.362168]  start_kernel+0x3ac/0x424

Fix the issue by adding RCU lock while dereferencing css for the task.

Change-Id: I1f690dcf93a3bc3c39b401942654cc4f3b302346
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-10-05 21:18:10 -07:00
Sangmoon Kim
2ea974a00c ANDROID: workqueue: add vendor hook for wq lockup information
- Add the hook to provide additional information like
   a task scheduling log.

Bug: 169374262

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I203dbc6faa77687ea48769f76658d28b29ef46fd
2020-10-05 10:27:15 +09:00
qctecmdr
5168327a4f Merge "tracing: Add CONFIG_KPROBES_QGKI config" 2020-10-03 15:19:06 -07:00
qctecmdr
5bacff506a Merge "tracing: Add CONFIG_KPROBES_DEBUG config" 2020-10-03 04:38:39 -07:00
Vijayanand Jitta
c05914a1ab tracing: Add CONFIG_KPROBES_QGKI config
Add CONFIG_KPROBES_QGKI which enables the kprobe debug
module on QGKI builds.

Change-Id: I2e216c1d0561183ccc4284ce9a75bf7be45f2798
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2020-10-02 02:53:27 +05:30
Pavankumar Kondeti
1c336dcbcb sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I1eaa2993c17a50d436b939523bb2158b88d6a8e1
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-09-30 13:30:53 +05:30
Daniel Mentz
2318165502 ANDROID: Disable kthread delayed work fp check in CFI builds
With non-canonical CFI, LLVM generates jump table entries for external
symbols in modules and as a result, a function pointer passed from a
module to the core kernel will have a different address.

Disable the warning for now.

Bug: 145210207
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: I576a07206a465902773481e51a84529f0ac2e84b
2020-09-29 15:26:34 +00:00
Jeevan Shriram
e9ae2faf91 Merge android11-5.4.61+ (e32adae) into msm-5.4
* remotes/origin/tmp-e32adae:
  ANDROID: ABI: Update allowed list for QCOM
  Revert "UPSTREAM: ehci-hcd: Move include to keep CRC stable"
  Revert "ANDROID: Update android/abi_gki_aarch64.xml"
  ANDROID: Update android/abi_gki_aarch64.xml
  UPSTREAM: ehci-hcd: Move include to keep CRC stable
  UPSTREAM: kbuild: use CONFIG_CC_VERSION_TEXT to construct LINUX_COMPILER macro
  UPSTREAM: kbuild: do not pass $(KBUILD_CFLAGS) to scripts/mkcompile_h
  UPSTREAM: kbuild: ensure full rebuild when the compiler is updated
  ANDROID: abi: update for hikey960
  ANDROID: dts: hi3660: Fix duplicate adv7533 nodes
  ANDROID: kallsyms: ignore ThinLTO+CFI hash suffix in kallsyms_lookup_name()
  ANDROID: Refresh ABI.xmls with libabigail 1.8.0-1dca710a
  ANDROID: ABI: update allowed list for QCOM
  ANDROID: KMI symbol lists: migrate section name
  ANDROID: ABI: Update allowed list for GALAXY
  ANDROID: hikey960_gki.fragment: Remove UFS and USB bits
  ANDROID: lkdtm/usercopy: Use __va_function to find proper vm_mmap address
  ANDROID: mm: add generic __va_function and __pa_function
  ANDROID: vendor_hooks: Add hooks for debugging exception context
  FROMGIT: mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

Change-Id: I84ca8d4c3849984c3b18432e9e42136adf6c5d5c
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2020-09-28 11:25:52 -07:00
Abhilasha Rao
92bfdf631e ANDROID: GKI: pid: Export for find_task_by_vpid
- Add EXPORT_SYMBOL_GPL for find_task_by_vpid() so that drivers
    can be loadable as a module.

    - This API is required by loadable driver module from samsung to
    read process related information based on pid and thread id.
    To get information on when a certain process or thread was started,
    duration of run, Average load contributed by it.

Signed-off-by: Abhilasha Rao <abhilasha.hv@samsung.corp-partner.google.com>
Bug: 158067689
Change-Id: I0db9cc50c93eedff0f3e9dea0ac09a5d17d118f0
(cherry picked from commit bee18dd57e89f4e7aa79f6054b9238b99e45c191)
2020-09-28 18:10:49 +00:00
Abhilasha Rao
6765da7d2c ANDROID: GKI: core: Export for runqueues
- Add EXPORT_SYMBOL_GPL for runqueues().

    - This API is required by loadable driver module,to get number of
    jobs in the run queue (state R) or waiting for disk I/O (state D)
    averaged over 1 min.

Signed-off-by: Abhilasha Rao <abhilasha.hv@samsung.corp-partner.google.com>
Bug: 158067689
Change-Id: I3e80a46bef2e7c92714b68cc5b6b617ac50bc478
(cherry picked from commit 6b0a9dc6df8d8be21c8d178a01e0711b0fe6ce73)
2020-09-28 18:10:39 +00:00